File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change
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
+ exit 1
29
+ fi
30
+
31
+ echo "PR description is valid."
32
+
33
+ - name : Output result
34
+ run : echo "All checks passed."
You can’t perform that action at this time.
0 commit comments