Skip to content

GHOrganization.createTeam now adds team to specified repositories#578

Merged
bitwiseman merged 4 commits into
hub4j:masterfrom
martinvanzijl:issue_457_create_team_with_repo_access_fix
Nov 1, 2019
Merged

GHOrganization.createTeam now adds team to specified repositories#578
bitwiseman merged 4 commits into
hub4j:masterfrom
martinvanzijl:issue_457_create_team_with_repo_access_fix

Conversation

@martinvanzijl
Copy link
Copy Markdown
Contributor

@martinvanzijl martinvanzijl commented Oct 29, 2019

Fixes #457.

The full path to the repository needs to be given (e.g. "organization-name/repository-name").

GHRepository repo = org.getRepository(REPO_NAME);

// Clean up team if exists.
GHTeam existingTeam = org.getTeamByName(TEAM_NAME);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be done in a @Before method using githubBeforeAfter connection.
https://github.com/github-api/github-api/pull/579/files#diff-ed97d1edac0ae3acc074e2e907870717R23

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I have moved it now. Can you please check?

Copy link
Copy Markdown
Member

@bitwiseman bitwiseman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PRs!

@bitwiseman bitwiseman merged commit 5026262 into hub4j:master Nov 1, 2019
@martinvanzijl martinvanzijl deleted the issue_457_create_team_with_repo_access_fix branch November 2, 2019 02:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: GHOrganization::createTeam does not regard argument repositories

2 participants