changelog-pr-body-check

command
v0.0.0-...-4d68c58 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 18, 2024 License: MPL-2.0 Imports: 7 Imported by: 0

README

changelog-pr-body-check

changelog-pr-body-check is a command that will ensure that the body of a PR has at least one changelog entry in it, and that all changelog entries are valid. If no changelog entry is found, or one or more invalid changelog entries are found, changelog-pr-body-check will comment on the PR to inform the author of the issue.

Right now, acceptance criteria are hardcoded simply as being one of the following types of entries:

  • bug
  • note
  • enhancement
  • new-resource
  • new-datasource
  • new-function
  • deprecation
  • breaking-change
  • feature

A configuration system is planned to allow a more customizable check.

Usage

This binary requires three environment variables to be set:

  • GITHUB_REPO, the GitHub repository the PR being checked lives in.
  • GITHUB_OWNER, the owner of the GitHub repository the PR being checked lives in.
  • GITHUB_TOKEN, an access token with permission to read and comment on issues in the repository the PR being checked lives in.

Once these environment variables are set, run the command:

$ changelog-pr-body-check $NUMBER

where NUMBER is the ID of the PR to check.

Results

Any failures will be logged to stderr. If the check passes, it will return status code 0. Status code 1 indicates that either the PR did not pass all the checks, and should have comments on it and log entries explaining what failed, or there was an error running the checks or leaving comments, and stderr should have more details on what went wrong.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL