Skip to content

fix: Refactored github_repository_collaborators for team id#2420

Merged
kfcampbell merged 1 commit intointegrations:mainfrom
stevehipwell:repo-collaborators-fix
Oct 11, 2024
Merged

fix: Refactored github_repository_collaborators for team id#2420
kfcampbell merged 1 commit intointegrations:mainfrom
stevehipwell:repo-collaborators-fix

Conversation

@stevehipwell
Copy link
Copy Markdown
Collaborator

Resolves #2414
Resolves #2393
Resolves #2149


Before the change?

  • github_repository_collaborators churned to set team_id to the team slug
  • github_repository_collaborators made an API call for each team when reading the state
  • github_repository_collaborators had logic issues in the order of operations

After the change?

  • github_repository_collaborators keeps team_id as the user input it
  • github_repository_collaborators only makes an API for teams identified by their slug
  • github_repository_collaborators now adds and modifies teams before removing existing ones and processes teams before users

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)

Does this introduce a breaking change?

Please see our docs on breaking changes to help!

  • Yes
  • No

Signed-off-by: Steve Hipwell <steve.hipwell@gmail.com>
Copy link
Copy Markdown
Contributor

@kfcampbell kfcampbell left a comment

Choose a reason for hiding this comment

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

Confirming the adjusted integration tests look good for me locally. Thank you for your effort and attention to testing, @stevehipwell!

@kfcampbell kfcampbell merged commit 61d0821 into integrations:main Oct 11, 2024
@stevehipwell stevehipwell deleted the repo-collaborators-fix branch October 14, 2024 08:33
matijs added a commit to nl-design-system/terraform that referenced this pull request Jan 22, 2025
For `github_repository_collaborators` `team` blocks, use the team id
instead of the team slug.

[This change][1] in the GitHub integration caused a lot of noise that is
now fixed.

[1]: integrations/terraform-provider-github#2420
matijs added a commit to nl-design-system/terraform that referenced this pull request Jan 22, 2025
For `github_repository_collaborators` `team` blocks, use the team id
instead of the team slug.

[This change][1] in the GitHub integration caused a lot of noise that is
now fixed.

[1]: integrations/terraform-provider-github#2420
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants