|
5 | 5 | types: [opened, edited, reopened] |
6 | 6 |
|
7 | 7 | jobs: |
8 | | - validate-pr-description: |
| 8 | + validate-pr-description: |
9 | 9 | runs-on: ubuntu-latest |
10 | 10 | steps: |
11 | | - - name: Set up workspace |
12 | | - uses: actions/checkout@v2 |
| 11 | + - name: Set up workspace |
| 12 | + uses: actions/checkout@v2 |
13 | 13 |
|
14 | | - - name: Validate description |
15 | | - run: | |
16 | | - # Fetch PR description from env with jq |
17 | | - PR_DESCRIPTION=$(jq -r ".pull_request.body" "$GITHUB_EVENT_PATH") |
18 | | - KEYWORD="REQUIRED_KEYWORD" |
| 14 | + - name: Validate description |
| 15 | + run: | |
| 16 | + # Fetch PR description from env with jq |
| 17 | + PR_DESCRIPTION=$(jq -r ".pull_request.body" "$GITHUB_EVENT_PATH") |
| 18 | + KEYWORD="REQUIRED_KEYWORD" |
19 | 19 |
|
20 | | - # Ensure PR author removed the welcome comment |
21 | | - if [[ $PR_DESCRIPTION = *"<!--"* ]] || [[ $PR_DESCRIPTION = *"-->"* ]]; then |
22 | | - echo "FAILED: Please remove the welcome comment from your PR description." |
23 | | - exit 1 |
24 | | - else |
25 | | - echo "OK: Welcome comment is removed your PR description." |
26 | | - fi |
| 20 | + # Ensure PR author removed the welcome comment |
| 21 | + if [[ $PR_DESCRIPTION = *"<!--"* ]] || [[ $PR_DESCRIPTION = *"-->"* ]]; then |
| 22 | + echo "FAILED: Please remove the welcome comment from your PR description." |
| 23 | + exit 1 |
| 24 | + else |
| 25 | + echo "OK: Welcome comment is removed your PR description." |
| 26 | + fi |
27 | 27 |
|
28 | | - echo "PASS: All checks OK!" |
| 28 | + echo "PASS: All checks OK!" |
0 commit comments