Skip to content

Commit bf98fba

Browse files
committed
Merge remote-tracking branch 'upstream/main'
* upstream/main: Also label PR if good first issue is made (#13526) New Crowdin updates (#13529) chore(deps): update dependency org.apache.logging.log4j:log4j-to-slf4j to v2.25.1 (#13528) chore: bump-okhttp-4.12.0-to-5.0.0 (#13521) Have the picker always on top (#13525) Refactor PushToApplications and split into logic and GUI (#13514) Add field to change HTTP port (#13479) Fix trigger of comment Use Java 11 isBlank (#13523) Add run openrewrite (#13524) Comment ion PR just opened (#13522) Improve merge logic to prefer valid year and entry type (#13506) Update dependency com.konghq:unirest-modules-gson to v4.4.12 (#13517) Add rpm target (#13516) Revert module name changes for remaining 'unnamed' Jars (#13515) fix: revert Java module names to restore Status Log compatibility in JabRef 5.15 (#13511) update java vendor in devcontainer and sdkmanrc (#13513)
2 parents ff27f53 + 96041a2 commit bf98fba

File tree

98 files changed

+1519
-892
lines changed

Some content is hidden

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

98 files changed

+1519
-892
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:
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

.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

0 commit comments

Comments
 (0)