-
Notifications
You must be signed in to change notification settings - Fork 652
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Motivation The label check workflow doesn't seem to work properly. # Modification This PR fixes it. # Result Proper label checks.
- Loading branch information
1 parent
260c899
commit 4c4453b
Showing
2 changed files
with
17 additions
and
6 deletions.
There are no files selected for viewing
15 changes: 13 additions & 2 deletions
15
.github/actions/pull_request_semver_label_checker/action.yml
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 |
---|---|---|
@@ -1,9 +1,20 @@ | ||
name: 'Pull request semver label checker' | ||
description: 'Checks that at least one semver label is applied to the pull request' | ||
name: 'Pull request Semantic Version label checker' | ||
|
||
description: 'Checks that at least one Semantic Version label is applied to the pull request' | ||
|
||
inputs: | ||
token: | ||
description: 'A GitHub token' | ||
type: string | ||
default: ${{ github.token }} | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Check labels | ||
shell: bash | ||
env: | ||
GH_TOKEN: ${{ inputs.token }} | ||
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 |
---|---|---|
@@ -1,16 +1,16 @@ | ||
name: PR | ||
name: PR label | ||
|
||
on: | ||
pull_request: | ||
types: [labeled, unlabeled] | ||
|
||
jobs: | ||
semver-label-check: | ||
name: Semver label check | ||
name: Semantic Version label check | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 1 | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Check for semver label | ||
uses: ".github/actions/pull_request_semver_label_checker/action.yml" | ||
- name: Check for Semantic Version label | ||
uses: ./.github/actions/pull_request_semver_label_checker/ |