Skip to content

Commit 4c51cb1

Browse files
Merge branch 'main' into hotfix/11674-deprecated-api-usages
* main: Rename ghprcomment.yaml to ghprcomment.yml Add commenting functionality (JabRef#11672) Bump io.github.classgraph:classgraph from 4.8.174 to 4.8.175 (JabRef#11676) Bump io.github.stefanbratanov:jvm-openai from 0.9.3 to 0.10.0 (JabRef#11680) Bump com.puppycrawl.tools:checkstyle from 10.17.0 to 10.18.0 (JabRef#11679) Bump com.h2database:h2-mvstore from 2.3.230 to 2.3.232 (JabRef#11678) Bump org.postgresql:postgresql from 42.7.3 to 42.7.4 (JabRef#11677) Bump src/main/resources/csl-styles from `d9989a2` to `35ac18d` (JabRef#11675)
2 parents a8a877e + 7fd810e commit 4c51cb1

File tree

5 files changed

+104
-6
lines changed

5 files changed

+104
-6
lines changed

.github/ghprcomment.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
- jobName: Checkstyle
2+
message: |
3+
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).
4+
We use [Checkstyle](https://checkstyle.sourceforge.io/) to identify issues.
5+
The tool reviewdog already placed comments on GitHub to indicate the places. See the tab "Files" in you PR.
6+
Please carefully follow [the setup guide for the codestyle](https://devdocs.jabref.org/getting-into-the-code/guidelines-for-setting-up-a-local-workspace/intellij-13-code-style.html).
7+
Afterwards, please [run checkstyle locally](https://devdocs.jabref.org/getting-into-the-code/guidelines-for-setting-up-a-local-workspace/intellij-13-code-style.html#run-checkstyle) and fix the issues.
8+
9+
10+
You can check review dog's comments at the tab "Files changed" of your pull request.
11+
- jobName: OpenRewrite
12+
message: |
13+
Your code currently does not meet JabRef's code guidelines.
14+
We use [OpenRewrite](https://docs.openrewrite.org/) to ensure "modern" Java coding practices.
15+
The issues found can be **automatically fixed**.
16+
Please execute the gradle task *`rewriteRun`*, check the results, commit, and push.
17+
18+
You can check the detailed error output by navigating to your pull request, selecting the tab "Checks", section "Tests" (on the left), subsection "OpenRewrite".
19+
- jobName: Modernizer
20+
message: |
21+
Your code currently does not meet JabRef's code guidelines.
22+
We use [Gradle Modernizer Plugin](https://github.com/andygoossens/gradle-modernizer-plugin#gradle-modernizer-plugin) to ensure "modern" Java coding practices.
23+
Please fix the detected errors, commit, and push.
24+
25+
You can check the detailed error output by navigating to your pull request, selecting the tab "Checks", section "Tests" (on the left), subsection "Modernizer".
26+
- jobName: Markdown
27+
message: |
28+
You modified Markdown (`*.md`) files and did not meet JabRef's rules for consistently formatted Markdown files.
29+
To ensure consistent styling, we have [markdown-lint](https://github.com/DavidAnson/markdownlint) in place.
30+
[Markdown lint's rules](https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#rules) help to keep our Markdown files consistent within this repository and consistent with the Markdown files outside here.
31+
32+
You can check the detailed error output by navigating to your pull request, selecting the tab "Checks", section "Tests" (on the left), subsection "Markdown".
33+
- jobName: CHANGELOG.md
34+
message: |
35+
While the PR was in progress, a new version of JabRef has been released.
36+
You have to merge `upstream/main` and move your entry in `CHANGELOG.md` up to the section `## [Unreleased]`.

.github/workflows/pr-comment.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Description: This workflow is triggered when the "Check" workflow completes.
2+
# Since this pull request has write permissions on the target repo, we should **NOT** execute any untrusted code.
3+
# https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
4+
# Based on https://github.com/spring-projects/spring-security/pull/15477/files
5+
---
6+
name: Comment on PR
7+
8+
on:
9+
workflow_run:
10+
workflows: ["Tests"]
11+
types:
12+
- completed
13+
14+
jobs:
15+
comment:
16+
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#running-a-workflow-based-on-the-conclusion-of-another-workflow
17+
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
18+
runs-on: ubuntu-latest
19+
permissions:
20+
actions: read
21+
contents: read
22+
pull-requests: write
23+
timeout-minutes: 10
24+
steps:
25+
- name: Download PR number
26+
uses: actions/download-artifact@v4
27+
with:
28+
name: pr_number
29+
github-token: ${{ secrets.GITHUB_TOKEN }}
30+
run-id: ${{ github.event.workflow_run.id }}
31+
- name: Read pr_number.txt
32+
id: read-pr_number
33+
run: |
34+
PR_NUMBER=$(cat pr_number.txt)
35+
echo "Read PR number $PR_NUMBER"
36+
echo "pr_number=$PR_NUMBER" >> $GITHUB_OUTPUT
37+
- name: Checkout
38+
if: ${{ steps.read-pr_number.outputs.pr_number != '' }}
39+
uses: actions/checkout@v4
40+
with:
41+
fetch-depth: '0'
42+
show-progress: 'false'
43+
token: ${{ secrets.GITHUB_TOKEN }}
44+
- name: jbang
45+
if: ${{ steps.read-pr_number.outputs.pr_number != '' }}
46+
uses: jbangdev/jbang-action@v0.117.1
47+
with:
48+
script: ghprcomment@koppor/ghprcomment
49+
scriptargs: "-r koppor/workflow-comment-test -p ${{ steps.read-pr_number.outputs.pr_number }} -w ${{ github.event.workflow_run.id }}"
50+
trust: https://github.com/koppor/ghprcomment/
51+
env:
52+
GITHUB_OAUTH: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/tests.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,3 +363,13 @@ jobs:
363363
with:
364364
script: |
365365
core.setFailed('Pull requests should come from a branch other than "main"\n\n👉 Please read https://devdocs.jabref.org/contributing again carefully. 👈')
366+
367+
upload-pr-number:
368+
runs-on: ubuntu-latest
369+
steps:
370+
- name: Create pr_number.txt
371+
run: echo "${{ github.event.number }}" > pr_number.txt
372+
- uses: actions/upload-artifact@v4
373+
with:
374+
name: pr_number
375+
path: pr_number.txt

build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ dependencies {
175175
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.16.0'
176176
implementation group: 'org.apache.commons', name: 'commons-text', version: '1.12.0'
177177
implementation 'commons-logging:commons-logging:1.3.3'
178-
implementation 'com.h2database:h2-mvstore:2.3.230'
178+
implementation 'com.h2database:h2-mvstore:2.3.232'
179179

180180
// required for reading write-protected PDFs - see https://github.com/JabRef/jabref/pull/942#issuecomment-209252635
181181
implementation 'org.bouncycastle:bcprov-jdk18on:1.78.1'
@@ -205,7 +205,7 @@ dependencies {
205205

206206
implementation group: 'org.mariadb.jdbc', name: 'mariadb-java-client', version: '2.7.9'
207207

208-
implementation 'org.postgresql:postgresql:42.7.3'
208+
implementation 'org.postgresql:postgresql:42.7.4'
209209

210210
// Support unix socket connection types
211211
implementation 'com.kohlschutter.junixsocket:junixsocket-core:2.10.0'
@@ -334,7 +334,7 @@ dependencies {
334334
implementation 'ai.djl:api:0.29.0'
335335
implementation 'ai.djl.pytorch:pytorch-model-zoo:0.29.0'
336336
implementation 'ai.djl.huggingface:tokenizers:0.29.0'
337-
implementation 'io.github.stefanbratanov:jvm-openai:0.9.3'
337+
implementation 'io.github.stefanbratanov:jvm-openai:0.10.0'
338338
// openai depends on okhttp, which needs kotlin - see https://github.com/square/okhttp/issues/5299 for details
339339
implementation ('com.squareup.okhttp3:okhttp:4.12.0') {
340340
exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib-jdk8'
@@ -344,7 +344,7 @@ dependencies {
344344

345345
implementation 'commons-io:commons-io:2.16.1'
346346

347-
testImplementation 'io.github.classgraph:classgraph:4.8.174'
347+
testImplementation 'io.github.classgraph:classgraph:4.8.175'
348348
testImplementation 'org.junit.jupiter:junit-jupiter:5.11.0'
349349
testImplementation 'org.junit.platform:junit-platform-launcher:1.10.3'
350350

@@ -357,7 +357,7 @@ dependencies {
357357
testImplementation "org.testfx:testfx-junit5:4.0.16-alpha"
358358
testImplementation "org.hamcrest:hamcrest-library:3.0"
359359

360-
checkstyle 'com.puppycrawl.tools:checkstyle:10.17.0'
360+
checkstyle 'com.puppycrawl.tools:checkstyle:10.18.0'
361361
// xjc needs the runtime as well for the ant task, otherwise it fails
362362
xjc group: 'org.glassfish.jaxb', name: 'jaxb-xjc', version: '3.0.2'
363363
xjc group: 'org.glassfish.jaxb', name: 'jaxb-runtime', version: '3.0.2'

0 commit comments

Comments
 (0)