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

Repository Invitations Changes #1399

Closed
ryangribble opened this issue Jun 19, 2016 · 3 comments · Fixed by #1410
Closed

Repository Invitations Changes #1399

ryangribble opened this issue Jun 19, 2016 · 3 comments · Fixed by #1410
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone

Comments

@ryangribble
Copy link
Contributor

Summary

Recently announced on this blog post, Repository Invitations are now in preview in the GitHub API with changes in the following areas:

Repository Collaborators API
Repository Invitations API (new)

Repository Collaborators

Adding a collaborator can now send an invite to the collaborator rather than directly adding them.

In octokit.net this could be implemented by copying the Add() to create an Invite() function (and setting the new preview accepts header on the Http Post call in the Invite() call).

Managing Invitations

A new Invitations API has been added to Repositories

In octokit.net this should be implemented as IRepositoryInivtationsClient and be a sub client of the IRepositoriesClient accessed by GitHubClient.Repository.Invitation with methods

  • GetAll()
    GET /repositories/:repo_id/invitations
  • Delete()
    DELETE /repositories/:repo_id/invitations/:invitation_id
  • Update()
    PATCH /repositories/:repo_id/invitations/:invitation_id
  • GetAllForCurrent()
    GET /user/repository_invitations
  • Accept()
    PATCH /user/repository_invitations/:invitation_id
  • Decline()
    DELETE /user/repository_invitations/:invitation_id

Reminder that like all functionality in "preview mode" a custom accepts header needs to be specified (see AcceptHeaders.cs)

To access the API during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.swamp-thing-preview+json

Working on this issue

This issue has been flagged as up-for-grabs as it is a reasonably easy issue for a new contributor to pick up, and be guided through the process of contributing to octokit
(that said, if an existing contributor wants to work on this, by all means go for it!)

Please comment here if you want to take this issue.

Please read and follow the CONTRIBUTING guide guide and if you need any help, just ask! Don't be afraid to open a [WIP] (work in progress) Pull Request once you've started implementing the changes

@martinscholz83
Copy link
Contributor

Hi @ryangribble , i would take this issue.

@martinscholz83
Copy link
Contributor

Hi @ryangribble @shiftkey i'm almost finished with this issue. There is one strange thing with this api. I have create an integration test to send an invitation. The callback from the api ist fine, but it sends no invitation (email). I have tested this also with a real example. Can you confirm this behavior?

@shiftkey
Copy link
Member

@maddin2016 it'd be much easier to investigate the behaviour when the code is handy - let's look into that after opening the PR...

@nickfloyd nickfloyd added Status: Up for grabs Issues that are ready to be worked on by anyone and removed up-for-grabs labels Oct 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants