capabilities.work

Propose a Change via Pull Request

A 4-step recipe with GitHub. We can help you get access.

Recipe · 4 steps

Propose a Change via Pull Request

with GitHub · Software Construction Management

Create a branch, commit a file, then open a pull request for it.

  1. Read the base branch reference to obtain its commit SHA.
  2. Create the new branch reference from the base commit SHA.
  3. Commit the file onto the new branch.
  4. Open a pull request from the new branch back to the base branch so the committed change can be reviewed.
What you'll need to have ready
  • githubToken: A GitHub token with repo scope, passed as a Bearer credential.
  • owner: The account owner of the repository.
  • repo: The name of the repository.
  • baseBranch: The base branch to branch from and target with the pull request.
  • newBranch: The new branch name to create, without the heads/ prefix.
  • path: The repository path of the file to create.
  • message: The commit message.
  • contentBase64: The new file content, Base64 encoded.
  • prTitle: The title of the pull request.
  • prBody: The body of the pull request.
For your developer

Arazzo workflow github:propose-change-pull-request, 4 operations: git/get-ref → git/create-ref → repos/create-or-update-file-contents → pulls/create. Specs on APIs.io.