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
+ name : Ensure GH PRs have a corresponding JIRA issue
2
+
3
+ on :
4
+ pull_request :
5
+ types : [opened, edited]
6
+
7
+ jobs :
8
+ validate-url :
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - name : Check for required URI pattern
12
+ id : check_uri
13
+ env :
14
+ PR_BODY : ${{ github.event.pull_request.body }}
15
+ URIPAT : " https://issues.redhat.com/browse/OPENJDK-"
16
+ run : |
17
+ if echo "$PR_BODY" | grep -q "$URIPAT"; then
18
+ echo "missing=false" >> $GITHUB_OUTPUT
19
+ else
20
+ echo "missing=true" >> $GITHUB_OUTPUT
21
+ fi
22
+
23
+ - name : Apply label if URI missing
24
+ if : steps.check_uri.outputs.missing == 'true'
25
+ uses : actions-ecosystem/action-add-labels@v1
26
+ with :
27
+ labels : " needs-jira-issue"
28
+
29
+ - name : Remove label if URI present
30
+ if : steps.check_uri.outputs.missing == 'false'
31
+ uses : actions-ecosystem/action-remove-labels@v1
32
+ with :
33
+ labels : " needs-jira-issue"
34
+
You can’t perform that action at this time.
0 commit comments