generate-batched-pr-manifest

1.1.0 • Public • Published

generate-batched-pr-manifest

Generate a manifest of all the PRs included in a batched PR.

Why?

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.

Usage

⚠️ 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

Update the PR title & description

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>
- ...
- ...

What does this script do?

  1. Fetches the commits from the provided batched PR
  2. 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.
  3. Filters out closed PRs and duplicates
  4. Update the PR title & description if --update is provided
  5. Log manifest to the console

Readme

Keywords

Package Sidebar

Install

npm i generate-batched-pr-manifest

Weekly Downloads

0

Version

1.1.0

License

MIT

Unpacked Size

65.5 kB

Total Files

4

Last publish

Collaborators

  • hirokiosame