Skip to content

Commit 074242e

Browse files
authored
Merge branch 'main' into 13819-add-dialog-tabs
2 parents a8d371e + 8bd820b commit 074242e

38 files changed

+578
-198
lines changed

.github/workflows/automerge.yml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,34 @@ jobs:
1111
if: github.repository == 'JabRef/jabref'
1212
env:
1313
HEAD_REPO: ${{ github.event.pull_request.head.repo.full_name }}
14-
ACTOR: ${{ github.actor }}
14+
USER: ${{ github.event.pull_request.user.login }}
1515
TITLE: ${{ github.event.pull_request.title }}
1616
steps:
1717
- name: Determine if job should run
1818
id: shouldrun
1919
shell: bash
2020
run: |
21-
if [[ "$HEAD_REPO" != "JabRef/jabref" ]]; then
22-
echo "🚫 not from JabRef/jabref"
23-
echo "shouldrun=false" >> "$GITHUB_OUTPUT"
21+
echo USER: $USER
22+
23+
if [[ "$USER" == "renovate-bot" ]]; then
24+
echo "✅ from renote-bot"
25+
echo "shouldrun=true" >> "$GITHUB_OUTPUT"
2426
exit 0
2527
fi
2628
27-
if [[ "$ACTOR" == "renovate-bot" ]]; then
28-
echo "✅ from renote-bot"
29+
if [[ "$USER" == "dependabot[bot]" ]]; then
30+
echo "✅ from dependabot"
2931
echo "shouldrun=true" >> "$GITHUB_OUTPUT"
3032
exit 0
3133
fi
3234
33-
if [[ "$ACTOR" == "dependabot[bot]" ]] || \
35+
if [[ "$HEAD_REPO" != "JabRef/jabref" ]]; then
36+
echo "🚫 not from JabRef/jabref"
37+
echo "shouldrun=false" >> "$GITHUB_OUTPUT"
38+
exit 0
39+
fi
40+
41+
if [[ "$USER" == "dependabot[bot]" ]] || \
3442
[[ "$TITLE" == "Chore(deps): "* ]] || \
3543
[[ "$TITLE" == "[Bot] "* ]] || \
3644
[[ "$TITLE" == "Bump "* ]] || \

.github/workflows/binaries.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,8 @@ jobs:
293293
# We cannot use "action-rsyncer", because that requires Docker which is unavailable on Windows
294294
# We cannot use "setup-rsync", because that does not work on Windows
295295
# We do not use egor-tensin/setup-cygwin@v4, because it replaces the default shell
296-
run: choco install --no-progress rsync
296+
# We need to use v6.4.4 as v6.4.5 misses "lib\rsync\tools\bin\ssh.exe"
297+
run: choco install rsync --version=6.4.4
297298
- name: Upload jabgui to builds.jabref.org (Windows)
298299
if: ${{ (steps.diskspace.outputs.available == 'true') && (matrix.os == 'windows-latest') }}
299300
shell: cmd

.github/workflows/on-pr-closed.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
if: >
1212
(github.repository == 'JabRef/jabref') &&
1313
!(
14-
(github.actor == 'dependabot[bot]') ||
14+
(github.event.pull_request.user.login == 'dependabot[bot]') ||
1515
(
1616
startsWith(github.event.pull_request.title, '[Bot] ') ||
1717
startsWith(github.event.pull_request.title, 'Bump ') ||

.github/workflows/on-pr-opened-updated.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
(github.repository == 'JabRef/jabref') &&
1414
(github.event.pull_request.head.repo.full_name != 'JabRef/jabref') &&
1515
!(
16-
(github.actor == 'dependabot[bot]') ||
16+
(github.event.pull_request.user.login == 'dependabot[bot]') || (github.event.pull_request.user.login == 'renovate-bot') ||
1717
(
1818
startsWith(github.event.pull_request.title, '[Bot] ') ||
1919
startsWith(github.event.pull_request.title, 'Bump ') ||

.github/workflows/pr-changelog.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: Check PR CHANGELOG.md
2+
3+
# Seperate check PR, because of triggers both at code update and at comment update
4+
on:
5+
pull_request:
6+
types: [opened, reopened, synchronize, edited]
7+
8+
concurrency:
9+
group: "${{ github.workflow }}-${{ github.head_ref || github.ref }}"
10+
cancel-in-progress: true
11+
12+
permissions:
13+
pull-requests: write
14+
15+
jobs:
16+
changelog_modification_consistency:
17+
name: CHANGELOG.md needs to be modified if indicated
18+
if: (github.event.pull_request.user.login != 'dependabot[bot]') && (github.event.pull_request.user.login != 'renovate-bot')
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v5
22+
with:
23+
fetch-depth: 0
24+
- name: Check PR body for changelog note
25+
id: changelog_check
26+
run: |
27+
BODY=$(gh pr view "${{ github.event.number }}" --json body --template '{{.body}}')
28+
echo "Body: $BODY"
29+
30+
if echo "$BODY" | grep -q '\- \[x\] Change in `CHANGELOG.md`'; then
31+
echo "found"
32+
echo "found=yes" >> $GITHUB_OUTPUT
33+
else
34+
echo "not found"
35+
echo "found=no" >> $GITHUB_OUTPUT
36+
fi
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
- name: CHANGELOG.md modified
40+
id: changelog_modified
41+
uses: tj-actions/changed-files@24d32ffd492484c1d75e0c0b894501ddb9d30d62 # v47
42+
with:
43+
files: |
44+
CHANGELOG.md
45+
- name: Check for CHANGELOG.md modifications
46+
id: check_changelog_modification
47+
run: |
48+
set -euo pipefail
49+
found="${{ steps.changelog_check.outputs.found }}"
50+
any_changed="${{ steps.changelog_modified.outputs.any_changed }}"
51+
52+
echo "found=${found}"
53+
echo "any_changed=${any_changed}"
54+
55+
if [[ "${any_changed}" == "true" && "${found}" != "yes" ]]; then
56+
echo "❌ CHANGELOG.md modified, but not indicated in checklist"
57+
exit 1
58+
fi
59+
60+
if [[ "${any_changed}" != "true" && "${found}" == "yes" ]]; then
61+
echo "❌ CHANGELOG.md NOT modified, but indicated in checklist"
62+
exit 1
63+
fi
64+
65+
if [[ "${any_changed}" == "true" && "${found}" == "yes" ]]; then
66+
echo "✅ CHANGELOG.md was modified and indicated in checklist"
67+
else
68+
echo "✅ CHANGELOG.md was NOT modified and NOT indicated in checklist"
69+
fi
70+
71+
upload-pr-number:
72+
runs-on: ubuntu-latest
73+
steps:
74+
- name: Create pr_number.txt
75+
run: echo "${{ github.event.number }}" > pr_number.txt
76+
- uses: actions/upload-artifact@v4
77+
with:
78+
name: pr_number
79+
path: pr_number.txt
80+

.github/workflows/pr-comment.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ name: Comment on PR
88
on:
99
workflow_run:
1010
# note when updating via a PR and testing - `workflow_run` executes from the `main` branch and not the PR branch
11-
workflows: ["Source Code Tests", "On PR opened/updated", "PR Tests", "PR Format"]
11+
workflows: ["Source Code Tests", "On PR opened/updated", "Check PR Format", "Check PR Modifications", "Check PR CHANGELOG.md"]
1212
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#running-a-workflow-based-on-the-conclusion-of-another-workflow
1313
types: [completed]
1414
workflow_dispatch:
@@ -33,6 +33,7 @@ jobs:
3333
- name: Download PR number
3434
if: ${{ github.event_name != 'workflow_dispatch' }}
3535
uses: actions/download-artifact@v5
36+
continue-on-error: true
3637
with:
3738
name: pr_number
3839
github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -42,6 +43,7 @@ jobs:
4243
if: ${{ github.event_name != 'workflow_dispatch' }}
4344
id: read-pr_number
4445
run: |
46+
touch pr_number.txt
4547
PR_NUMBER=$(cat pr_number.txt)
4648
echo "Read PR number $PR_NUMBER"
4749
echo "pr_number=$PR_NUMBER" >> $GITHUB_OUTPUT
@@ -90,7 +92,7 @@ jobs:
9092
# This step runs in both cases using the proper variables.
9193
- name: ghprcomment@main
9294
if: ${{ github.event_name == 'workflow_dispatch' || (steps.check-label.outputs.has_label == 'false' && steps.read-pr_number.outputs.pr_number != '' && steps.isCrossRepository.outputs.isCrossRepository == 'true') }}
93-
uses: jbangdev/jbang-action@v0.130.0
95+
uses: jbangdev/jbang-action@v0.131.0
9496
with:
9597
script: https://github.com/koppor/ghprcomment/blob/main/ghprcomment.java
9698
scriptargs: "-r JabRef/jabref -p ${{ steps.set-vars.outputs.pr_number }} -w ${{ steps.set-vars.outputs.workflow_run_id }}"

.github/workflows/pr-format.yml

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: PR Format
1+
name: Check PR Format
22

33
on:
44
pull_request:
@@ -10,7 +10,17 @@ permissions:
1010
jobs:
1111
check_title_format:
1212
name: PR title must not contain "issue <number>"
13-
if: github.actor != 'dependabot[bot]' && github.event.pull_request.head.repo.full_name != 'JabRef/jabref'
13+
if: >
14+
(github.event.pull_request.head.repo.full_name != 'JabRef/jabref') &&
15+
!(
16+
(github.event.pull_request.user.login == 'dependabot[bot]') || (github.event.pull_request.user.login == 'renovate-bot') ||
17+
(
18+
startsWith(github.event.pull_request.title, '[Bot] ') ||
19+
startsWith(github.event.pull_request.title, 'Bump ') ||
20+
startsWith(github.event.pull_request.title, 'New Crowdin updates') ||
21+
startsWith(github.event.pull_request.title, 'Update Gradle Wrapper from')
22+
)
23+
)
1424
runs-on: ubuntu-latest
1525
steps:
1626
- name: Checkout source
@@ -34,8 +44,9 @@ jobs:
3444

3545
mandatory-checks-section-exists:
3646
if: >
37-
(github.event.pull_request.head.repo.full_name != 'JabRef/jabref') && !(
38-
(github.actor == 'dependabot[bot]') ||
47+
(github.event.pull_request.head.repo.full_name != 'JabRef/jabref') &&
48+
!(
49+
(github.event.pull_request.user.login == 'dependabot[bot]') || (github.event.pull_request.user.login == 'renovate-bot') ||
3950
(
4051
startsWith(github.event.pull_request.title, '[Bot] ') ||
4152
startsWith(github.event.pull_request.title, 'Bump ') ||
@@ -72,7 +83,7 @@ jobs:
7283
if: >
7384
(github.event.pull_request.head.repo.full_name != 'JabRef/jabref') &&
7485
!(
75-
(github.actor == 'dependabot[bot]') ||
86+
(github.event.pull_request.user.login == 'dependabot[bot]') || (github.event.pull_request.user.login == 'renovate-bot') ||
7687
(
7788
startsWith(github.event.pull_request.title, '[Bot] ') ||
7889
startsWith(github.event.pull_request.title, 'Bump ') ||
@@ -122,3 +133,13 @@ jobs:
122133
echo "✅ All checkboxes are present and in the correct format."
123134
env:
124135
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
136+
137+
upload-pr-number:
138+
runs-on: ubuntu-latest
139+
steps:
140+
- name: Create pr_number.txt
141+
run: echo "${{ github.event.number }}" > pr_number.txt
142+
- uses: actions/upload-artifact@v4
143+
with:
144+
name: pr_number
145+
path: pr_number.txt
Lines changed: 46 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: PR Tests
1+
name: Check PR Modifications
22

33
on:
44
pull_request:
@@ -12,55 +12,20 @@ permissions:
1212
pull-requests: write
1313

1414
jobs:
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
@@ -70,7 +35,17 @@ jobs:
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
@@ -94,7 +69,7 @@ jobs:
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+

.github/workflows/tests-code.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ permissions:
3030

3131
jobs:
3232
upload-pr-number:
33+
if: github.event_name == 'pull_request'
3334
runs-on: ubuntu-latest
3435
steps:
3536
- name: Create pr_number.txt

0 commit comments

Comments
 (0)