Skip to content

Commit 883540f

Browse files
authored
[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.
1 parent de68e48 commit 883540f

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: 'Pull request semver label checker'
2+
description: 'Checks that at least one semver label is applied to the pull request'
3+
runs:
4+
using: "composite"
5+
steps:
6+
- name: Check labels
7+
run: |
8+
gh pr view ${{ github.event.number }} --repo apple/swift-nio --json labels \
9+
| jq -e '[.labels[].name] | any(. == "semver/major" or . == "semver/minor" or . == "semver/patch" or . == "semver/none")'
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: PR
2+
3+
on:
4+
pull_request:
5+
types: [labeled, unlabeled]
6+
7+
jobs:
8+
semver-label-check:
9+
name: Semver label check
10+
runs-on: ubuntu-latest
11+
timeout-minutes: 1
12+
steps:
13+
- name: Check for semver label
14+
uses: ./github/actions/pull_request_label_checker.yml

0 commit comments

Comments
 (0)