1- name : PR Tests
1+ name : Check PR Modifications
22
33on :
44 pull_request :
@@ -12,55 +12,20 @@ permissions:
1212 pull-requests : write
1313
1414jobs :
15- upload-pr-number :
16- runs-on : ubuntu-latest
17- steps :
18- - name : Create pr_number.txt
19- run : echo "${{ github.event.number }}" > pr_number.txt
20- - uses : actions/upload-artifact@v4
21- with :
22- name : pr_number
23- path : pr_number.txt
24-
25- changelog_modified :
26- name : CHANGELOG.md needs to be modified
27- if : github.actor != 'dependabot[bot]' && github.event.pull_request.head.repo.full_name != 'JabRef/jabref'
28- runs-on : ubuntu-latest
29- steps :
30- - uses : actions/checkout@v5
31- with :
32- fetch-depth : 0
33- - name : Check PR body for changelog note
34- id : changelog_check
35- run : |
36- BODY=$(gh pr view "${{ github.event.number }}" --json body --template '{{.body}}')
37- echo "Body: $BODY"
38-
39- if echo "$BODY" | grep -q '\- \[x\] Change in `CHANGELOG.md`'; then
40- echo "found"
41- echo "found=yes" >> $GITHUB_OUTPUT
42- else
43- echo "not found"
44- echo "found=no" >> $GITHUB_OUTPUT
45- fi
46- env :
47- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
48- - name : Check for CHANGELOG.md modifications
49- id : check_changelog_modification
50- if : steps.changelog_check.outputs.found == 'yes'
51- run : |
52- git fetch origin ${{ github.base_ref }}
53- if git diff --name-only origin/${{ github.base_ref }}...HEAD | grep -q '^CHANGELOG\.md$'; then
54- echo "✅ CHANGELOG.md was modified"
55- else
56- echo "❌ CHANGELOG.md was NOT modified"
57- exit 1
58- fi
59-
6015 # This ensures that no git merge conflict markers (<<<, ...) are contained
6116 merge_conflict_job :
6217 name : Find merge conflicts
63- if : github.actor != 'dependabot[bot]' && github.event.pull_request.head.repo.full_name != 'JabRef/jabref'
18+ if : >
19+ (github.event.pull_request.head.repo.full_name != 'JabRef/jabref') &&
20+ !(
21+ (github.event.pull_request.user.login == 'dependabot[bot]') || (github.event.pull_request.user.login == 'renovate-bot') ||
22+ (
23+ startsWith(github.event.pull_request.title, '[Bot] ') ||
24+ startsWith(github.event.pull_request.title, 'Bump ') ||
25+ startsWith(github.event.pull_request.title, 'New Crowdin updates') ||
26+ startsWith(github.event.pull_request.title, 'Update Gradle Wrapper from')
27+ )
28+ )
6429 runs-on : ubuntu-latest
6530 steps :
6631 - uses : actions/checkout@v5
7035 uses :
olivernybroe/[email protected] 7136
7237 no-force-push :
73- if : github.actor != 'dependabot[bot]' && github.event.pull_request.head.repo.full_name != 'JabRef/jabref'
38+ if : >
39+ (github.event.pull_request.head.repo.full_name != 'JabRef/jabref') &&
40+ !(
41+ (github.event.pull_request.user.login == 'dependabot[bot]') || (github.event.pull_request.user.login == 'renovate-bot') ||
42+ (
43+ startsWith(github.event.pull_request.title, '[Bot] ') ||
44+ startsWith(github.event.pull_request.title, 'Bump ') ||
45+ startsWith(github.event.pull_request.title, 'New Crowdin updates') ||
46+ startsWith(github.event.pull_request.title, 'Update Gradle Wrapper from')
47+ )
48+ )
7449 runs-on : ubuntu-latest
7550 steps :
7651 - name : Checkout repository
9469
9570 unmodified_submodules :
9671 name : Submodules not modified
97- if : github.actor != 'dependabot[bot]' && github. event.pull_request.head.repo.full_name != 'JabRef/jabref '
72+ if : github.event.pull_request.user.login != 'dependabot[bot] '
9873 runs-on : ubuntu-latest
9974 steps :
10075 # No checkout -> the action uses GitHub's API (which is more reliable for submodule changes due to our submodule settings)
@@ -114,11 +89,32 @@ jobs:
11489
11590 other_than_main :
11691 name : Source branch is other than "main"
117- if : github.actor != 'dependabot[bot]' && github.event.pull_request.head.repo.full_name != 'JabRef/jabref'
92+ if : >
93+ (github.event.pull_request.head.repo.full_name != 'JabRef/jabref') &&
94+ !(
95+ (github.event.pull_request.user.login == 'dependabot[bot]') || (github.event.pull_request.user.login == 'renovate-bot') ||
96+ (
97+ startsWith(github.event.pull_request.title, '[Bot] ') ||
98+ startsWith(github.event.pull_request.title, 'Bump ') ||
99+ startsWith(github.event.pull_request.title, 'New Crowdin updates') ||
100+ startsWith(github.event.pull_request.title, 'Update Gradle Wrapper from')
101+ )
102+ )
118103 runs-on : ubuntu-latest
119104 steps :
120105 - if : github.head_ref == 'main'
121106 uses : actions/github-script@v8
122107 with :
123108 script : |
124109 core.setFailed('Pull requests should come from a branch other than "main"\n\n👉 Please read [the CONTRIBUTING guide](https://github.com/JabRef/jabref/blob/main/CONTRIBUTING.md#contributing) carefully again. 👈')
110+
111+ upload-pr-number :
112+ runs-on : ubuntu-latest
113+ steps :
114+ - name : Create pr_number.txt
115+ run : echo "${{ github.event.number }}" > pr_number.txt
116+ - uses : actions/upload-artifact@v4
117+ with :
118+ name : pr_number
119+ path : pr_number.txt
120+
0 commit comments