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
Modify github_team_repository to accept team slug as well as team id #675
We have a use case where we would like users to add teams to their repos, and having them being able to do so through a slug rather than an id would make the configuration more readable.
This would be a similar change to the github_branch_protection resource taking in either a Node ID or name of a repository.
I was thinking about adding a piece of logic that would try to find the team ID if the given team ID is not an integer (in which case we assume that the user has passed in a slug instead of an ID).
*There is an edge case where a user tries to add a team repository resource with a team name composed of an integer (123), in which case the provider would assume that the user passed in a team id rather than a team slug.
Reacted by jimsmith, Iiro Niinikoski, Zoltán Reegn, J.R. Mash and Wes Novack
Also, has there been any discussion or thought of applying this as a generic pattern, i.e. accepting a slug/name anywhere an ID is currently required, wherever possible (e.g. #802)? I have a specific use case in mind, but it would be nice to do this consistently. (I might open another issue or PR if it makes sense to anyone else but myself.) Thanks!
Activity
usmonster commentedon May 20, 2021
Hello! Hasn't this been closed by #693?
Also, has there been any discussion or thought of applying this as a generic pattern, i.e. accepting a slug/name anywhere an ID is currently required, wherever possible (e.g. #802)? I have a specific use case in mind, but it would be nice to do this consistently. (I might open another issue or PR if it makes sense to anyone else but myself.) Thanks!