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

Protected Branches Preview API Update - granular methods #1442

Closed
ryangribble opened this issue Aug 10, 2016 · 3 comments · Fixed by #1443
Closed

Protected Branches Preview API Update - granular methods #1442

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

Comments

@ryangribble
Copy link
Contributor

ryangribble commented Aug 10, 2016

#1407 covers implementing the top level branch protection methods after the Branch Protection preview API update.

This issue is raised as a reminder to implement the remaining more granular methods if/when requested/desired

        Task<BranchProtectionRequiredStatusChecks> GetRequiredStatusChecks(string owner, string name, string branch);
        Task<BranchProtectionRequiredStatusChecks> GetRequiredStatusChecks(int repositoryId, string branch);
        Task<BranchProtectionRequiredStatusChecks> UpdateRequiredStatusChecks(string owner, string name, string branch, BranchProtectionRequiredStatusChecks update);
        Task<BranchProtectionRequiredStatusChecks> UpdateRequiredStatusChecks(int repositoryId, string branch, BranchProtectionRequiredStatusChecks update);
        Task<bool> DeleteRequiredStatusChecks(string owner, string name, string branch);
        Task<bool> DeleteRequiredStatusChecks(int repositoryId, string branch);

        Task<IReadOnlyList<string>> GetRequiredStatusCheckContexts(string owner, string name, string branch);
        Task<IReadOnlyList<string>> GetRequiredStatusCheckContexts(int repositoryId, string branch);
        Task<IReadOnlyList<string>> UpdateRequiredStatusCheckContexts(string owner, string name, string branch, IReadOnlyList<string> contexts);
        Task<IReadOnlyList<string>> UpdateRequiredStatusCheckContexts(int repositoryId, string branch, IReadOnlyList<string> contexts);
        Task<IReadOnlyList<string>> AddRequiredStatusCheckContext(string owner, string name, string branch, string context);
        Task<IReadOnlyList<string>> AddRequiredStatusCheckContext(int repositoryId, string branch, string context);
        Task<IReadOnlyList<string>> DeleteRequiredStatusCheckContext(string owner, string name, string branch, string context);
        Task<IReadOnlyList<string>> DeleteRequiredStatusCheckContext(int repositoryId, string branch, string context);

        Task<ProtectedBranchRestrictions> GetProtectedBranchRestrictions(string owner, string name, string branch);
        Task<ProtectedBranchRestrictions> GetProtectedBranchRestrictions(int repositoryId, string branch);
        Task<bool> DeleteProtectedBranchRestrictions(string owner, string name, string branch);
        Task<bool> DeleteProtectedBranchRestrictions(int repositoryId, string branch);

        Task<IReadOnlyList<Team>> GetProtectedBranchTeamRestrictions(string owner, string name, string branch);
        Task<IReadOnlyList<Team>> GetProtectedBranchTeamRestrictions(int repositoryId, string branch);
        Task<IReadOnlyList<Team>> SetProtectedBranchTeamRestrictions(string owner, string name, string branch, IReadOnlyList<string> teams);
        Task<IReadOnlyList<Team>> SetProtectedBranchTeamRestrictions(int repositoryId, string branch, IReadOnlyList<string> teams);
        Task<IReadOnlyList<Team>> AddProtectedBranchTeamRestriction(string owner, string name, string branch, string team);
        Task<IReadOnlyList<Team>> AddProtectedBranchTeamRestriction(int repositoryId, string branch, string team);
        Task<IReadOnlyList<Team>> DeleteProtectedBranchTeamRestriction(string owner, string name, string branch);
        Task<IReadOnlyList<Team>> DeleteProtectedBranchTeamRestriction(int repositoryId, string branch);

        Task<IReadOnlyList<User>> GetProtectedBranchUserRestrictions(string owner, string name, string branch);
        Task<IReadOnlyList<User>> GetProtectedBranchUserRestrictions(int repositoryId, string branch);
        Task<IReadOnlyList<User>> SetProtectedBranchUserRestrictions(string owner, string name, string branch, IReadOnlyList<string> users);
        Task<IReadOnlyList<User>> SetProtectedBranchUserRestrictions(int repositoryId, string branch, IReadOnlyList<string> users);
        Task<IReadOnlyList<User>> AddProtectedBranchUserRestriction(string owner, string name, string branch, string user);
        Task<IReadOnlyList<User>> AddProtectedBranchUserRestriction(int repositoryId, string branch, string user);
        Task<IReadOnlyList<User>> DeleteProtectedBranchUserRestriction(string owner, string name, string branch);
        Task<IReadOnlyList<User>> DeleteProtectedBranchUserRestriction(int repositoryId, string branch);
@ryangribble ryangribble changed the title Protected Branches preview API Update - granular methods Protected Branches Preview API Update - granular methods Aug 10, 2016
@martinscholz83
Copy link
Contributor

martinscholz83 commented Aug 11, 2016

wow

That's a lot. I will see what i can do if it's ok.

@martinscholz83
Copy link
Contributor

Should i wait until #1441 is merged before to start?

@ryangribble
Copy link
Contributor Author

Yes you should do any changes on top of those changes but you can just branch from my branch (ie don't have to wait for it to be merged)

@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.

3 participants