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

Get Team By Name implementation #2717

Merged
merged 6 commits into from
Jun 22, 2023
Merged

Get Team By Name implementation #2717

merged 6 commits into from
Jun 22, 2023

Conversation

dylan-asos
Copy link
Contributor

@dylan-asos dylan-asos commented May 21, 2023

Resolves #2716

Introduces a new method that allows using the API endpoint to get a team by slug name. In certain integration scenarios, other systems might know a team name that's common between systems, but not know the GitHub ID. This allows retrieving a team instance from the API without needing to work out the ID first.

Behaviour

Before the change?

NA - new feature

After the change?

New method on Teams Client that supports getting a team by slug name

Other information

It's the callers responsibility to provide the appropriately formed team slug name to the method, this PR provides no functionality to achieve that.

Whilst there are rules for forming the slug (all lower case, spaces replaced by hyphens, special chars removed etc) this is non-deterministic depending on the state of the organisation ( for example if there are multiple teams with the same name in an org), and therefore cannot be reliably implemented in a client SDK.


Additional info

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)
  • Added the appropriate label for the given change

Does this introduce a breaking change?

Please see our docs on breaking changes to help!

  • Yes (Please add the Type: Breaking change label)
  • No

If Yes, what's the impact:

  • N/A

Pull request type

Please add the corresponding label for change this PR introduces:

  • Feature/model/API additions: Type: Feature

@dylan-asos dylan-asos changed the title Get Team By Name implementation [WIP] Get Team By Name implementation May 21, 2023
@dylan-asos dylan-asos changed the title [WIP] Get Team By Name implementation Get Team By Name implementation May 24, 2023
@dylan-asos dylan-asos marked this pull request as ready for review May 24, 2023 09:33
@kfcampbell kfcampbell added the Type: Feature New feature or request label May 31, 2023
Copy link
Member

@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.

Thank you for contributing!

@kfcampbell kfcampbell merged commit b4b3534 into octokit:main Jun 22, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[FEAT]: Get Team By Name
2 participants