File tree Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Original file line number Diff line number Diff line change 2626 else
2727 echo "CHANGES_DETECTED=false" >> $GITHUB_OUTPUT
2828 fi
29+ - name : Check for exemption for PR created by dot-org-content workflow
30+ id : check_exemption
31+ run : |
32+ LABELS=$(jq -r '.pull_request.labels[].name' "$GITHUB_EVENT_PATH" || echo "")
33+ AUTHOR=$(jq -r '.pull_request.user.login' "$GITHUB_EVENT_PATH")
34+ TITLE=$(jq -r '.pull_request.title' "$GITHUB_EVENT_PATH")
35+ ACCEPTED_LABEL = "module-reference"
36+ ACCEPTED_AUTHOR = "<TODO>"
37+ ACCEPTED_TITLE = "NGINX Plus - Module Ref"
38+
39+ EXEMPTION=false
40+
41+ if echo "$LABELS" | grep -q "$ACCEPTED_LABEL"; then
42+ EXEMPTION=true
43+ fi
44+ if [[ "$AUTHOR" == "$ACCEPTED_AUTHOR" ]]; then
45+ EXEMPTION=true
46+ fi
47+ if [[ "$TITLE" == *"${ACCEPTED_TITLE}"* ]]; then
48+ EXEMPTION=true
49+ fi
50+
51+ echo "EXEMPTION=$EXEMPTION" >> $GITHUB_OUTPUT
52+
2953 - name : Generate PR comment if changes detected
30- if : steps.check_module_changes.outputs.CHANGES_DETECTED == 'true'
54+ if : steps.check_module_changes.outputs.CHANGES_DETECTED == 'true' && steps.check_exemption.outputs.EXEMPTION == 'false'
3155 uses : actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
3256 with :
3357 script : |
You can’t perform that action at this time.
0 commit comments