A single file can be committed by using one of the GHRepository.createContent() methods.
In order to commit multiple files, the following steps have to be taken:
- Get the SHA of the latest commit on the branch
- Get the tree information for that commit
- Create a new tree for your commit
- Create the commit
- Link commit to the reference
The operations in steps 3 and 4 are currently not suppported by github-api. They involve:
Do you find the addition of these operations useful? If yes, I will create a PR for this.
A single file can be committed by using one of the GHRepository.createContent() methods.
In order to commit multiple files, the following steps have to be taken:
The operations in steps 3 and 4 are currently not suppported by github-api. They involve:
Do you find the addition of these operations useful? If yes, I will create a PR for this.