Skip to content

fix!: github_repository_collaborators ID is now set the repository ID - #2876

Closed
acouvreur wants to merge 3 commits into
integrations:mainfrom
acouvreur:repository-collaborators-id
Closed

acouvreur wants to merge 3 commits into
integrations:mainfrom
acouvreur:repository-collaborators-id

Conversation

@acouvreur

@acouvreur acouvreur commented Nov 7, 2025 •

Copy link
Copy Markdown
Contributor

Resolves #2874


Before the change?

Before the change, changing the repository name would force a renew everytime.

After the change?

Now the renew is forced only if the repository ID actually changed.

Pull request checklist

  • Schema migrations have been created if needed (example)
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)

I'm not sure how to properly implement the tests right now, will work in this later.

Does this introduce a breaking change?

This introduce a breaking change as the internal resource ID is changed.

Please see our docs on breaking changes to help!

  • Yes
  • No

Now I'm wondering if we should instead add repository ID next to the repository name to avoid making API calls.

@nickfloyd nickfloyd moved this from Backlog to In Progress in Terraform Provider Nov 20, 2025
@nickfloyd nickfloyd added this to the v7 Next milestone Nov 20, 2025
@nickfloyd

Copy link
Copy Markdown
Contributor

Hey @acouvreur, let me know if you'd like to see this go our the door with the last v6.x, v7, or v7.x or if you're still working on it. ❤️

@acouvreur

Copy link
Copy Markdown
Contributor Author

Hey @acouvreur, let me know if you'd like to see this go our the door with the last v6.x, v7, or v7.x or if you're still working on it. ❤️

No pref, I didn't put too much effort into this recently unfortunately.

It's still causing us some pain in the state. But I can also take into consideration the few comments made on the original issue: #2874 (comment)

So no rush, I want this fix to be properly handled

@deiga

deiga commented Jan 7, 2026

Copy link
Copy Markdown
Collaborator

@acouvreur This could now be mergeable if you have capacity to finalize the PR :)

@acouvreur

Copy link
Copy Markdown
Contributor Author

@acouvreur This could now be mergeable if you have capacity to finalize the PR :)

Glad to hear it!

I will rebase my work in the coming weeks. (Currently in vacation!)

@acouvreur

Copy link
Copy Markdown
Contributor Author

I would rather add a repository_id field that let the user specify the repository ID directly instead of the repository name.

This should be preferred if the user wants to be rename proof. What do you think @deiga ?

@deiga

deiga commented Feb 11, 2026

Copy link
Copy Markdown
Collaborator

I would rather add a repository_id field that let the user specify the repository ID directly instead of the repository name.

This should be preferred if the user wants to be rename proof. What do you think @deiga ?

No,it's not a feasible approach. Just this week GitHub marked all Team ID and RepoID endpoints as legacy with imminent EOL.
Team slug is the intended API identification

@acouvreur

Copy link
Copy Markdown
Contributor Author

I would rather add a repository_id field that let the user specify the repository ID directly instead of the repository name.

This should be preferred if the user wants to be rename proof. What do you think @deiga ?

No,it's not a feasible approach. Just this week GitHub marked all Team ID and RepoID endpoints as legacy with imminent EOL.
Team slug is the intended API identification

So the fix is to always check for the underlying resource ID, just as I did with this pull request right ?

@deiga deiga added Type: Bug Something isn't working as documented Type: Maintenance Any dependency, housekeeping, and clean up Issue or PR vNext labels Apr 19, 2026
@deiga deiga removed this from the v7 Next milestone Apr 19, 2026
@acouvreur

Copy link
Copy Markdown
Contributor Author

Closing. #3233 fixed this. github_repository_collaborators now uses the repository ID as resource ID, stores repository_id and uses diffRepository for renames.

@acouvreur acouvreur closed this Sep 24, 2026
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 Type: Maintenance Any dependency, housekeeping, and clean up Issue or PR vNext

Projects

Development

Successfully merging this pull request may close these issues.

[BUG]: github_repository_collaborators error on repository rename

3 participants