Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/privatenumber/generate-batched-pr-manifest

Generate a manifest of all the PRs included in a batched PR
https://github.com/privatenumber/generate-batched-pr-manifest

batched manifest pr

Last synced: about 1 month ago
JSON representation

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

Awesome Lists containing this project

README

        

# 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](https://cli.github.com/) to be installed

```sh
# Enter the GitHub repository directory
$ cd

$ npx generate-batched-pr-manifest

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

```sh
# Enter the GitHub repository directory
$ cd

$ npx generate-batched-pr-manifest --update

# Pull requests
- https://github.com/my-repo/project/pull/1234
...
```

The PR title will be set to: `batch: ( PRs)`

The PR body will be set to:

```
# Pull requests
-
- ...
- ...
```

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