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

[#714]Fix query parameter construction of org member filter #715

Merged
merged 5 commits into from
Feb 25, 2020

Conversation

Sage-Pierce
Copy link
Contributor

@Sage-Pierce Sage-Pierce commented Feb 24, 2020

Description

Taking a stab at what's mentioned in #714

  • Push your changes to a branch other than master. Create your PR from that branch.
  • Add JavaDocs and other comments
  • Write tests that run and pass in CI. See CONTRIBUTING.md for details on how to capture snapshot data.
  • Run mvn -D enable-ci clean install site locally. This may reformat your code, commit those changes. If this command doesn't succeed, your change will not pass CI.

@bitwiseman bitwiseman self-requested a review February 24, 2020 22:52
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.

@Sage-Pierce
This looks really good. Minor additions needed.

public void testListMembersWithRole() throws IOException {
GHOrganization org = gitHub.getOrganization(GITHUB_API_TEST_ORG);

List<GHUser> admins = org.listMembersWithRole("admin").asList();
Copy link
Member

Choose a reason for hiding this comment

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

The bug was for listMembersWithFilter. Can you add a test for that as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!


List<GHUser> admins = org.listMembersWithRole("admin").asList();

assertFalse(admins.isEmpty());
Copy link
Member

@bitwiseman bitwiseman Feb 25, 2020

Choose a reason for hiding this comment

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

Go ahead and be specific about size and who is in the list. A check for non-empty list is not going to be enough to ensure this doesn't break in the future.

@bitwiseman bitwiseman merged commit 5ac65aa into hub4j:master Feb 25, 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.

2 participants