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

Add new methods from the most recent org memberships API enhancements #841

Merged
merged 15 commits into from
Dec 1, 2016

Conversation

LizzHale
Copy link
Contributor

@LizzHale LizzHale commented Nov 28, 2016

This PR adds the new methods for the most recent org memberships API enhancements.

  • list organization invitations endpoint method
  • list team invitations endpoint method
  • list outside collaborators endpoint method
  • remove outside collaborator endpoint method
  • convert org member to outside collaborator endpoint method
  • get permission level endpoint method

In addition, I also updated the documentation to include new parameters for existing methods.

  • maintainer parameter to the create team method
  • affiliation parameter to the collaborators method
  • default_repository_permission and members_can_create_repositories to the update organization method

I ran into one snag while creating the permission level endpoint method test. The tests timed out when creating a new cassette in the repositories spec when the before block creates a repository with test_github_repository because of a loop here. I ended up putting my test under this context which doesn't utilize the test_github_repository name but I think the test makes more sense with the tests in the other context.

/cc @pengwynn @joeyw for review
/cc @NadaAldahleh @hktouw for awareness

Closes #711

@coveralls
Copy link

coveralls commented Nov 28, 2016

Coverage Status

Coverage increased (+0.005%) to 99.33% when pulling 86477b6 on LizzHale:org-membership-apis into c1d8b83 on octokit:master.

Copy link
Member

@tarebyte tarebyte left a comment

Choose a reason for hiding this comment

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

Let one comment about an alias, but overall looks good to me @LizzHale!

def organization_invitations(org, options = {})
options = ensure_api_media_type(:org_memberships, options)
get "#{Organization.path org}/invitations", options
end
Copy link
Member

Choose a reason for hiding this comment

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

Since we support aliases for the other organization methods, what do you think about supporting:

alias :org_invitations :organization_invitations

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed -- added in 4dd9c28

@coveralls
Copy link

coveralls commented Nov 29, 2016

Coverage Status

Coverage increased (+0.005%) to 99.33% when pulling 4dd9c28 on LizzHale:org-membership-apis into c1d8b83 on octokit:master.

@tarebyte
Copy link
Member

tarebyte commented Dec 1, 2016

Thanks for doing this @LizzHale!

@tarebyte tarebyte merged commit 7c2d36f into octokit:master Dec 1, 2016
@LizzHale LizzHale deleted the org-membership-apis branch December 2, 2016 01:28
@Udayrajkushwah
Copy link

While pushing the code to different user git hub repository, getting below error
Can't connect to any repository: https://github.com/Sharmahuron/myfirstdeomo1.git (https://github.com/Sharmahuron/myfirstdeomo1.git: git-receive-pack not permitted on 'https://github.com/Sharmahuron/myfirstdeomo1.git/')
Could you please let me know how to resolve this issue

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.

4 participants