|
1 | | -name: Pull Request Check |
2 | | - |
3 | | -on: |
4 | | - pull_request: |
5 | | - types: |
6 | | - - opened |
7 | | - - reopened |
8 | | - - synchronize |
9 | | - - labeled |
10 | | - - unlabeled |
11 | | -env: |
12 | | - BASE_BRANCH: ${{ github.event.pull_request.base.ref }} |
13 | | - |
14 | | -jobs: |
15 | | - Changelog-Check: |
16 | | - name: Changelog Mention |
17 | | - # If the No Documentation Needed label is set, then workflow will not be executed |
18 | | - if: ${{ !contains(github.event.pull_request.labels.*.name, 'No Documentation Needed') }} |
19 | | - runs-on: ubuntu-latest |
20 | | - |
21 | | - steps: |
22 | | - - uses: actions/checkout@v1 |
23 | | - - name: Check that Changelog has been updated |
24 | | - run: | |
25 | | - # Check that Changelog has been updated |
26 | | - if (git diff --name-only $(git merge-base origin/$BASE_BRANCH HEAD) | grep ^docs/Whats-New.md$) |
27 | | - then |
28 | | - echo "Thank you for remembering to update the Changelog! 😋" |
29 | | - exit 0 |
30 | | - else |
31 | | - echo "It looks like you forgot to update the Changelog! 🧐" |
32 | | - echo "Please, mention your changes in 'docs/Whats-New.md' or use [No Documentation Needed] label for your Pull Request." |
33 | | - exit 1 |
34 | | - fi |
35 | | -
|
36 | | - Credits-Check: |
37 | | - name: Credits List Mention |
38 | | - # If the No Documentation Needed or Bugfix label is set, then workflow will not be executed |
39 | | - if: ${{ !contains(github.event.pull_request.labels.*.name, 'No Documentation Needed') && !contains(github.event.pull_request.labels.*.name, 'Bugfix') }} |
40 | | - runs-on: ubuntu-latest |
41 | | - |
42 | | - steps: |
43 | | - - uses: actions/checkout@v1 |
44 | | - - name: Check that Credits List has been updated |
45 | | - run: | |
46 | | - # Check that Credits List has been updated |
47 | | - if (git diff --name-only $(git merge-base origin/$BASE_BRANCH HEAD) | grep ^CREDITS.md$) |
48 | | - then |
49 | | - echo "Thank you for remembering to update the Credits List! 😋" |
50 | | - exit 0 |
51 | | - else |
52 | | - echo "It looks like you forgot to update the Credits List! 🧐" |
53 | | - echo "Please, mention your contribution in 'CREDITS.md' or use [No Documentation Needed] label for your Pull Request." |
54 | | - exit 1 |
55 | | - fi |
56 | | -
|
57 | | - Documentation-Check: |
58 | | - name: Documentation for Changes |
59 | | - # If the No Documentation Needed or Bugfix label is set, then workflow will not be executed |
60 | | - if: ${{ !contains(github.event.pull_request.labels.*.name, 'No Documentation Needed') && !contains(github.event.pull_request.labels.*.name, 'Bugfix') }} |
61 | | - runs-on: ubuntu-latest |
62 | | - |
63 | | - steps: |
64 | | - - uses: actions/checkout@v1 |
65 | | - - name: Check that Documentation has been updated |
66 | | - run: | |
67 | | - # Check that Documentation has been updated |
68 | | - if (git diff --name-only $(git merge-base origin/$BASE_BRANCH HEAD) | \ |
69 | | - grep \ |
70 | | - -e ^docs/New-or-Enhanced-Logics.md$ \ |
71 | | - -e ^docs/Fixed-or-Improved-Logics.md$ \ |
72 | | - -e ^docs/AI-Scripting-and-Mapping.md$ \ |
73 | | - -e ^docs/User-Interface.md$ \ |
74 | | - -e ^docs/Miscellanous.md$ \ |
75 | | - ) |
76 | | - then |
77 | | - echo "Thank you for remembering to add your changes to the docs! 😋" |
78 | | - exit 0 |
79 | | - else |
80 | | - echo "It looks like you forgot to add your changes to the docs! 🧐" |
81 | | - echo "Please, document your changes or use [No Documentation Needed] label for your Pull Request." |
82 | | - exit 1 |
83 | | - fi |
| 1 | +name: Pull Request Check |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + types: |
| 6 | + - opened |
| 7 | + - reopened |
| 8 | + - synchronize |
| 9 | + - labeled |
| 10 | + - unlabeled |
| 11 | +env: |
| 12 | + BASE_BRANCH: ${{ github.event.pull_request.base.ref }} |
| 13 | + |
| 14 | +jobs: |
| 15 | + Changelog-Check: |
| 16 | + name: Changelog Mention |
| 17 | + # If the No Documentation Needed label is set, then workflow will not be executed |
| 18 | + if: ${{ !contains(github.event.pull_request.labels.*.name, 'No Documentation Needed') }} |
| 19 | + runs-on: ubuntu-latest |
| 20 | + |
| 21 | + steps: |
| 22 | + - uses: actions/checkout@v5 |
| 23 | + - name: Check that Changelog has been updated |
| 24 | + run: | |
| 25 | + # Check that Changelog has been updated |
| 26 | + if (git diff --name-only $(git merge-base origin/$BASE_BRANCH HEAD) | grep ^docs/Whats-New.md$) |
| 27 | + then |
| 28 | + echo "Thank you for remembering to update the Changelog! 😋" |
| 29 | + exit 0 |
| 30 | + else |
| 31 | + echo "It looks like you forgot to update the Changelog! 🧐" |
| 32 | + echo "Please, mention your changes in 'docs/Whats-New.md' or use [No Documentation Needed] label for your Pull Request." |
| 33 | + exit 1 |
| 34 | + fi |
| 35 | +
|
| 36 | + Credits-Check: |
| 37 | + name: Credits List Mention |
| 38 | + # If the No Documentation Needed or Bugfix label is set, then workflow will not be executed |
| 39 | + if: ${{ !contains(github.event.pull_request.labels.*.name, 'No Documentation Needed') && !contains(github.event.pull_request.labels.*.name, 'Bugfix') }} |
| 40 | + runs-on: ubuntu-latest |
| 41 | + |
| 42 | + steps: |
| 43 | + - uses: actions/checkout@v5 |
| 44 | + - name: Check that Credits List has been updated |
| 45 | + run: | |
| 46 | + # Check that Credits List has been updated |
| 47 | + if (git diff --name-only $(git merge-base origin/$BASE_BRANCH HEAD) | grep ^CREDITS.md$) |
| 48 | + then |
| 49 | + echo "Thank you for remembering to update the Credits List! 😋" |
| 50 | + exit 0 |
| 51 | + else |
| 52 | + echo "It looks like you forgot to update the Credits List! 🧐" |
| 53 | + echo "Please, mention your contribution in 'CREDITS.md' or use [No Documentation Needed] label for your Pull Request." |
| 54 | + exit 1 |
| 55 | + fi |
| 56 | +
|
| 57 | + Documentation-Check: |
| 58 | + name: Documentation for Changes |
| 59 | + # If the No Documentation Needed or Bugfix label is set, then workflow will not be executed |
| 60 | + if: ${{ !contains(github.event.pull_request.labels.*.name, 'No Documentation Needed') && !contains(github.event.pull_request.labels.*.name, 'Bugfix') }} |
| 61 | + runs-on: ubuntu-latest |
| 62 | + |
| 63 | + steps: |
| 64 | + - uses: actions/checkout@v5 |
| 65 | + - name: Check that Documentation has been updated |
| 66 | + run: | |
| 67 | + # Check that Documentation has been updated |
| 68 | + if (git diff --name-only $(git merge-base origin/$BASE_BRANCH HEAD) | \ |
| 69 | + grep \ |
| 70 | + -e ^docs/New-or-Enhanced-Logics.md$ \ |
| 71 | + -e ^docs/Fixed-or-Improved-Logics.md$ \ |
| 72 | + -e ^docs/AI-Scripting-and-Mapping.md$ \ |
| 73 | + -e ^docs/User-Interface.md$ \ |
| 74 | + -e ^docs/Miscellanous.md$ \ |
| 75 | + ) |
| 76 | + then |
| 77 | + echo "Thank you for remembering to add your changes to the docs! 😋" |
| 78 | + exit 0 |
| 79 | + else |
| 80 | + echo "It looks like you forgot to add your changes to the docs! 🧐" |
| 81 | + echo "Please, document your changes or use [No Documentation Needed] label for your Pull Request." |
| 82 | + exit 1 |
| 83 | + fi |
0 commit comments