Pull requests
Write the title and description for your branch, and open it.
On a feature branch, gitmit pr writes a pull request title and description from the branch's commits and its overall diff:
$ gitmit pr
3 commits on feat/password-reset, compared with origin/main
Pull request
feat(auth): add password reset via emailed link
## Summary
Users who forget their password can now request a reset link by email.
The link expires after an hour and can only be used once.
## Changes
- Add `POST /auth/reset` and `POST /auth/reset/confirm`
- Store hashed reset tokens with an expiry
- Cover the happy path and expired tokens in tests
## How to test
- Request a reset for an existing account and open the emailed link
- Try the same link twice; the second attempt is rejected
● What next?
│ ● Create the pull request on GitHub
│ ○ Create it as a draft
│ ○ Copy to clipboard
│ ○ Edit in your editor
│ ○ Write a new version
│ ○ Done
- The base branch is the remote's default branch (
origin/HEAD), falling back tomainormaster. Pick another with--base develop. - The title follows the same rules as a commit header: your types, scopes, length limit, ticket ID and commitlint config. When the pull request is squash-merged, it becomes a good commit message.
- Your template is used. If the repository has a pull request template (
.github/pull_request_template.md, in the root, indocs/, or in.github/PULL_REQUEST_TEMPLATE/), gitmit fills it in instead of using its own sections. - Creating the pull request uses GitHub's CLI.
gitmit pr --createpushes the branch (setting its upstream if needed) and runsgh pr create. If a pull request is already open for the branch, usegitmit pr --updateto replace its title and description. Withoutgh, copy the text instead. - Offline, the title comes from the rules and the description lists the branch's commits.
- Secrets are scanned for before anything is sent, exactly as for commits. Use
--redactto send a redacted version instead of stopping.