Skip to content

feat: allow team slug instead of team id in github_team and github_team_members - #1664

Merged
kfcampbell merged 5 commits into
integrations:mainfrom
PabloPie:team-id-validation
May 1, 2023
Merged

kfcampbell merged 5 commits into
integrations:mainfrom
PabloPie:team-id-validation

Conversation

@PabloPie

Copy link
Copy Markdown
Contributor

Resolves #1583


Behavior

Before the change?

  • github_team_members supports passing a slug instead of an id directly, but the schema for the resource doesn't because of the validation function
  • github_team doesn't support passing a slug instead of an id for the parent_team_id

After the change?

  • github_team_members no longer validates that the id is an int
  • github_team supports using a slug instead of an id for parent_team_id

Other information


Additional info

Pull request checklist

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • Added the appropriate label for the given change

Does this introduce a breaking change?

Please see our docs on breaking changes to help!

  • Yes (Please add the Type: Breaking change label)
  • No

If Yes, what's the impact:

  • N/A

Pull request type

Please add the corresponding label for change this PR introduces:

  • Bugfix: Type: Bug
  • Feature/model/API additions: Type: Feature
  • Updates to docs or samples: Type: Documentation
  • Dependencies/code cleanup: Type: Maintenance

@PabloPie PabloPie changed the title Team id validation fix: allow team slug instead of team id in github_team and github_team_members Apr 24, 2023
@PabloPie PabloPie changed the title fix: allow team slug instead of team id in github_team and github_team_members feat: allow team slug instead of team id in github_team and github_team_members Apr 24, 2023
@kfcampbell kfcampbell added the Type: Bug Something isn't working as documented label May 1, 2023

@kfcampbell kfcampbell left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for contributing! I'll get this released soon.

@kfcampbell
kfcampbell merged commit c968888 into integrations:main May 1, 2023
@PabloPie
PabloPie deleted the team-id-validation branch May 4, 2023 14:24
avidspartan1 pushed a commit to avidspartan1/terraform-provider-github that referenced this pull request Feb 5, 2024
…am_members (integrations#1664)

* fix: remove validation for team_id as it can also be a string

* feat: allow team slug for parent team id in team resource

* docs: add slug option to team resource

* feat: add test for gihub_team using slug for parent_team_id

---------

Co-authored-by: Keegan Campbell <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Bug Something isn't working as documented

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: Validation error in github_team_membership when using team slug

2 participants