Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOCS]: Update docs to recommend the use of team ID over team slug #2421

Open
1 task done
stevehipwell opened this issue Oct 11, 2024 · 4 comments
Open
1 task done
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone Type: Documentation Improvements or additions to documentation

Comments

@stevehipwell
Copy link
Contributor

Describe the need

If the team ID is used there is no need to call the API to lookup the ID from the slug as it's already in state. It also removes the danger that a team might be created with a numeric name which would be confused for an ID.

It might also be worth discussing removing support for using the slug in the next major version to remove this confusion.

SDK Version

No response

API Version

No response

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@stevehipwell stevehipwell added Status: Triage This is being looked at and prioritized Type: Documentation Improvements or additions to documentation labels Oct 11, 2024
@kfcampbell kfcampbell added Status: Up for grabs Issues that are ready to be worked on by anyone and removed Status: Triage This is being looked at and prioritized labels Oct 11, 2024
@kfcampbell
Copy link
Member

Are you referring to the github_repository_collaborators resource edited in #2420 specifically here, or a blanket change for the provider?

@stevehipwell
Copy link
Contributor Author

A blanket recommendation based on how getTeamID() works.

@stevehipwell
Copy link
Contributor Author

It might also be worth discussing removing support for using the slug in the next major version to remove this confusion.

@kfcampbell this could be augmented by adding support for a mutually exclusive (to team_id) input team_slug to relevant resources. If added as part of a minor version use of slug via team_id could warn until the next major release when support could be removed.

@stevehipwell
Copy link
Contributor Author

@kfcampbell after looking at the REST API docs I can see that the team ID endpoints are deprecated. I'll take a look at what it'd take to implement team_slug as a provider wide alternative with both paths being optimised so as to not add additional API calls.

Based on the current code we should still document that when setting team_id the actual ID should be prefered over the slug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone Type: Documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants