Creating pull requests
Once you're finished building, Graphite makes it easy to create pull requests from the branches in your stack.
Let's say you're back in our demo repo:
Let's check out review_queue_frontend and submit the entire stack of 3 branches to GitHub with Graphite:
1
# checkout review_queue_frontend
2
gt bco tr-PK31--review_queue_frontend
3
4
# submit the stack to GitHub
5
gt stack submit
Copied!
gt stack submit gives you interactive prompts to help you create pull requests for each branch:
Edit the PR title
Edit the PR body
You can configure which text editor to use with Graphite for the PR body by running the command gt user editor --set <editor>(i.e. gt user editor --set vim).
If you have a pull request template saved locally for GitHub, Graphite will automatically detect it and add it to the PR for you to fill out.
You can optionally pass --reviewers or -r to manually specify reviewers for the new pull requests. By default, Graphite will just assign any reviewers specified by CODEOWNERS files in your repo.
Once you've created pull requests from your stack, Graphite will display the links to view them on the Graphite web dashboard:
When running submit for the first time on a stack, or a successive time to push updates, you can use the --draft/--no-draft boolean flag to toggle the draft status of PRs in your stack. For example, you might open your PRs initially in draft mode, and then later run gt stack submit --no-draft to change all PRs in your stack to "ready for review."
Now that you can create pull requests from your stack, you can sync your local repo with remote and keep your stacks up-to-date.
Export as PDF
Copy link