Skip to content

Commit 35e3255

Browse files
committed
Merge remote-tracking branch 'upstream/main' into clean-gsoc-git-support-init
2 parents f1214d9 + ecedf1e commit 35e3255

File tree

131 files changed

+1622
-926
lines changed

Some content is hidden

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

131 files changed

+1622
-926
lines changed

.github/ghprcomment.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,16 @@
154154
See [CONTRIBUTING.md](https://github.com/JabRef/jabref/blob/main/CONTRIBUTING.md#pull-request-process) for more details.
155155
156156
157-
# PR text
157+
# PR hygiene
158+
159+
- jobName: 'Ensure that contributor is assigned (fails if not commented on issue)'
160+
workflowName: 'On PR opened/updated'
161+
message: >
162+
You did not assign yourself to the issue.
163+
Thus, it 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.
164+
165+
166+
Give it a read, and you’ll discover the ancient wisdom of assigning issues to yourself. Trust me, it’s worth it. 🚀
158167
159168
- jobName: 'PR title must not start with "Fix for issue <number>"'
160169
workflowName: 'PR Tests'

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

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ jobs:
8585
skip-if-not-in-project: true
8686
ensure_assignment:
8787
name: Ensure that contributor is assigned (fails if not commented on issue)
88+
if: github.event.pull_request.head.repo.full_name != 'JabRef/jabref'
8889
# after determine_issue_number to ensure that there is only one failure because of no ticket number
8990
needs: determine_issue_number
9091
runs-on: ubuntu-latest
@@ -114,10 +115,25 @@ jobs:
114115
# Append the new assignee
115116
UPDATED_ASSIGNEES=$(echo "$ASSIGNEES" | jq --arg new "${{ github.event.pull_request.user.login }}" '. + [$new]')
116117
118+
LABELS=$(gh api repos/${{ github.repository }}/issues/${{ needs.determine_issue_number.outputs.issue_number }}/labels --jq '.[].name')
119+
LABEL=$(echo "$LABELS" | grep -E '^good (first|second|third|forth) issue$' || true)
120+
if [ -n "$LABEL" ]; then
121+
echo "✅ Found label: $LABEL"
122+
SILENT=false
123+
# Apply label
124+
gh issue edit "${{ github.event.pull_request.number }}" --add-label "$LABEL"
125+
else
126+
echo "🚫 Silent fail if not possible to add assignee"
127+
SILENT=true
128+
fi
129+
117130
# Update issue with the new assignee list
118131
echo "Updating issue #${{ needs.determine_issue_number.outputs.issue_number }} updated with assignees: $UPDATED_ASSIGNEES..."
119-
gh api -X PATCH /repos/JabRef/jabref/issues/${{ needs.determine_issue_number.outputs.issue_number }} --input <(echo "{\"assignees\": $UPDATED_ASSIGNEES}")
120-
132+
if [ "$SILENT" = true ]; then
133+
gh api -X PATCH /repos/JabRef/jabref/issues/${{ needs.determine_issue_number.outputs.issue_number }} --input <(echo "{\"assignees\": $UPDATED_ASSIGNEES}") || true
134+
else
135+
gh api -X PATCH /repos/JabRef/jabref/issues/${{ needs.determine_issue_number.outputs.issue_number }} --input <(echo "{\"assignees\": $UPDATED_ASSIGNEES}")
136+
fi
121137
env:
122138
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
123139
- name: Add label "📌 Pinned"

.github/workflows/pr-comment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ name: Comment on PR
77

88
on:
99
workflow_run:
10-
workflows: ["Tests", "On PR opened/updated"]
10+
workflows: ["Source Code Tests", "On PR opened/updated", "PR Tests"]
1111
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#running-a-workflow-based-on-the-conclusion-of-another-workflow
1212
types: [completed]
1313
workflow_dispatch:

.github/workflows/run-openrewrite.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Run OpenRewrite
2+
3+
permissions:
4+
contents: write
5+
pull-requests: read
6+
7+
on:
8+
workflow_dispatch:
9+
inputs:
10+
pr_number:
11+
description: 'Pull Request number'
12+
required: true
13+
type: number
14+
15+
concurrency:
16+
group: "${{ github.workflow }}-${{ github.head_ref || github.ref }}-${{ github.event_name }}"
17+
cancel-in-progress: true
18+
19+
jobs:
20+
rewrite:
21+
runs-on: ubuntu-latest
22+
23+
steps:
24+
- name: Checkout repo
25+
uses: actions/checkout@v4
26+
27+
- name: Fetch PR branch
28+
run: |
29+
gh pr checkout ${{ inputs.pr_number }}
30+
env:
31+
GH_TOKEN: ${{secrets.GH_TOKEN_JABREF_MACHINE_PR_APPROVE}}
32+
33+
- name: Set up JDK
34+
uses: actions/setup-java@v4
35+
with:
36+
java-version: 24.0.1
37+
distribution: 'zulu'
38+
- name: Setup Gradle
39+
uses: gradle/actions/setup-gradle@v4
40+
- name: Generate JBang cache key
41+
id: cache-key
42+
shell: bash
43+
run: |
44+
echo "cache_key=jbang-$(date +%F)" >> $GITHUB_OUTPUT
45+
- name: Use cache
46+
uses: actions/cache@v4
47+
with:
48+
lookup-only: true
49+
path: ~/.jbang
50+
key: ${{ steps.cache-key.outputs.cache_key }}
51+
restore-keys:
52+
jbang-
53+
- name: Setup JBang
54+
uses: jbangdev/setup-jbang@main
55+
56+
- name: Run rewrite
57+
run: ./gradlew rewriteRun
58+
59+
- name: Commit and push changes
60+
run: |
61+
git config user.name "github-actions[bot]"
62+
git config user.email "github-actions[bot]@users.noreply.github.com"
63+
if git diff --quiet; then
64+
echo "No changes to commit."
65+
else
66+
git add .
67+
git commit -m "Fix issues using OpenRewrite"
68+
git push
69+
fi

.github/workflows/tests-pr.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,14 @@ jobs:
3939
if echo "$TITLE" | grep -Eiq '^Fix for issue #?[0-9]+'; then
4040
echo "❌ Title starts with 'Fix for issue <number>' — not allowed."
4141
exit 1
42-
else
43-
echo "✅ Title format OK"
4442
fi
43+
44+
if echo "$TITLE" | grep -Eiq '^Fixed the issue'; then
45+
echo "❌ Title starts with 'Fixed the issue' — not allowed."
46+
exit 1
47+
fi
48+
49+
echo "✅ Title format OK"
4550
env:
4651
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4752

.jbang/JabSrvLauncher.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@
5656
//DEPS org.tinylog:slf4j-tinylog:2.7.0
5757
//DEPS org.tinylog:tinylog-impl:2.7.0
5858
//DEPS org.slf4j:jul-to-slf4j:2.0.17
59-
//DEPS org.apache.logging.log4j:log4j-to-slf4j:2.25.0
59+
//DEPS org.apache.logging.log4j:log4j-to-slf4j:2.25.1
6060
//DEPS info.picocli:picocli:4.7.7
6161
//DEPS org.postgresql:postgresql:42.7.7
6262
//DEPS org.bouncycastle:bcprov-jdk18on:1.81
63-
//DEPS com.konghq:unirest-modules-gson:4.4.7
63+
//DEPS com.konghq:unirest-modules-gson:4.4.12
6464
//DEPS jakarta.ws.rs:jakarta.ws.rs-api:4.0.0
6565
//DEPS org.glassfish.jersey.core:jersey-server:3.1.10
6666
//DEPS org.glassfish.jersey.inject:jersey-hk2:3.1.10
@@ -72,7 +72,7 @@
7272
//DEPS org.glassfish.grizzly:grizzly-framework:4.0.2
7373
//DEPS jakarta.validation:jakarta.validation-api:3.1.1
7474
//DEPS org.hibernate.validator:hibernate-validator:9.0.1.Final
75-
//DEPS com.konghq:unirest-modules-gson:4.4.7
75+
//DEPS com.konghq:unirest-modules-gson:4.4.12
7676
//DEPS com.google.guava:guava:33.4.8-jre
7777
//DEPS org.jabref:afterburner.fx:2.0.0
7878
//DEPS net.harawata:appdirs:1.4.0

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv
7474
- We fixed an issue where Document Viewer showed technical exceptions when opening entries with non-PDF files. [#13198](https://github.com/JabRef/jabref/issues/13198)
7575
- When creating a library, if you drag a PDF file containing only a single column, the dialog will now automatically close. [#13262](https://github.com/JabRef/jabref/issues/13262)
7676
- We fixed an issue where the tab showing the fulltext search results would appear blank after switching library. [#13241](https://github.com/JabRef/jabref/issues/13241)
77+
- Enhanced field selection logic in the Merge Entries dialog when fetching from DOI to prefer valid years and entry types. [#12549](https://github.com/JabRef/jabref/issues/12549)
7778

7879
### Removed
7980

build-logic/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ dependencies {
1212
implementation("com.adarshr:gradle-test-logger-plugin:4.0.0")
1313
implementation("com.autonomousapps:dependency-analysis-gradle-plugin:2.19.0")
1414
implementation("com.github.andygoossens:gradle-modernizer-plugin:1.11.0")
15-
implementation("org.gradlex:extra-java-module-info:1.12")
15+
implementation("org.gradlex:extra-java-module-info:1.13")
1616
implementation("org.gradlex:java-module-dependencies:1.9.2")
1717
implementation("org.gradlex:java-module-packaging:1.1") // required for platform-specific packaging of JavaFX dependencies
1818
implementation("org.gradlex:java-module-testing:1.7")

build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ jvmDependencyConflicts.patch {
8282

8383
extraJavaModuleInfo {
8484
failOnAutomaticModules = true
85+
failOnModifiedDerivedModuleNames = true
8586
skipLocalJars = true
8687

8788
knownModule("com.github.hypfvieh:dbus-java-core", "org.freedesktop.dbus")
@@ -147,7 +148,8 @@ extraJavaModuleInfo {
147148
}
148149
module("com.konghq:unirest-modules-gson", "unirest.modules.gson")
149150
module("com.squareup.okhttp3:okhttp", "okhttp3")
150-
module("com.squareup.okhttp3:okhttp-sse", "okhttp3.sse")
151+
module("com.squareup.okhttp3:okhttp-jvm", "okhttp3")
152+
module("com.squareup.okhttp3:okhttp-jvm-sse", "okhttp3.sse")
151153
module("com.squareup.okio:okio", "okio")
152154
module("com.squareup.retrofit2:converter-jackson", "retrofit2.converter.jackson")
153155
module("com.squareup.retrofit2:retrofit", "retrofit2")
@@ -280,7 +282,7 @@ extraJavaModuleInfo {
280282
module("net.javacrumbs.json-unit:json-unit-core", "net.javacrumbs.jsonunit.core")
281283
module("com.github.javaparser:javaparser-core", "com.github.javaparser.core")
282284
module("com.github.javaparser:javaparser-symbol-solver-core", "com.github.javaparser.symbolsolver.core")
283-
module("net.sf.jopt-simple:jopt-simple", "net.sf.jopt.simple")
285+
module("net.sf.jopt-simple:jopt-simple", "jopt.simple")
284286

285287
module("com.tngtech.archunit:archunit-junit5-api", "com.tngtech.archunit.junit5.api") {
286288
exportAllPackages()
@@ -361,7 +363,7 @@ extraJavaModuleInfo {
361363
requires("java.xml")
362364
requires("jakarta.xml.bind")
363365
}
364-
module("org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-grizzly2", "jersey.test.provider.grizzly2") {
366+
module("org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-grizzly2", "jersey.test.framework.provider.grizzly2") {
365367
requireAllDefinedDependencies()
366368
requires("java.logging")
367369
}
@@ -581,5 +583,5 @@ extraJavaModuleInfo {
581583
module("org.openjdk.jmh:jmh-generator-asm", "jmh.generator.asm")
582584
module("org.openjdk.jmh:jmh-generator-bytecode", "jmh.generator.bytecode")
583585
module("org.openjdk.jmh:jmh-generator-reflection", "jmh.generator.reflection")
584-
module("org.apache.commons:commons-math3", "org.apache.commons.math3")
586+
module("org.apache.commons:commons-math3", "commons.math3")
585587
}

build-logic/src/main/kotlin/org.jabref.gradle.base.targets.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ javaModulePackaging {
1818
target("ubuntu-22.04") {
1919
operatingSystem = OperatingSystemFamily.LINUX
2020
architecture = MachineArchitecture.X86_64
21-
packageTypes = listOf("app-image", "deb")
21+
packageTypes = listOf("app-image", "deb", "rpm")
2222
}
2323
target("ubuntu-22.04-arm") {
2424
operatingSystem = OperatingSystemFamily.LINUX
2525
architecture = MachineArchitecture.ARM64
26-
packageTypes = listOf("app-image", "deb")
26+
packageTypes = listOf("app-image", "deb", "rpm")
2727
}
2828
target("macos-13") {
2929
operatingSystem = OperatingSystemFamily.MACOS

0 commit comments

Comments
 (0)