1.0.0 • Published 1 year ago

@vivianhealth/github-upsert-pr-comment v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

github-upsert-pr-comment

npm.io npm.io npm.io npm.io

This utility will post a comment to a GitHub PR if an expecting matching comment doesn't exist; otherwise it will update the existing comment.

Prerequisites

  • Node >=18

Usage

The following command will allow you run the CLI tool without having to explicitly install it as long as npm is installed.

npx -y -p @vivianhealth/github-upsert-pr-comment@latest \
  github-upsert-pr-comment -- \
    -a <github-auth-string> \
    -o <owner> \
    -r <repository> \
    -n <pr-number> \
    -c <comment> \
    -p <pattern>

See all options with:

npx -y -p @vivianhealth/github-upsert-pr-comment@latest \
    github-upsert-pr-comment -- --help

To install and lock in a specific version into your project dependencies (recommended):

npm install --save-dev @vivianhealth/github-upsert-pr-comment

And then to run the CLI tool inside your project directory:

npx github-upsert-pr-comment -- \
  -a <github-auth-string> \
  -o <owner> \
  -r <repository> \
  -n <pr-number> \
  -c <comment> \
  -p <pattern>

Publishing

This package is automatically published to npm via CI. Versions are bumped automatically based on commits since the last release using semantic-release and conventional-changelog.

Commit message format is important. See conventional commits. This format is enforced via git hooks.

License

This package is MIT licensed.