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

Support "Rename a branch" #2118

Closed
vlsokol opened this issue Oct 6, 2021 · 5 comments · Fixed by #2119
Closed

Support "Rename a branch" #2118

vlsokol opened this issue Oct 6, 2021 · 5 comments · Fixed by #2119

Comments

@vlsokol
Copy link
Contributor

vlsokol commented Oct 6, 2021

Is there a plan for adding branch renaming feature: https://docs.github.com/en/rest/reference/repos#rename-a-branch?

@gmlewis
Copy link
Collaborator

gmlewis commented Oct 6, 2021

Yes indeed, and thank you @vlsokol for the report... it looks like we haven't implemented it yet.

This would be a great PR for any new contributor to this repo or a new Go developer.
All contributions are greatly appreciated!

Feel free to volunteer for any issue and the issue can be assigned to you so that others don't attempt to duplicate the work.

Please check out our CONTRIBUTING.md guide to get started. (In particular, please remember to go generate ./... and don't use force-push to your PRs.)

Thank you!

@tamboliasir1
Copy link
Contributor

could you give a bit of an insight or how to start with it? If I get a little help, I guess I will be able to work on it. This will be my first PR.

@gmlewis
Copy link
Collaborator

gmlewis commented Oct 6, 2021

could you give a bit of an insight or how to start with it? If I get a little help, I guess I will be able to work on it. This will be my first PR.

Sure. First, I recommend you browse around the code base... you will see a lot of very common patterns throughout this repo.

Then, I strongly recommend that you give our CONTRIBUTING.md guide a good read... as we try to put useful information there for getting started.

Then, find the location where you think this endpoint should be placed, based upon the surrounding endpoints.
Maybe immediately before GetBranchProtection in github/repos.go would be a good place.

Then fully read the (above-linked) GitHub API v3 docs for this endpoint and make sure you understand it.

Implement the endpoint based upon examples you see throughout the same file.

Implement the unit test(s) similarly in github/repos_test.go.

Feel free to ask questions if you get stuck.

Good luck, and thank you!

@tamboliasir1
Copy link
Contributor

@vlsokol Did you resolved issue? Should I work on it?

@vlsokol
Copy link
Contributor Author

vlsokol commented Oct 11, 2021

@tamboliasir1, resolved - #2119. Waiting for it to be merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants