We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 23da840 + addbfc2 commit 77b9cd0Copy full SHA for 77b9cd0
1 file changed
.github/workflows/pr-checker.yml
@@ -0,0 +1,34 @@
1
+
2
+name: PR Issue Checker
3
4
+on:
5
+ pull_request:
6
+ types: [opened, edited]
7
8
+jobs:
9
+ check_pr_description:
10
+ runs-on: ubuntu-latest
11
12
+ steps:
13
+ - name: Checkout code
14
+ uses: actions/checkout@v2
15
16
+ - name: Check PR Description
17
+ id: check_pr_description
18
+ run: |
19
+ PR_DESCRIPTION="${{ github.event.pull_request.body }}"
20
+ if [[ -z "$PR_DESCRIPTION" ]]; then
21
+ echo "PR description is missing."
22
+ exit 1
23
+ fi
24
25
+ if [[ ! "$PR_DESCRIPTION" =~ Fixes\ #[0-9]+ ]]; then
26
+ echo "The PR description should include 'Fixes #<issue-number>' if not addressing any issue."
27
+ echo "##[error]Fixes #NEW must be included in the description."
28
29
30
31
+ echo "PR description is valid."
32
33
+ - name: Output result
34
+ run: echo "All checks passed."
0 commit comments