-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Weifeng Wang <[email protected]> add pr label check Signed-off-by: Weifeng Wang <[email protected]> Update README.md Update github workflow Signed-off-by: Weifeng Wang <[email protected]>
- Loading branch information
Showing
11 changed files
with
142 additions
and
123 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
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,19 @@ | ||
name: Check PR labels | ||
|
||
on: | ||
pull_request: | ||
types: [labeled, unlabeled, opened, edited, synchronize] | ||
|
||
jobs: | ||
enforce-kind: | ||
name: Enforce a valid PR category | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check if a valid PR category is present | ||
env: | ||
LABELS: ${{ toJson(github.event.pull_request.labels.*.name) }} | ||
run: | | ||
if ! jq --exit-status 'any(test("kind/feature") or test("kind/docs") or test("kind/improvement") or test("kind/bug") or test("kind/maintenance") or test("dependencies") or test("skip-release-notes") or test("area/tech-debt"))' >/dev/null <<< $LABELS; then | ||
echo "::error ::Please set either kind/feature, kind/docs, kind/improvement, kind/bug, kind/maintenance, dependencies, skip-release-notes or area/tech-debt as label" | ||
exit 1 | ||
fi |
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
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
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
This file was deleted.
Oops, something went wrong.
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
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
Oops, something went wrong.