Skip to content

Commit 066ed17

Browse files
authored
Merge branch 'main' into fix-for-issue-12558
2 parents c0d424a + 3611d6f commit 066ed17

Some content is hidden

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

43 files changed

+879
-163
lines changed

.github/PULL_REQUEST_TEMPLATE.md

+14-8
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,27 @@
1-
<!-- YOU HAVE TO MODIFY THIS TEXT TO FIT YOUR PR. OTHERWISE, YOUR PR WILL BE CLOSED WITHOUT FURTHER COMMENT. -->
2-
3-
Describe the changes you have made here: what, why, ...
1+
<!-- YOU HAVE TO MODIFY THE TEXT BELOW TO FIT YOUR PR. OTHERWISE, YOUR PR WILL BE CLOSED WITHOUT FURTHER COMMENT. -->
42

53
<!-- LINK THE ISSUE WITH THE "Closes" KEYWORD -->
6-
<!-- Example: Closes (link) OR Closes #xyz -->
4+
<!-- Example: Closes (link) OR Closes #12345 -->
5+
6+
Closes _____
7+
Describe the changes you have made here: what, where, why, ...
8+
If your work is not yet complete, please open a draft pull request. In that case, outline your intended next steps. Do you need feedback? Will you continue in parallel? ...
79

810
### Mandatory checks
911

1012
<!--
11-
- Go through the list below. Please don't remove any items.
12-
- [x] done; [ ] not done / not applicable
13+
Go throgh the checklist below. It is mandatory, even for a draft pull request.
14+
15+
Keep ALL the items. Mark them as follows:
16+
[x] done
17+
[ ] not done
18+
[/] not applicable
1319
-->
1420

15-
- [x] I own the copyright of the code submitted and I licence it under the [MIT license](https://github.com/JabRef/jabref/blob/main/LICENSE)
21+
- [x] I own the copyright of the code submitted and I license it under the [MIT license](https://github.com/JabRef/jabref/blob/main/LICENSE)
1622
- [ ] Change in `CHANGELOG.md` described in a way that is understandable for the average user (if change is visible to the user)
1723
- [ ] Tests created for changes (if applicable)
1824
- [ ] Manually tested changed features in running JabRef (always required)
19-
- [ ] Screenshots added in PR description (for UI changes)
25+
- [ ] Screenshots added in PR description (if change is visible to the user)
2026
- [ ] [Checked developer's documentation](https://devdocs.jabref.org/): Is the information available and up to date? If not, I outlined it in this pull request.
2127
- [ ] [Checked documentation](https://docs.jabref.org/): Is the information available and up to date? If not, I created an issue at <https://github.com/JabRef/user-documentation/issues> or, even better, I submitted a pull request to the documentation repository.

.github/ghprcomment.yml

+34-15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
- jobName: 'Source branch is other than "main"'
2+
message: >
3+
You committed your code on `main` brach. This is bad practise.
4+
5+
6+
Please start with a proper branch name.
7+
See [https://github.com/JabRef/jabref/blob/main/CONTRIBUTING.md#pull-request-process](CONTRIBUTING.md) for details.
8+
- jobName: windows installer and portable version
9+
message: >
10+
Your code does not compile.
11+
Please ensure your changes compile successfully before pushing changes.
12+
13+
14+
To verify compilation locally, run `./gradlew build` or try running JabRef.
15+
- jobName: 'Conflicts with target branch'
16+
message: >
17+
Your pull request conflicts with the target branch.
18+
19+
20+
Please [merge `upstream/main`](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork#syncing-a-fork-branch-from-the-command-line) with your code.
21+
For a step-by-step guide to resolve merge conflicts, see <https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/resolving-a-merge-conflict-using-the-command-line>.
122
- jobName: Checkstyle
223
message: >
324
Your code currently does not meet [JabRef's code guidelines](https://devdocs.jabref.org/getting-into-the-code/guidelines-for-setting-up-a-local-workspace/intellij-13-code-style.html).
@@ -37,22 +58,13 @@
3758
message: |
3859
While the PR was in progress, a new version of JabRef has been released.
3960
You have to merge `upstream/main` and move your entry in `CHANGELOG.md` up to the section `## [Unreleased]`.
40-
- jobName: 'Unit tests'
41-
message: >
42-
JUnit tests are failing.
43-
In the area "Some checks were not successful", locate "Tests / Unit tests (pull_request)" and click on "Details".
44-
This brings you to the test output.
45-
46-
47-
You can then run these tests in IntelliJ to reproduce the failing tests locally.
48-
We offer a quick test running howto in the section [Final build system checks](https://devdocs.jabref.org/getting-into-the-code/guidelines-for-setting-up-a-local-workspace/intellij-12-build.html#final-build-system-checks) in our setup guide.
4961
- jobName: no-force-push
5062
message: >
5163
Do not force-push!
5264
Force pushing is a very bad practice when working together on a project (mainly because it is [not supported well by GitHub itself](https://github.com/orgs/community/discussions/3478)).
5365
Commits are lost and comments on commits lose their context, thus making it harder to review changes.
5466
At the end, all commits will be [squashed](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/about-pull-request-merges#squash-and-merge-your-commits) anyway before being merged into the `main` branch.
55-
- jobName: 'Mark issue as in progress'
67+
- jobName: 'Determine issue number'
5668
message: |
5769
Your pull request needs to link an issue.
5870
@@ -84,11 +96,18 @@
8496
- ✅ `Fixes https://github.com/JabRef/jabref/issues/xyz` links pull-request to issue. Merging the PR will close the issue.
8597
- ✅ `Fixes https://github.com/Koppor/jabref/issues/xyz` links pull-request to issue. Merging the PR will close the issue.
8698
- ❌ `Fixes [#xyz](https://github.com/JabRef/jabref/issues/xyz)` links pull-request to issue. Merging the PR will **NOT** close the issue.
87-
- jobName: 'Conflicts with target branch'
99+
- jobName: 'Submodules not modified'
88100
message: >
89-
Your pull request conflicts with the target branch.
101+
Your pull request modified git submodules.
90102
91103
92-
Please merge `upstream/main` with your code.
93-
Preferrably, do this using `git` in your machine:
94-
Conflicts in `CHANGELOG.md` will be handled by a union of changes.
104+
Please follow our [FAQ on submodules](https://devdocs.jabref.org/code-howtos/faq.html#submodules) to fix.
105+
- jobName: 'Unit tests'
106+
message: >
107+
JUnit tests are failing.
108+
In the area "Some checks were not successful", locate "Tests / Unit tests (pull_request)" and click on "Details".
109+
This brings you to the test output.
110+
111+
112+
You can then run these tests in IntelliJ to reproduce the failing tests locally.
113+
We offer a quick test running howto in the section [Final build system checks](https://devdocs.jabref.org/getting-into-the-code/guidelines-for-setting-up-a-local-workspace/intellij-12-build.html#final-build-system-checks) in our setup guide.

.github/workflows/deployment-jdk-ea.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
matrix:
3939
os: [ubuntu-latest, windows-latest, macos-latest, buildjet-8vcpu-ubuntu-2204-arm]
4040
jdk: [23]
41-
javafx: [24]
41+
javafx: [25]
4242
include:
4343
- os: ubuntu-latest
4444
displayName: linux

.github/workflows/on-issue-comment.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
uses: takanome-dev/assign-issue-action@edge
1717
with:
1818
github_token: '${{ secrets.GITHUB_TOKEN }}'
19-
days_until_unassign: 45
19+
days_until_unassign: 14
2020
maintainers: 'koppor,Siedlerchr,ThiloteE,calixtus,HoussemNasri,subhramit,LinusDietz'
2121
assigned_comment: |
2222
👋 Hey @{{ handle }}, thank you for your interest in this issue! 🎉
@@ -29,7 +29,7 @@ jobs:
2929
3030
Happy coding! 🚀
3131
32-
⏳ Please note, you will be automatically unassigned if the issue isn't closed within **{{ total_days }} days** (by **{{ unassigned_date }}**). A maintainer can also add the "**{{ pin_label }}**" label to prevent automatic unassignment.
32+
⏳ Please note, you will be automatically unassigned if there is not a (draft) pull request within **{{ total_days }} days** (by **{{ unassigned_date }}**).
3333
assignment_suggestion_comment: >
3434
👋 Hey @{{ handle }}, looks like you’re eager to work on this issue—great! 🎉
3535
It also looks like you skipped reading our [CONTRIBUTING.md](https://github.com/JabRef/jabref/blob/main/CONTRIBUTING.md), which explains exactly how to participate. No worries, it happens to the best of us.

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

+36-15
Original file line numberDiff line numberDiff line change
@@ -25,38 +25,59 @@ jobs:
2525
bodyRegex: '#(?<ticketNumber>\d+)'
2626
bodyURLRegex: 'http(s?):\/\/(github.com)(\/:owner)(\/:repo)(\/issues)\/(?<ticketNumber>\d+)'
2727
outputOnly: true
28+
- uses: actions/checkout@v4
29+
- name: Remove assignee
30+
run: gh issue edit ${{ steps.get_issue_number.outputs.ticketNumber }} --remove-assignee ${{ github.event.pull_request.user.login }}
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
- name: Check assignees
34+
id: check_assignee
35+
run: |
36+
issue=$(gh issue view ${{ steps.get_issue_number.outputs.ticketNumber }} --json assignees)
37+
count=$(echo "$issue" | jq '.assignees | length')
38+
if [ "$count" -gt 0 ]; then
39+
echo "assigned=yes" >> $GITHUB_OUTPUT
40+
else
41+
echo "assigned=no" >> $GITHUB_OUTPUT
42+
fi
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
- name: Remove assigned label
46+
if: steps.check_assignee.outputs.assigned == 'no'
47+
run: gh issue edit ${{ steps.get_issue_number.outputs.ticketNumber }} --remove-label "📍 Assigned"
48+
env:
49+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50+
- name: Remove pinned label
51+
if: steps.check_assignee.outputs.assigned == 'no'
52+
run: gh issue edit ${{ steps.get_issue_number.outputs.ticketNumber }} --remove-label "📌 Pinned"
53+
env:
54+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55+
- name: Remove FirstTimeCodeContribution label
56+
if: steps.check_assignee.outputs.assigned == 'no'
57+
run: gh issue edit ${{ steps.get_issue_number.outputs.ticketNumber }} --remove-label "FirstTimeCodeContribution"
58+
env:
59+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2860
- name: Move issue to "Free to take" in "Good First Issues"
61+
if: steps.check_assignee.outputs.assigned == 'no'
2962
uses: m7kvqbe1/github-action-move-issues/@add-issue-parameter
3063
with:
3164
github-token: ${{ secrets.GH_TOKEN_ACTION_MOVE_ISSUE }}
3265
project-url: "https://github.com/orgs/JabRef/projects/5"
3366
target-labels: "📍 Assigned"
34-
target-column: "Free to take"
67+
target-column: "Assigned"
3568
ignored-columns: ""
3669
default-column: "Free to take"
3770
issue-number: ${{ steps.get_issue_number.outputs.ticketNumber }}
3871
skip-if-not-in-project: true
3972
- name: Move issue to "Free to take" in "Candidates for University Projects"
73+
if: steps.check_assignee.outputs.assigned == 'no'
4074
uses: m7kvqbe1/github-action-move-issues/@add-issue-parameter
4175
with:
4276
github-token: ${{ secrets.GH_TOKEN_ACTION_MOVE_ISSUE }}
4377
project-url: "https://github.com/orgs/JabRef/projects/3"
4478
target-labels: "📍 Assigned"
45-
target-column: "Free to take"
79+
target-column: "Assigned"
4680
ignored-columns: ""
4781
default-column: "Free to take"
4882
issue-number: ${{ steps.get_issue_number.outputs.ticketNumber }}
4983
skip-if-not-in-project: true
50-
- uses: actions/checkout@v4
51-
- name: Remove assigned status
52-
run: gh issue edit ${{ steps.get_issue_number.outputs.ticketNumber }} --remove-assignee ${{ github.event.pull_request.user.login }}
53-
env:
54-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55-
- name: Remove assigned label
56-
run: gh issue edit ${{ steps.get_issue_number.outputs.ticketNumber }} --remove-label "📍 Assigned"
57-
env:
58-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59-
- name: Remove FirstTimeCodeContribution label
60-
run: gh issue edit ${{ steps.get_issue_number.outputs.ticketNumber }} --remove-label "FirstTimeCodeContribution"
61-
env:
62-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

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

+65-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,23 @@ on:
55
pull_request_target:
66

77
jobs:
8+
determine_issue_number:
9+
name: Determine issue number
10+
runs-on: ubuntu-latest
11+
permissions:
12+
issues: write
13+
steps:
14+
- name: Determine issue number
15+
uses: koppor/ticket-check-action@add-output
16+
with:
17+
token: ${{ secrets.GITHUB_TOKEN }}
18+
ticketLink: 'https://github.com/:owner/:repo/issues/%ticketNumber%'
19+
ticketPrefix: '#'
20+
titleRegex: '^#(?<ticketNumber>\d+)'
21+
branchRegex: '^(?<ticketNumber>\d+)'
22+
bodyRegex: '#(?!12345\b)(?<ticketNumber>\d+)'
23+
bodyURLRegex: 'http(s?):\/\/(github.com)(\/JabRef)(\/jabref)(\/issues)\/(?<ticketNumber>\d+)'
24+
outputOnly: true
825
move_issue:
926
name: Mark issue as in progress
1027
runs-on: ubuntu-latest
@@ -20,7 +37,7 @@ jobs:
2037
ticketPrefix: '#'
2138
titleRegex: '^#(?<ticketNumber>\d+)'
2239
branchRegex: '^(?<ticketNumber>\d+)'
23-
bodyRegex: '#(?<ticketNumber>\d+)'
40+
bodyRegex: '#(?!12345\b)(?<ticketNumber>\d+)'
2441
bodyURLRegex: 'http(s?):\/\/(github.com)(\/JabRef)(\/jabref)(\/issues)\/(?<ticketNumber>\d+)'
2542
outputOnly: true
2643
- name: Move issue to "In Progress" in "Good First Issues"
@@ -45,6 +62,53 @@ jobs:
4562
default-column: "In Progress"
4663
issue-number: ${{ steps.get_issue_number.outputs.ticketNumber }}
4764
skip-if-not-in-project: true
65+
ensure_assignment:
66+
name: Ensure that contributor is assigned (fails if not commented on issue)
67+
runs-on: ubuntu-latest
68+
permissions:
69+
issues: write
70+
steps:
71+
- name: Determine issue number
72+
id: get_issue_number
73+
uses: koppor/ticket-check-action@add-output
74+
with:
75+
token: ${{ secrets.GITHUB_TOKEN }}
76+
ticketLink: 'https://github.com/:owner/:repo/issues/%ticketNumber%'
77+
ticketPrefix: '#'
78+
titleRegex: '^#(?<ticketNumber>\d+)'
79+
branchRegex: '^(?<ticketNumber>\d+)'
80+
bodyRegex: '#(?!12345\b)(?<ticketNumber>\d+)'
81+
bodyURLRegex: 'http(s?):\/\/(github.com)(\/JabRef)(\/jabref)(\/issues)\/(?<ticketNumber>\d+)'
82+
outputOnly: true
83+
- uses: actions/checkout@v4
84+
with:
85+
show-progress: 'false'
86+
- name: Assign PR creator to issue
87+
run: |
88+
# "gh issue edit" cannot be used - workaround found at https://github.com/cli/cli/issues/9620#issuecomment-2703135049
89+
90+
ASSIGNEES=$(gh api /repos/JabRef/jabref/issues/${{ steps.get_issue_number.outputs.ticketNumber }} --jq '[.assignees[].login]')
91+
92+
# Check if the user is already assigned
93+
if echo "$ASSIGNEES" | jq -e '. | index("${{ github.event.pull_request.user.login }}")' >/dev/null; then
94+
echo "User '${{ github.event.pull_request.user.login }}' is already an assignee. No update needed."
95+
exit 0
96+
fi
97+
98+
# Append the new assignee
99+
UPDATED_ASSIGNEES=$(echo "$ASSIGNEES" | jq --arg new "${{ github.event.pull_request.user.login }}" '. + [$new]')
100+
101+
# Update issue with the new assignee list
102+
gh api -X PATCH /repos/JabRef/jabref/issues/${{ steps.get_issue_number.outputs.ticketNumber }} --input <(echo "{\"assignees\": $UPDATED_ASSIGNEES}")
103+
104+
echo "Issue #${{ steps.get_issue_number.outputs.ticketNumber }} updated with assignees: $UPDATED_ASSIGNEES"
105+
env:
106+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
107+
- name: Add label "📌 Pinned"
108+
run: gh issue edit ${{ steps.get_issue_number.outputs.ticketNumber }} --add-label "📌 Pinned"
109+
env:
110+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
111+
48112
conflicts_with_target:
49113
name: Conflicts with target branch
50114
runs-on: ubuntu-latest

.github/workflows/tests.yml

+26
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,32 @@ jobs:
390390
exit 1
391391
fi
392392
393+
unmodified_submodules:
394+
name: Submodules not modified
395+
if: github.actor != 'dependabot[bot]' && github.event_name == 'pull_request'
396+
runs-on: ubuntu-latest
397+
steps:
398+
- uses: actions/checkout@v4
399+
with:
400+
submodules: true
401+
show-progress: 'false'
402+
- name: Check for submodule modifications
403+
id: check_submodule
404+
run: |
405+
git fetch origin ${{ github.base_ref }}
406+
407+
# enable diffing of submodules
408+
sed -i "s/ all/ untracked/" .gitmodules
409+
410+
if ! git diff --submodule=log origin/${{ github.base_ref }} HEAD | grep -vzq "Submodule src"; then
411+
echo "Debug:"
412+
echo git diff --submodule=log origin/${{ github.base_ref }} HEAD
413+
git diff --submodule=log origin/${{ github.base_ref }} HEAD
414+
echo "❌ Submodule modifications detected"
415+
exit 1
416+
fi
417+
echo "✅ No submodule modifications"
418+
393419
other_than_main:
394420
if: github.event_name == 'pull_request'
395421
name: Source branch is other than "main"

.github/workflows/unassign-issues.yml

+13-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,19 @@ jobs:
1919
uses: takanome-dev/assign-issue-action@edge
2020
with:
2121
github_token: '${{ secrets.GITHUB_TOKEN }}'
22-
days_until_unassign: 45
22+
days_until_unassign: 14
23+
unassigned_comment: |
24+
### 📋 Assignment Update
25+
26+
Hi @{{ handle }}, due to inactivity, you have been unassigned from this issue.
27+
28+
<details open>
29+
<summary>Next steps</summary>
30+
31+
**If you still want to work on this:**
32+
- Ask a maintainer to assign you again
33+
- If you're making progress, a maintainer can add the pin label to prevent future automatic unassignment
34+
</details>
2335
move_unassigned_issues:
2436
needs: unassign_issues
2537
if: ${{ needs.unassign_issues.outputs.unassigned_issues != '[]' }}

0 commit comments

Comments
 (0)