-
Notifications
You must be signed in to change notification settings - Fork 654
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CI] Add action and workflow to check for semver label (#2814)
# Motivation We want to make sure every PR that gets merged is appropriately labeled. # Modification This PR adds a new workflow and action to check for a semver label to be present. # Result No more labeling after a PR got merged.
- Loading branch information
1 parent
de68e48
commit 883540f
Showing
2 changed files
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
name: 'Pull request semver label checker' | ||
description: 'Checks that at least one semver label is applied to the pull request' | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Check labels | ||
run: | | ||
gh pr view ${{ github.event.number }} --repo apple/swift-nio --json labels \ | ||
| jq -e '[.labels[].name] | any(. == "semver/major" or . == "semver/minor" or . == "semver/patch" or . == "semver/none")' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: PR | ||
|
||
on: | ||
pull_request: | ||
types: [labeled, unlabeled] | ||
|
||
jobs: | ||
semver-label-check: | ||
name: Semver label check | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 1 | ||
steps: | ||
- name: Check for semver label | ||
uses: ./github/actions/pull_request_label_checker.yml |