Generate a manifest of all the PRs included in a batched PR.
In some projects, multiple PRs are deployed together to minimize CI runs or deploys.
However, when the PRs are aggregated in a batched PR, it can be hard to see what PRs are included in the batch.
This tool generates a manifest of all the PRs that are included in a batched PR.
You can add it to the PR description so it's easy to see what PRs are included in the batch.
⚠️ Requires GitHub CLI to be installed
# Enter the GitHub repository directory
$ cd <repo>
$ npx generate-batched-pr-manifest <batched pr number>
# Pull requests
- https://github.com/my-repo/project/pull/1234
- https://github.com/my-repo/project/pull/1235
- https://github.com/my-repo/project/pull/1236
Automatically the PR title & description with the manifest.
# Enter the GitHub repository directory
$ cd <repo>
$ npx generate-batched-pr-manifest <batched pr number> --update
# Pull requests
- https://github.com/my-repo/project/pull/1234
...
The PR title will be set to: batch: <ISO date> (<number of PRs> PRs)
The PR body will be set to:
# Pull requests
- <PR URL>
- ...
- ...
- Fetches the commits from the provided batched PR
- Searches the repository for PRs that include commits from the batched PR and either has the same base branch or the base branch set to the batched PR.
- Filters out closed PRs and duplicates
- Update the PR title & description if
--update
is provided - Log manifest to the console