# pull-request-vir

> GitHub Action for pull requests

Latest version **1.8.5** (published 2026-10-16) · (MIT OR CC0-1.0) license · 0 weekly downloads

## Install

```sh
npm install pull-request-vir
pnpm add pull-request-vir
yarn add pull-request-vir
bun add pull-request-vir
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.8.5 |
| Published | 2026-10-16 |
| First published | 2023-10-25 |
| Weekly downloads | 0 |
| License | (MIT OR CC0-1.0) |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=22 |
| Dependencies | 14 |
| Unpacked size | 85.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | electrovir |
| Maintainers | electrovir |
| Keywords | github, actions, pull request, review, automated |

## Links

- npm: https://www.npmjs.com/package/pull-request-vir
- Repository: https://github.com/electrovir/pull-request-vir
- Issues: https://github.com/electrovir/pull-request-vir/issues
- npm.io page: https://npm.io/package/pull-request-vir

## Dependencies (14)

- [tsx](https://npm.io/package/tsx.md) ^4.23.15
- [date-vir](https://npm.io/package/date-vir.md) ^9.4.0
- [simple-git](https://npm.io/package/simple-git.md) ^4.0.2
- [typescript](https://npm.io/package/typescript.md) ^6.0.3
- [@actions/core](https://npm.io/package/@actions/core.md) ^3.0.1
- [@octokit/core](https://npm.io/package/@octokit/core.md) ^7.0.8
- [@octokit/rest](https://npm.io/package/@octokit/rest.md) ^22.0.1
- [@actions/github](https://npm.io/package/@actions/github.md) ^9.1.1
- [@augment-vir/node](https://npm.io/package/@augment-vir/node.md) ^32.5.0
- [@review-vir/common](https://npm.io/package/@review-vir/common.md) ^3.1.6
- [@augment-vir/assert](https://npm.io/package/@augment-vir/assert.md) ^32.5.0
- [@augment-vir/common](https://npm.io/package/@augment-vir/common.md) ^32.5.0
- [object-shape-tester](https://npm.io/package/object-shape-tester.md) ^6.15.1
- [@octokit/openapi-types](https://npm.io/package/@octokit/openapi-types.md) ^29.0.1

## Recent versions

- 1.8.5 (latest) — 2026-10-16
- 1.8.4 — 2026-09-29
- 1.8.3 — 2026-09-10
- 1.8.2 — 2026-08-05
- 1.8.1 — 2026-08-05
- 1.8.0 — 2026-08-05
- 1.7.0 — 2026-08-01
- 1.6.2 — 2026-07-11
- 1.6.1 — 2026-07-11
- 1.6.0 — 2026-07-10
- 1.5.1 — 2026-05-30
- 1.5.0 — 2026-05-30
- 1.4.6 — 2025-10-13
- 1.4.5 — 2025-09-09
- 1.4.4 — 2025-09-08
- … 32 more at https://npm.io/package/pull-request-vir/versions

## README

# pull-request-vir

GitHub Action for pull requests.

type docs: https://electrovir.github.io/pull-request-vir

## usage

1.  Install this package into whatever repo you're planning to use it.
    -   `npm i -D pull-request-vir`
2.  Create a config file somewhere in the repo (not within source code).

    1. The config file can be named anything but must be JavaScript or TypeScript.
    2. If using TypeScript, import the `Config` type into the config file.
    3. Create a config object that matches that type and export it as the default output:

        ```typescript
        import {type Config} from 'pull-request-vir';

        export const config: Config = {
            // see type definition for full config options
            assignToAuthor: true,
            blockNoMerge: true,
            reviewRules: [
                {
                    autoAdd: true,
                    users: [
                        'electrovir',
                        'another-user',
                        'ghost',
                    ],
                    required: 2,
                    codeOwners: {
                        paths: [/^src\/backend\//],
                    },
                },
                {
                    // always request this reviewer on pull requests assigned to 'junior-dev'
                    autoAdd: true,
                    users: ['senior-dev'],
                    required: 1,
                    appliesTo: ['junior-dev'],
                    // write 'senior-dev' into the description as the primary reviewer
                    isPrimary: true,
                },
            ],
        };
        ```

3.  Define a GitHub Actions workflow that uses `pull-request-vir`:

    ```yaml
    # recommended triggers
    on:
        pull_request_review:
            types: [submitted, dismissed]
        pull_request:
            types:
                [
                    opened,
                    reopened,
                    labeled,
                    edited,
                    ready_for_review,
                    review_requested,
                    review_request_removed,
                ]
    jobs:
        merge-checks:
            runs-on: ubuntu-latest
            steps:
                # pull-request-vir needs the repo checked out so it can read your config
                - uses: actions/checkout@v4.1.1
                - uses: electrovir/pull-request-vir@latest
                  with:
                      config_file: relative/path/to/config.ts
    ```

4.  Push to GitHub and watch the magic.

---
_Source: https://npm.io/package/pull-request-vir · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
