Skip to content

Commit 7d26e37

Browse files
committed
Merge branch 'configurable_external_search_features' of https://github.com/brandon-lau0/jabref into configurable_external_search_features
2 parents e4df918 + 81594d9 commit 7d26e37

File tree

188 files changed

+2368
-2043
lines changed

Some content is hidden

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

188 files changed

+2368
-2043
lines changed

.github/ghprcomment.yml

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -141,32 +141,16 @@
141141
always: true
142142
message: >
143143
Note that your PR will not be reviewed/accepted until you have gone through the mandatory checks in the description and marked each of them them exactly in the format of `[x]` (done), `[ ]` (not done yet) or `[/]` (not applicable).
144-
- jobName: 'Issue number present'
144+
- jobName: 'Determine issue number'
145145
always: true
146146
message: |
147-
Your pull request needs to link an issue.
147+
Your pull request needs to link an issue correctly.
148148
149149
To ease organizational workflows, please link this pull-request to the issue with syntax as described in <https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue>:
150150
151151
> <h2 id="linking-a-pull-request-to-an-issue-using-a-keyword">Linking a pull request to an issue using a keyword</h2>
152152
> <p>You can link a pull request to an issue by using a supported keyword
153-
> in the pull request's description or in a commit message. The pull
154-
> request <strong>must be</strong> on the default branch.</p>
155-
> <ul>
156-
> <li>close</li>
157-
> <li>closes</li>
158-
> <li>closed</li>
159-
> <li>fix</li>
160-
> <li>fixes</li>
161-
> <li>fixed</li>
162-
> <li>resolve</li>
163-
> <li>resolves</li>
164-
> <li>resolved</li>
165-
> </ul>
166-
> <p>If you use a keyword to reference a pull request comment in another
167-
> pull request, the pull requests will be linked. Merging the referencing
168-
> pull request also closes the referenced pull request.</p>
169-
> <p>The syntax for closing keywords depends on whether the issue is in the same repository as the pull request.</p>
153+
> in the pull request's description or in a commit message.
170154
171155
### Examples
172156

.github/workflows/binaries-ea.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,10 @@ jobs:
360360
--resource-dir buildres/mac \
361361
--file-associations buildres/mac/bibtexAssociations.properties \
362362
--jlink-options --bind-services \
363+
--java-options -XX:+UnlockExperimentalVMOptions \
364+
--java-options -XX:+UseCompactObjectHeaders \
365+
--java-options -XX:+UseZGC --java-options -XX:+ZUncommit \
366+
--java-options -XX:+UseStringDeduplication \
363367
--java-options --add-exports=javafx.base/com.sun.javafx.event=org.jabref.merged.module \
364368
--java-options --add-exports=javafx.controls/com.sun.javafx.scene.control=org.jabref.merged.module \
365369
--java-options --add-opens=javafx.graphics/javafx.scene=org.jabref.merged.module \

.github/workflows/binaries.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,10 @@ jobs:
259259
--resource-dir buildres/mac \
260260
--file-associations buildres/mac/bibtexAssociations.properties \
261261
--jlink-options --bind-services \
262+
--java-options -XX:+UnlockExperimentalVMOptions \
263+
--java-options -XX:+UseCompactObjectHeaders \
264+
--java-options -XX:+UseZGC --java-options -XX:+ZUncommit \
265+
--java-options -XX:+UseStringDeduplication \
262266
--java-options --add-exports=javafx.base/com.sun.javafx.event=org.jabref.merged.module \
263267
--java-options --add-exports=javafx.controls/com.sun.javafx.scene.control=org.jabref.merged.module \
264268
--java-options --add-opens=javafx.graphics/javafx.scene=org.jabref.merged.module \

.github/workflows/cleanup-pr.yml

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,40 +6,53 @@ on:
66

77
jobs:
88
cleanup:
9-
if: github.repository == 'JabRef/jabref'
9+
if: github.event.pull_request.head.repo.full_name == 'JabRef/jabref'
1010
runs-on: ubuntu-latest
1111
permissions:
1212
contents: read
1313
packages: write
1414
steps:
15-
- name: Cancel deployment run
15+
- name: Cancel workflow "binaries" run
1616
uses: styfle/cancel-workflow-action@0.12.1
1717
with:
1818
ignore_sha: true
19-
workflow_id: 9813 # workflow "Deployment"
20-
- name: Check secrets presence
21-
id: checksecrets
22-
shell: bash
19+
workflow_id: 9160969135
20+
- name: Cancel workflow "binaries (ea)" run
21+
uses: styfle/cancel-workflow-action@0.12.1
22+
with:
23+
ignore_sha: true
24+
workflow_id: 160969125
25+
- name: "Check for 'dev: binaries' label"
26+
id: check_label
2327
run: |
24-
if [ "$BUILDJABREFPRIVATEKEY" == "" ]; then
25-
echo "secretspresent=NO" >> $GITHUB_OUTPUT
26-
echo "❌ Secret BUILDJABREFPRIVATEKEY not present"
28+
labels=$(gh pr view ${{ github.event.pull_request.number }} --json labels -q '.labels[].name')
29+
if echo "$labels" | grep -Fxq "dev: binaries"; then
30+
echo "has_label_binaries=yes" >> $GITHUB_OUTPUT
2731
else
28-
echo "secretspresent=YES" >> $GITHUB_OUTPUT
29-
echo "✔️ Secret BUILDJABREFPRIVATEKEY present"
32+
echo "has_label_binaries=no" >> $GITHUB_OUTPUT
3033
fi
3134
env:
32-
BUILDJABREFPRIVATEKEY: ${{ secrets.buildJabRefPrivateKey }}
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3336
- name: Delete folder on builds.jabref.org
34-
if: steps.checksecrets.outputs.secretspresent == 'YES'
37+
if: steps.check_label.outputs.has_label_binaries == 'yes'
3538
uses: appleboy/ssh-action@v1.2.2
3639
with:
3740
script: rm -rf /var/www/builds.jabref.org/www/pull/${{ github.event.pull_request.number }} || true
3841
host: build-upload.jabref.org
3942
port: 9922
4043
username: jrrsync
4144
key: ${{ secrets.buildJabRefPrivateKey }}
45+
- name: Get changed docker files
46+
# in line with dockerimages.yml -> lines 6 and 7
47+
id: changed-docker-files
48+
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46
49+
with:
50+
# Avoid using single or double quotes for multiline patterns
51+
files: |
52+
.github/workflows/dockerimages.yml
53+
Dockerfile.*
4254
- name: Remove Docker Tag
55+
if: steps.changed-docker-files.outputs.any_changed == 'true'
4356
# A separate action is needed to delete a tag - see https://github.com/orgs/community/discussions/26267
4457
uses: rafalkk/remove-dockertag-action@v1
4558
with:

.github/workflows/dockerimages.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ jobs:
3838
type=edge,branch=main
3939
type=ref,event=pr
4040
- name: Login to GitHub Container Registry
41+
if: >
42+
(github.event_name == 'push' && github.repository == 'JabRef/jabref') ||
43+
(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'JabRef/jabref')
4144
uses: docker/login-action@v3
4245
with:
4346
registry: ghcr.io
@@ -50,7 +53,11 @@ jobs:
5053
- name: Build and push
5154
uses: docker/build-push-action@v6
5255
with:
53-
push: ${{ github.repository == 'JabRef/jabref' }}
56+
push: >
57+
${{
58+
(github.event_name == 'push' && github.repository == 'JabRef/jabref') ||
59+
(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'JabRef/jabref')
60+
}}
5461
platforms: linux/amd64
5562
tags: ${{ steps.meta.outputs.tags }}
5663
labels: ${{ steps.meta.outputs.labels }}

.github/workflows/merge-upstream.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Sync fork with upstream
2+
3+
on:
4+
pull_request:
5+
types: [ opened ]
6+
schedule:
7+
- cron: "0 6 * * *"
8+
workflow_dispatch:
9+
10+
jobs:
11+
sync-fork:
12+
if: ${{ github.repository != 'JabRef/jabref' }}
13+
runs-on: ubuntu-latest
14+
permissions:
15+
actions: write
16+
contents: write
17+
steps:
18+
- uses: thiagokokada/merge-upstream@v1.0.2
19+
with:
20+
branch: main

.github/workflows/on-issue-unassigned.yml

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,27 @@ on:
66
- unassigned
77

88
jobs:
9-
ensure_column:
9+
columns_and_labels:
1010
if: ${{ github.repository_owner == 'JabRef' }}
1111
runs-on: ubuntu-latest
1212
permissions:
1313
issues: write
14+
contents: read
1415
steps:
16+
- name: Check assignees
17+
id: check_assignee
18+
run: |
19+
issue=$(gh issue view ${{ github.event.issue.number }} --json assignees)
20+
count=$(echo "$issue" | jq '.assignees | length')
21+
if [ "$count" -gt 0 ]; then
22+
echo "assigned=yes" >> $GITHUB_OUTPUT
23+
else
24+
echo "assigned=no" >> $GITHUB_OUTPUT
25+
fi
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1528
- name: Move Issue to "Free to take" Column in "Candidates for University Projects"
29+
if: steps.check_assignee.outputs.assigned == 'no'
1630
uses: m7kvqbe1/github-action-move-issues@main
1731
with:
1832
github-token: ${{ secrets.GH_TOKEN_ACTION_MOVE_ISSUE }}
@@ -23,6 +37,7 @@ jobs:
2337
default-column: "Free to take"
2438
skip-if-not-in-project: true
2539
- name: Move Issue to "Free to take" Column in "Good First Issues"
40+
if: steps.check_assignee.outputs.assigned == 'no'
2641
uses: m7kvqbe1/github-action-move-issues@main
2742
with:
2843
github-token: ${{ secrets.GH_TOKEN_ACTION_MOVE_ISSUE }}
@@ -32,19 +47,16 @@ jobs:
3247
ignored-columns: ""
3348
default-column: "Free to take"
3449
skip-if-not-in-project: true
35-
remove_labels:
36-
if: ${{ github.repository_owner == 'JabRef' }}
37-
runs-on: ubuntu-latest
38-
permissions:
39-
issues: write
40-
contents: read
41-
steps:
4250
- uses: actions/checkout@v4
43-
- name: Remove assigned label
44-
run: gh issue edit ${{ github.event.issue.number }} --remove-label "📍 Assigned"
45-
env:
46-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47-
- name: Remove FirstTimeCodeContribution label
48-
run: gh issue edit ${{ github.event.issue.number }} --remove-label "FirstTimeCodeContribution"
51+
if: steps.check_assignee.outputs.assigned == 'no'
52+
- name: Remove labels assigned, reminder-sent, pinned, and "FirstTimeCodeContribution"
53+
if: steps.check_assignee.outputs.assigned == 'no'
54+
run: |
55+
set -e
56+
57+
gh issue edit ${{ github.event.issue.number }} --remove-label "📍 Assigned"
58+
gh issue edit ${{ github.event.issue.number }} --remove-label "🔔 reminder-sent"
59+
gh issue edit ${{ github.event.issue.number }} --remove-label "📌 Pinned"
60+
gh issue edit ${{ github.event.issue.number }} --remove-label "FirstTimeCodeContribution"
4961
env:
5062
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

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

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -86,17 +86,9 @@ jobs:
8686
gh issue edit ${{ needs.determine_issue_number.outputs.issue_number }} --remove-label "FirstTimeCodeContribution"
8787
env:
8888
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
89-
- name: Remove label pinned (to enable automated pinging and unassignment with a message)
90-
if: steps.check_assignee.outputs.assigned == 'yes'
91-
run: |
92-
set -e
93-
94-
gh issue edit ${{ needs.determine_issue_number.outputs.issue_number }} --remove-label "📌 Pinned"
95-
env:
96-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9789
- name: Move issue to "Free to take" in "Good First Issues"
9890
if: steps.check_assignee.outputs.assigned == 'no'
99-
uses: m7kvqbe1/github-action-move-issues/@add-issue-parameter
91+
uses: m7kvqbe1/github-action-move-issues/@main
10092
with:
10193
github-token: ${{ secrets.GH_TOKEN_ACTION_MOVE_ISSUE }}
10294
project-url: "https://github.com/orgs/JabRef/projects/5"
@@ -108,7 +100,7 @@ jobs:
108100
skip-if-not-in-project: true
109101
- name: Move issue to "Free to take" in "Candidates for University Projects"
110102
if: steps.check_assignee.outputs.assigned == 'no'
111-
uses: m7kvqbe1/github-action-move-issues/@add-issue-parameter
103+
uses: m7kvqbe1/github-action-move-issues/@main
112104
with:
113105
github-token: ${{ secrets.GH_TOKEN_ACTION_MOVE_ISSUE }}
114106
project-url: "https://github.com/orgs/JabRef/projects/3"

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
titleRegex: '^#(?<ticketNumber>\d+)'
4343
branchRegex: '^(?<ticketNumber>\d+)'
4444
# Matches GitHub's closes/fixes/resolves #{number}, but does not match our example `Closes #12345` in PULL_REQUEST_TEMPLATE
45-
bodyRegex: '(?<action>fixes|closes|resolves)\s+(?:https?:\/\/github\.com\/JabRef\/jabref\/issues\/)?#?(?<ticketNumber>(?!12345\b)\d+)'
45+
bodyRegex: '(?<action>fixes|closes|resolves|refs)\s+(?:https?:\/\/github\.com\/JabRef\/jabref\/issues\/)?#?(?<ticketNumber>(?!12345\b)\d+)'
4646
bodyRegexFlags: 'i'
4747
outputOnly: true
4848
- run: echo "${{ steps.get_issue_number.outputs.ticketNumber }}"
@@ -52,6 +52,7 @@ jobs:
5252
echo "No valid ticket number found!"
5353
exit 1
5454
move_issue:
55+
if: github.repository_owner == 'JabRef'
5556
name: Mark issue as in progress
5657
# after determine_issue_number to ensure that there is only one failure because of no ticket number
5758
needs: determine_issue_number
@@ -60,7 +61,7 @@ jobs:
6061
issues: write
6162
steps:
6263
- name: Move issue to "In Progress" in "Good First Issues"
63-
uses: m7kvqbe1/github-action-move-issues/@add-issue-parameter
64+
uses: m7kvqbe1/github-action-move-issues/@main
6465
with:
6566
github-token: ${{ secrets.GH_TOKEN_ACTION_MOVE_ISSUE }}
6667
project-url: "https://github.com/orgs/JabRef/projects/5"
@@ -71,7 +72,7 @@ jobs:
7172
issue-number: ${{ needs.determine_issue_number.outputs.issue_number }}
7273
skip-if-not-in-project: true
7374
- name: Move issue to "In Progress" in "Candidates for University Projects"
74-
uses: m7kvqbe1/github-action-move-issues/@add-issue-parameter
75+
uses: m7kvqbe1/github-action-move-issues/@main
7576
with:
7677
github-token: ${{ secrets.GH_TOKEN_ACTION_MOVE_ISSUE }}
7778
project-url: "https://github.com/orgs/JabRef/projects/3"
@@ -82,6 +83,7 @@ jobs:
8283
issue-number: ${{ needs.determine_issue_number.outputs.issue_number }}
8384
skip-if-not-in-project: true
8485
ensure_assignment:
86+
if: github.repository_owner == 'JabRef'
8587
name: Ensure that contributor is assigned (fails if not commented on issue)
8688
# after determine_issue_number to ensure that there is only one failure because of no ticket number
8789
needs: determine_issue_number
@@ -141,6 +143,7 @@ jobs:
141143
env:
142144
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
143145
upload-pr-number:
146+
if: ${{ github.repository == 'JabRef/jabref' }}
144147
runs-on: ubuntu-latest
145148
steps:
146149
- name: Create pr_number.txt

.github/workflows/unassign-issues.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
jobs:
99
unassign_issues:
10-
if: github.repository == 'JabRef/jabref'
10+
if: github.repository_owner == 'JabRef'
1111
runs-on: ubuntu-latest
1212
permissions:
1313
issues: write
@@ -65,7 +65,7 @@ jobs:
6565
issue_number: ${{ fromJson(needs.unassign_issues.outputs.unassigned_issues) }}
6666
steps:
6767
- name: Move issue to "Free to take" in "Good First Issues"
68-
uses: m7kvqbe1/github-action-move-issues/@add-issue-parameter
68+
uses: m7kvqbe1/github-action-move-issues/@main
6969
with:
7070
github-token: ${{ secrets.GH_TOKEN_ACTION_MOVE_ISSUE }}
7171
project-url: "https://github.com/orgs/JabRef/projects/5"
@@ -76,7 +76,7 @@ jobs:
7676
issue-number: ${{ matrix.issue_number }}
7777
skip-if-not-in-project: true
7878
- name: Move issue to "Free to take" in "Candidates for University Projects"
79-
uses: m7kvqbe1/github-action-move-issues/@add-issue-parameter
79+
uses: m7kvqbe1/github-action-move-issues/@main
8080
with:
8181
github-token: ${{ secrets.GH_TOKEN_ACTION_MOVE_ISSUE }}
8282
project-url: "https://github.com/orgs/JabRef/projects/3"

0 commit comments

Comments
 (0)