Skip to content

Warning

You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?

PR labels checker

Actions
Checks PR labels for specified rules
v2.0
Star (11)

PR Labels Checker

Github Action to check if a PR's labels pass the specified rules

Input

  • hasSome: Comma separated list of labels, PR needs at least of them
  • hasAll: Comma separated list of labels, PR needs all of them
  • hasNone: Comma separated list of labels, PR must not have any of them
  • hasNotAll: Comma separated list of labels, PR must not have all of them

Output

  • passed: boolean

Example workflow file

name: Labels Check
on:
  pull_request:
    types: [opened, edited, labeled, unlabeled, synchronize]
jobs:
  QA-check:
    if: github.base_ref == 'master'
    runs-on: ubuntu-latest
    steps:
      - uses: danielchabr/pr-has-one-of-labels@master
        id: checkLabel
        with:
          hasSome: QA:tested,QA:skipped
  Do_not_merge-check:
    if: github.base_ref == 'master'
    runs-on: ubuntu-latest
    steps:
      - uses: danielchabr/pr-has-one-of-labels@master
        id: checkLabel
        with:
          hasNone: do not merge,blocked

PR labels checker is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Checks PR labels for specified rules
v2.0

PR labels checker is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.