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

Create RepositoryBranchesClient #1437

Merged

Conversation

ryangribble
Copy link
Contributor

In preparation for #1407 this PR creates a new "Branches" client as a child of "Repositories", inline with the GitHub API layout. Existing branch related methods are moved under this client, with the old methods marked as [Obsolete]

client.Repository.GetBranch() => client.Repository.Branch.Get()
client.Repository.GetAllBranches() => client.Repository.Branch.GetAll()
client.Repository.GetBranch() => client.Repository.Branch.Edit()

Once this is merged, I will work on the new branch protection related methods for #1407

@ryangribble
Copy link
Contributor Author

Looks like all the tests passing, just needs some 👀 from someone before merging

@shiftkey shiftkey self-assigned this Aug 5, 2016
@shiftkey
Copy link
Member

shiftkey commented Aug 5, 2016

@ryangribble added to my list

@BigAlInTheHouse
Copy link

Get in contact with me when you're ready thks
On Aug 4, 2016 11:40 PM, "Brendan Forster" [email protected] wrote:

@ryangribble https://github.com/ryangribble added to my list


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#1437 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AHT9JcS7AHraiC8uOvi9-U5JBrgTIexIks5qcr6YgaJpZM4JcXjT
.

public Task<IReadOnlyList<Branch>> GetAllBranches(string owner, string name)
{
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
Ensure.ArgumentNotNullOrEmptyString(name, "name");

return GetAllBranches(owner, name, ApiOptions.None);

Copy link
Contributor

Choose a reason for hiding this comment

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

Unnecessary whitespace 😀

@hnrkndrssn
Copy link
Contributor

Other than some superfluous whitespace, this looks good to me 👍

@ryangribble
Copy link
Contributor Author

whitespace fixed, thanks 😀

@ryangribble ryangribble force-pushed the create-repositorybranches-client branch from df783bc to 7b0acb1 Compare August 8, 2016 07:37
@hnrkndrssn
Copy link
Contributor

hnrkndrssn commented Aug 8, 2016

I've run through all the tests locally and it's all 💚 I'm happy with these changes 😁

@ryangribble ryangribble merged commit ef0da2f into octokit:master Aug 8, 2016
@ryangribble ryangribble deleted the create-repositorybranches-client branch August 8, 2016 12:00
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