Skip to content

Commit 62f86c6

Browse files
authored
Merge branch 'main' into jdk25
2 parents 8a687be + be8e57d commit 62f86c6

File tree

349 files changed

+2639
-1657
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

349 files changed

+2639
-1657
lines changed

.github/workflows/automerge.yml

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,31 +9,41 @@ jobs:
99
automerge:
1010
runs-on: ubuntu-latest
1111
if: github.repository == 'JabRef/jabref'
12+
env:
13+
HEAD_REPO: ${{ github.event.pull_request.head.repo.full_name }}
14+
USER: ${{ github.event.pull_request.user.login }}
15+
TITLE: ${{ github.event.pull_request.title }}
1216
steps:
1317
- name: Determine if job should run
1418
id: shouldrun
1519
shell: bash
1620
run: |
17-
head_repo="${{ github.event.pull_request.head.repo.full_name }}"
18-
if [[ "$head_repo" != "JabRef/jabref" ]]; then
19-
echo "🚫 not from JabRef/jabref"
20-
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"
2126
exit 0
2227
fi
2328
24-
actor="${{ github.actor }}"
25-
if [[ "$actor" == "renovate-bot" ]]; then
26-
echo "✅ from renote-bot"
29+
if [[ "$USER" == "dependabot[bot]" ]]; then
30+
echo "✅ from dependabot"
2731
echo "shouldrun=true" >> "$GITHUB_OUTPUT"
2832
exit 0
2933
fi
3034
31-
title="${{ github.event.pull_request.title }}"
32-
if [[ "$actor" == "dependabot[bot]" ]] || \
33-
[[ "$title" == "[Bot] "* ]] || \
34-
[[ "$title" == "Bump "* ]] || \
35-
[[ "$title" == "New Crowdin updates"* ]] || \
36-
[[ "$title" == "Update Gradle Wrapper from"* ]]; then
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]" ]] || \
42+
[[ "$TITLE" == "Chore(deps): "* ]] || \
43+
[[ "$TITLE" == "[Bot] "* ]] || \
44+
[[ "$TITLE" == "Bump "* ]] || \
45+
[[ "$TITLE" == "New Crowdin updates"* ]] || \
46+
[[ "$TITLE" == "Update Gradle Wrapper from"* ]]; then
3747
echo "✅ title OK"
3848
echo "shouldrun=true" >> "$GITHUB_OUTPUT"
3949
exit 0

.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: 2 additions & 3 deletions
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 ') ||
@@ -162,8 +162,7 @@ jobs:
162162
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
163163
remove_label:
164164
if: >
165-
(github.repository == 'JabRef/jabref') &&
166-
(github.event.pull_request.head.repo.full_name == 'JabRef/jabref')
165+
(github.repository == 'JabRef/jabref')
167166
name: 'Remove label "status: changes-required"'
168167
runs-on: ubuntu-latest
169168
steps:

.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+
# Separate 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\] I described the 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

0 commit comments

Comments
 (0)