Skip to content

Commit

Permalink
Merge branch 'main' into fix-for-issue-#372
Browse files Browse the repository at this point in the history
  • Loading branch information
KUMOAWAI authored Feb 23, 2025
2 parents 81043b7 + f328ebf commit 1a7bbb7
Show file tree
Hide file tree
Showing 174 changed files with 2,705 additions and 979 deletions.
1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
YOU HAVE TO MODIFIY THIS TEXT TO FIT YOUR PR. OTHERWISE YOUR PR WILL BE CLOSED WITHOUT FURTHER COMMENT.
Describe the changes you have made here: what, why, ...
Link the issue that will be closed, e.g., "Closes #333". If your PR closes a koppor issue, link it using its URL, e.g., "Closes https://github.com/koppor/jabref/issues/47".

Expand Down
25 changes: 18 additions & 7 deletions .github/ghprcomment.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
- jobName: Checkstyle
message: |
message: >
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).
We use [Checkstyle](https://checkstyle.sourceforge.io/) to identify issues.
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).
Expand All @@ -8,22 +8,22 @@
In case of issues with the import order, double check that you [activated Auto Import](https://devdocs.jabref.org/getting-into-the-code/guidelines-for-setting-up-a-local-workspace/intellij-13-code-style.html#enable-proper-import-cleanup).
You can trigger fixing imports by pressing <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>O</kbd> to trigger [Optimize Imports](https://www.jetbrains.com/guide/tips/optimize-imports/).
- jobName: OpenRewrite
message: |
message: >
Your code currently does not meet JabRef's code guidelines.
We use [OpenRewrite](https://docs.openrewrite.org/) to ensure "modern" Java coding practices.
The issues found can be **automatically fixed**.
Please execute the gradle task *`rewriteRun`*, check the results, commit, and push.
You can check the detailed error output by navigating to your pull request, selecting the tab "Checks", section "Tests" (on the left), subsection "OpenRewrite".
- jobName: Modernizer
message: |
message: >
Your code currently does not meet JabRef's code guidelines.
We use [Gradle Modernizer Plugin](https://github.com/andygoossens/gradle-modernizer-plugin#gradle-modernizer-plugin) to ensure "modern" Java coding practices.
Please fix the detected errors, commit, and push.
You can check the detailed error output by navigating to your pull request, selecting the tab "Checks", section "Tests" (on the left), subsection "Modernizer".
- jobName: Markdown
message: |
message: >
You modified Markdown (`*.md`) files and did not meet JabRef's rules for consistently formatted Markdown files.
To ensure consistent styling, we have [markdown-lint](https://github.com/DavidAnson/markdownlint) in place.
[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.
Expand All @@ -34,7 +34,18 @@
While the PR was in progress, a new version of JabRef has been released.
You have to merge `upstream/main` and move your entry in `CHANGELOG.md` up to the section `## [Unreleased]`.
- jobName: 'Unit tests'
message: |
JUnit tests are failing. In the area "Some checks were not successful", locate "Tests / Unit tests (pull_request)" and click on "Details". This brings you to the test output.
message: >
JUnit tests are failing.
In the area "Some checks were not successful", locate "Tests / Unit tests (pull_request)" and click on "Details".
This brings you to the test output.
You can then run these tests in IntelliJ to reproduce the failing tests locally. 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.
You can then run these tests in IntelliJ to reproduce the failing tests locally.
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.
- jobName: no-force-push
message: >
Do not force-push!
Force push is off limits and very bad style when working together on a project.
([Mainly because it is not supported well by GitHub istself.](https://github.com/orgs/community/discussions/3478))
Commits will be lost, comments on commits will loose their context.
This makes it harder to review.
In 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) either way before being merged into the `main`` branch.
2 changes: 1 addition & 1 deletion .github/workflows/check-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
restore-keys: cache-lychee-
- name: Link Checker
id: lychee
uses: lycheeverse/lychee-action@v2.2.0
uses: lycheeverse/lychee-action@v2.3.0
with:
fail: true
args: --accept '200,201,202,203,204,403,429,500' --max-concurrency 1 --cache --no-progress --exclude-all-private './**/*.md'
2 changes: 1 addition & 1 deletion .github/workflows/deployment-jdk-ea.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: Deployment (JDK early access builds)

on:
schedule:
- cron: "0 18 * * 1"
- cron: "0 18 * * *"
pull_request:
paths:
- .github/workflows/deployment-jdk-ea.yml
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/product-map.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Product Map Generation

on:
push:
branches:
- main
pull_request:

jobs:
generate-map:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 100

- name: Get changed Java files
id: changed-files
run: |
FILES=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }} -- '*.java' | sed 's|^|\"|' | sed 's|$|\"|' | paste -sd "," -)
if [ -z "$FILES" ]; then FILES="\"dummy.java\""; fi
echo "expected_files=(${FILES})" >> $GITHUB_ENV
- name: ProductMap Map Generation
uses: product-map/product-map-action@v1.0.15
# disabled because of https://github.com/product-map/product-map-action/issues/7
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
expected_files: ${{ env.expected_files }}
user_email: koppdev@gmail.com
26 changes: 24 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ jobs:
- name: Run checkstyle using gradle
run: ./gradlew checkstyleMain checkstyleTest checkstyleJmh


openrewrite:
name: OpenRewrite
runs-on: ubuntu-latest
Expand Down Expand Up @@ -131,7 +130,7 @@ jobs:
export PATH=$PATH:$HOME/.jbang/bin
# run heylogs verification
jbang com.github.nbbrd.heylogs:heylogs-cli:0.9.2:bin check CHANGELOG.md > heylogs.txt || true
jbang com.github.nbbrd.heylogs:heylogs-cli:0.9.3:bin check CHANGELOG.md > heylogs.txt || true
# improve output
sed -i 's/all-h2-contain-a-version/all-h2-contain-a-version (ignored)/' heylogs.txt
Expand Down Expand Up @@ -372,6 +371,29 @@ jobs:
- name: Merge Conflict finder
uses: olivernybroe/action-conflict-finder@v4.0

no-force-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Check force push
id: force_push_check
run: |
if [[ -z "${{ github.event.before }}" ]]; then
echo "✅ New PR created."
exit 0
fi
if git cat-file -e ${{ github.event.before }} 2>/dev/null; then
echo "✅ Regular push detected."
exit 0
else
echo "❌ Force push detected"
exit 1
fi
other_than_main:
name: Source branch is other than "main"
runs-on: ubuntu-latest
Expand Down
Loading

0 comments on commit 1a7bbb7

Please sign in to comment.