github-api icon indicating copy to clipboard operation
github-api copied to clipboard

Documentation for create Branch and PR for new changes in branch

Open riddhi2910 opened this issue 5 years ago • 2 comments

Hello,

I don't see enough documentation on how to create branch and then pull requests for changes in that branch.

Could you please help me with that?

riddhi2910 avatar May 26 '20 22:05 riddhi2910

Please feel free to ask questions at https://gitter.im/hub4j/github-api

bitwiseman avatar May 27 '20 15:05 bitwiseman

Here's an example in a test for creating a branch:

  • Create a commit
  • Create a ref for that commit under refs/heads

https://github.com/hub4j/github-api/blob/f6e8a2c7c604274e0dad5deeb33380320d82d8a2/src/test/java/org/kohsuke/github/GHBranchTest.java#L42-L45

Creating a pull request for a branch:

https://github.com/hub4j/github-api/blob/f6e8a2c7c604274e0dad5deeb33380320d82d8a2/src/test/java/org/kohsuke/github/GHPullRequestTest.java#L33-L36

It would be great to have someone make some documentation.

bitwiseman avatar Jul 19 '21 23:07 bitwiseman