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

Added ability to specify permissions for collaborators #675

Merged
merged 23 commits into from
Feb 13, 2020

Conversation

jimmysombrero
Copy link
Contributor

Modified the addCollaborators methods to require a GHOrganization.Permission parameter in order allow the API to add external collaborators with varying levels of permissions. Added a second modifyCollaborators method with a signature that accepts a GHOrganization.Permission parameter.

@jimmysombrero
Copy link
Contributor Author

Running mvn formatter:format refuses to format the file

@bitwiseman
Copy link
Member

Hm, not sure why the formatting isn't happening. Have you tried mvn clean install?

Copy link
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 submission.
Good start (now that I can see the change. :)
We'll need tests for these new methods as well.

src/main/java/org/kohsuke/github/GHRepository.java Outdated Show resolved Hide resolved
src/main/java/org/kohsuke/github/GHRepository.java Outdated Show resolved Hide resolved
src/main/java/org/kohsuke/github/GHRepository.java Outdated Show resolved Hide resolved
src/main/java/org/kohsuke/github/GHRepository.java Outdated Show resolved Hide resolved
src/main/java/org/kohsuke/github/GHRepository.java Outdated Show resolved Hide resolved
@bitwiseman
Copy link
Member

@jimmysombrero
Are you working on windows? Just wondering.
Also do you have time to write tests?

@jimmysombrero
Copy link
Contributor Author

@jimmysombrero
Are you working on windows? Just wondering.
Also do you have time to write tests?

I was working in Windows, but switched to my Mac, which fixed the formatting issues I was having. My weekend project for this weekend is to add the missing methods back and write tests for the new methods. I was trying to wrap my head around how the json configuration files for WireMock are created then decided to follow the instructions in CONTRIBUTING.md and see what happens.

@bitwiseman
Copy link
Member

If following the CONTRIBUTING doesn't basically "just work", I'm committed to fixing it. That's what it's there for. 😄

Copy link
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 adding the test.
I realize I've given another round of suggestions/questions - I don't like making people go around more than once.
Now that we have a test, if you don't have time to address my comment, I'm willing to finish this PR up. It is up to you.

src/main/java/org/kohsuke/github/GHRepository.java Outdated Show resolved Hide resolved
src/main/java/org/kohsuke/github/GHRepository.java Outdated Show resolved Hide resolved
src/main/java/org/kohsuke/github/GHRepository.java Outdated Show resolved Hide resolved
src/main/java/org/kohsuke/github/GHRepository.java Outdated Show resolved Hide resolved
src/main/java/org/kohsuke/github/GHRepository.java Outdated Show resolved Hide resolved
jimmysombrero and others added 3 commits February 7, 2020 21:13
updated javadoc comments for addCollaborators methods
combined both modifyCollaborators methods into one method
updated addColloaborators test to match new method signature
@bitwiseman bitwiseman merged commit dabb8fe into hub4j:master Feb 13, 2020
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.

None yet

2 participants