Skip to content

Commit a71d9fb

Browse files
authoredMar 19, 2025
Merge branch 'main' into fix-for-issue-JabRef#12272
2 parents 0076919 + 53b8281 commit a71d9fb

File tree

10 files changed

+99
-28
lines changed

10 files changed

+99
-28
lines changed
 

‎.github/PULL_REQUEST_TEMPLATE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Keep ALL the items. Mark them as follows:
1818
[/] not applicable
1919
-->
2020

21-
- [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)
2222
- [ ] Change in `CHANGELOG.md` described in a way that is understandable for the average user (if change is visible to the user)
2323
- [ ] Tests created for changes (if applicable)
2424
- [ ] Manually tested changed features in running JabRef (always required)

‎.github/ghprcomment.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
message: >
1010
Your code does not compile.
1111
Please ensure your changes compile successfully before pushing changes.
12-
13-
12+
13+
1414
To verify compilation locally, run `./gradlew build` or try running JabRef.
1515
- jobName: 'Conflicts with target branch'
1616
message: >
@@ -64,7 +64,7 @@
6464
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)).
6565
Commits are lost and comments on commits lose their context, thus making it harder to review changes.
6666
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.
67-
- jobName: 'Mark issue as in progress'
67+
- jobName: 'Determine issue number'
6868
message: |
6969
Your pull request needs to link an issue.
7070

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

+36-19
Original file line numberDiff line numberDiff line change
@@ -25,42 +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 pinned label
60-
run: gh issue edit ${{ steps.get_issue_number.outputs.ticketNumber }} --remove-label "📌 Pinned"
61-
env:
62-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
63-
- name: Remove FirstTimeCodeContribution label
64-
run: gh issue edit ${{ steps.get_issue_number.outputs.ticketNumber }} --remove-label "FirstTimeCodeContribution"
65-
env:
66-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

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

+42-3
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,18 +62,40 @@ 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
4883
- uses: actions/checkout@v4
4984
with:
5085
show-progress: 'false'
5186
- name: Assign PR creator to issue
52-
# "gh issue edit" cannot be used - workaround found at https://github.com/cli/cli/issues/9620#issuecomment-2703135049
53-
run: gh api -X PATCH /repos/JabRef/jabref/issues/${{ steps.get_issue_number.outputs.ticketNumber }} -f assignee=${{ github.event.pull_request.user.login }}
87+
run: |
88+
# "gh issue edit" cannot be used - workaround found at https://github.com/cli/cli/issues/9620#issuecomment-2703135049
89+
ASSIGNEES=$(gh api /repos/JabRef/jabref/issues/${{ steps.get_issue_number.outputs.ticketNumber }} --jq '[.assignees[].login] | @json')
90+
UPDATED_ASSIGNEES=$(echo $ASSIGNEES | jq --arg new "${{ github.event.pull_request.user.login }}" '. + [$new] | @json')
91+
gh api -X PATCH /repos/JabRef/jabref/issues/${{ steps.get_issue_number.outputs.ticketNumber }} --input <(echo "{\"assignees\": $UPDATED_ASSIGNEES}")
5492
env:
5593
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5694
- name: Add label "📌 Pinned"
5795
run: gh issue edit ${{ steps.get_issue_number.outputs.ticketNumber }} --add-label "📌 Pinned"
5896
env:
5997
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
98+
6099
conflicts_with_target:
61100
name: Conflicts with target branch
62101
runs-on: ubuntu-latest

‎.github/workflows/unassign-issues.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
unassigned_comment: |
2424
### 📋 Assignment Update
2525
26-
Hi @{{ handle }}, you are no longer assigned to this issue.
26+
Hi @{{ handle }}, due to inactivity, you have been unassigned from this issue.
2727
2828
<details open>
2929
<summary>Next steps</summary>

‎CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv
8282
- We fixed an issue where JabRef displayed an incorrect deletion notification when canceling entry deletion [#12645](https://github.com/JabRef/jabref/issues/12645)
8383
- We fixed an issue where JabRef displayed an incorrect deletion notification when canceling entry deletion. [#12645](https://github.com/JabRef/jabref/issues/12645)
8484
- We fixed an issue where an exception would occur when running abbreviate journals for multiple entries. [#12634](https://github.com/JabRef/jabref/issues/12634)
85+
- We fixed an issue where JabRef displayed dropdown triangle in wrong place in "Search for unlinked local files" dialog [#12713](https://github.com/JabRef/jabref/issues/12713)
8586

8687
### Removed
8788

‎src/main/java/org/jabref/gui/Base.css

+4
Original file line numberDiff line numberDiff line change
@@ -2492,3 +2492,7 @@ journalInfo .grid-cell-b {
24922492
#styleSelectDialog .currentStyleNameLabel {
24932493
-fx-font-size: 1em; -fx-font-weight: bold; -fx-text-fill: -jr-theme;
24942494
}
2495+
2496+
.refresh {
2497+
-fx-background-color: transparent;
2498+
}

‎src/main/java/org/jabref/gui/externalfiles/UnlinkedFilesDialogView.java

+8
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@
6060

6161
public class UnlinkedFilesDialogView extends BaseDialog<Void> {
6262

63+
private static final String REFRESH_CLASS = "refresh";
64+
6365
@FXML private TextField directoryPathField;
6466
@FXML private ComboBox<FileExtensionViewModel> fileTypeCombo;
6567
@FXML private ComboBox<DateRange> fileDateCombo;
@@ -272,6 +274,12 @@ void startImport() {
272274

273275
// Already imported files should not be re-added at a second click on "Import". Therefore, all imported files are unchecked.
274276
unlinkedFilesList.getCheckModel().clearChecks();
277+
278+
// JavaFX does not re-render everything necessary after the file import, and hence it ends up with some misalignment (see https://github.com/JabRef/jabref/issues/12713). Thus, we remove and add the CSS property to force it to re-render.
279+
Platform.runLater(() -> {
280+
accordion.getStyleClass().remove(REFRESH_CLASS);
281+
accordion.getStyleClass().add(REFRESH_CLASS);
282+
});
275283
}
276284

277285
@FXML

‎src/test/java/org/jabref/logic/importer/fetcher/ACMPortalFetcherTest.java

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import org.jabref.model.entry.BibEntry;
1212
import org.jabref.model.entry.field.StandardField;
1313
import org.jabref.model.entry.types.StandardEntryType;
14+
import org.jabref.support.DisabledOnCIServer;
1415
import org.jabref.testutils.category.FetcherTest;
1516

1617
import org.apache.lucene.queryparser.flexible.core.QueryNodeParseException;
@@ -23,6 +24,7 @@
2324
import static org.junit.jupiter.api.Assertions.assertEquals;
2425

2526
@FetcherTest
27+
@DisabledOnCIServer("ACM replied with 403 Forbidden on 2025-03-17")
2628
class ACMPortalFetcherTest {
2729
ACMPortalFetcher fetcher;
2830

‎src/test/java/org/jabref/logic/importer/fetcher/CrossRefTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ void performSearchByIdFindsPaperWithoutTitle() throws Exception {
131131
entry.setField(StandardField.YEAR, "1999");
132132
entry.setField(StandardField.JOURNAL, "Indo-Iranian Journal");
133133
entry.setField(StandardField.NUMBER, "2");
134-
entry.setField(StandardField.PUBLISHER, "Brill");
134+
entry.setField(StandardField.PUBLISHER, "Walter de Gruyter GmbH");
135135

136136
assertEquals(Optional.of(entry), fetcher.performSearchById("10.1023/a:1003473214310"));
137137
}

0 commit comments

Comments
 (0)
Please sign in to comment.