You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG]: github_repository_collaborators error on repository rename #2874
@acouvreur We've built up the pattern of how renaming works best for the resources. The gist of it is: use repo name ad the configuration variable, but carry a computed repo ID inside the resource. If name changes, but ID doesn't => rename, not recreating
@acouvreur We've built up the pattern of how renaming works best for the resources. The gist of it is: use repo name ad the configuration variable, but carry a computed repo ID inside the resource. If name changes, but ID doesn't => rename, not recreating
I think that makes sense, this should be the default for all resources.
Use the GitHub API input which uses the resources name, but store the database ID to detect if the resource was renamed.
@acouvreur in the case of the github_repository_collaborators resource the resource ID should be the repository ID as it has a 1-to-1 mapping to a GH entity with a global ID. We'll still be adding a computed repository_id so we don't recreate the resource on a rename as part of #3068 (or I may break those changes up into smaller PRs).
@acouvreur in the case of the github_repository_collaborators resource the resource ID should be the repository ID as it has a 1-to-1 mapping to a GH entity with a global ID. We'll still be adding a computed repository_id so we don't recreate the resource on a rename as part of #3068 (or I may break those changes up into smaller PRs).
Perfect! @stevehipwell is there anything I can do to help you merge this feature ?
Activity
acouvreur commentedon Nov 7, 2025
I have created a first draft for this change: #2876
However, I don't think making API calls should be part of a refresh strategy when we can simply replace
repositorywithrepository_id.Then, when adding or removing the collaborators, query the repository name because the API does not provide such call through repository ID.
acouvreur commentedon Nov 7, 2025
Another even simpler solution is to swallow 404 errors not found on deletion when calling client.Repositories.RemoveCollaborator
stevehipwell commentedon Nov 13, 2025
@acouvreur is there a reason you can't use the Mutable Identities field?
acouvreur commentedon Nov 13, 2025
I was not aware of it! I'll take a look into it
deiga commentedon Feb 2, 2026
@stevehipwell Would your PR #3068 be solving this issue?
stevehipwell commentedon Feb 2, 2026
@deiga yes.
acouvreur commentedon Feb 11, 2026
Are you sure ?
The expected fix is that the
github_repository_collaboratorsresource should be the repository ID instead of the repository name.Currently we have the following issue by having the repository name as ID:
Consider that a repository name was just changed.
This forces the deletion and then recreate the collaborators for the same repository.
This creates a lot of churns, the resource cannot be cleaned up.
deiga commentedon Feb 11, 2026
@acouvreur We've built up the pattern of how renaming works best for the resources. The gist of it is: use repo name ad the configuration variable, but carry a computed repo ID inside the resource. If name changes, but ID doesn't => rename, not recreating
acouvreur commentedon Feb 17, 2026
I think that makes sense, this should be the default for all resources.
Use the GitHub API input which uses the resources name, but store the database ID to detect if the resource was renamed.
stevehipwell commentedon Feb 18, 2026
@acouvreur in the case of the
github_repository_collaboratorsresource the resource ID should be the repository ID as it has a 1-to-1 mapping to a GH entity with a global ID. We'll still be adding a computedrepository_idso we don't recreate the resource on a rename as part of #3068 (or I may break those changes up into smaller PRs).acouvreur commentedon Feb 24, 2026
Perfect! @stevehipwell is there anything I can do to help you merge this feature ?
stevehipwell commentedon Feb 26, 2026
@acouvreur do you want to take a look at #3233?