jefflinse / pr-semver-bump

A GitHub Action to bump and tag a new semantic version when a pull request is merged.
MIT License
24 stars 11 forks source link

Add support for merging PRs without tagging a new version #32

Open jefflinse opened 2 years ago

jefflinse commented 2 years ago

Instead of always requiring a GitHub version tag (e.g. "major", "minor", "patch", etc) on every pull request, it should be possible for the author to indicate that no new version is to result from merging the pull request.

Proposal

Add a noop-labels configuration variable that accepts a list of label names that, when any are applied to the pull request, will result in no new version being tagged. a. It is valid to assign more than one label in the noop-labels group to a pull request. b. It is invalid to assign any label from the noop-labels group and to also assign a label defined by major-label, minor-label, or patch-label.

For example, using the configuration below, users could then label a pull request with documentation change or no new version (or both), causing the pr-semver-bump workflow to complete successfully without tagging any new version.

with:
  noop-labels:
    - documentation change
    - no new version
benhowes commented 2 years ago

Currently, I am using no label to signify that I do not want a release, so the only case not mentioned here is what happens when there are no labels on a PR. I probably would migrate to this syntax, but it would require listing nearly all of my labels and keeping that list up-to-date with other changes. I do appreciate this is far more useful for the CI check though