From 705629edc44a46acac3d0571787f7627305e7649 Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Fri, 18 Oct 2024 12:39:15 +0200 Subject: [PATCH 1/9] Update takanome-dev/assign-issue-action to beta (#12012) * Update takanome-dev/assign-issue-action to beta * Update actions to test actions * Add required "maitnainers" field --- .github/workflows/assign-issue.yml | 28 ++++++++++++- .github/workflows/on-labeled-issue.yml | 51 ++++++++---------------- .github/workflows/on-unlabeled-issue.yml | 30 +++++++------- 3 files changed, 59 insertions(+), 50 deletions(-) diff --git a/.github/workflows/assign-issue.yml b/.github/workflows/assign-issue.yml index 70c89775742..30a2e19e2f3 100644 --- a/.github/workflows/assign-issue.yml +++ b/.github/workflows/assign-issue.yml @@ -10,12 +10,16 @@ on: jobs: assign: runs-on: ubuntu-latest + permissions: + issues: write steps: - name: Assign the user or unassign stale assignments - uses: takanome-dev/assign-issue-action@v2.1.1 + id: assign + uses: takanome-dev/assign-issue-action@refactor-rewrite-action with: github_token: '${{ secrets.GITHUB_TOKEN }}' days_until_unassign: 30 + maintainers: koppor, Siedlerchr, ThiloteE, calixtus, HoussemNasri assigned_comment: | 👋 Hey @{{ comment.user.login }}, @@ -32,3 +36,25 @@ jobs: 🔧 A maintainer can also add the **{{ inputs.pin_label }}** label to prevent it from being unassigned automatically. Happy coding! 🚀 + - name: Move Issue to "Assigned" Column in "Candidates for University Projects" + if: steps.assign.outputs.assigned == 'yes' + uses: m7kvqbe1/github-action-move-issues@feat/skip-if-not-in-project-flag + with: + github-token: ${{ secrets.GH_TOKEN_ACTION_MOVE_ISSUE }} + project-url: "https://github.com/orgs/JabRef/projects/3" + target-labels: "📍 Assigned" + target-column: "Assigned" + ignored-columns: "" + default-column: "Free to take" + skip-if-not-in-project: true + - name: Move Issue to "Assigned" Column in "Good First Issues" + if: steps.assign.outputs.assigned == 'yes' + uses: m7kvqbe1/github-action-move-issues@feat/skip-if-not-in-project-flag + with: + github-token: ${{ secrets.GH_TOKEN_ACTION_MOVE_ISSUE }} + project-url: "https://github.com/orgs/JabRef/projects/5" + target-labels: "📍 Assigned" + target-column: "Assigned" + ignored-columns: "" + default-column: "Free to take" + skip-if-not-in-project: true diff --git a/.github/workflows/on-labeled-issue.yml b/.github/workflows/on-labeled-issue.yml index 6d2600da58b..8839eca84b7 100644 --- a/.github/workflows/on-labeled-issue.yml +++ b/.github/workflows/on-labeled-issue.yml @@ -31,44 +31,25 @@ jobs: Happy coding! 🚀 - name: Move Issue to "Assigned" Column in "Candidates for University Projects" - uses: m7kvqbe1/github-action-move-issues@v1.1.1 + uses: m7kvqbe1/github-action-move-issues@feat/skip-if-not-in-project-flag with: - github-token: ${{ secrets.GH_TOKEN_ACTION_MOVE_ISSUE }} - project-url: "https://github.com/orgs/JabRef/projects/3" - target-labels: "FirstTimeCodeContribution" - target-column: "Assigned" - ignored-columns: "" + github-token: ${{ secrets.GH_TOKEN_ACTION_MOVE_ISSUE }} + project-url: "https://github.com/orgs/JabRef/projects/3" + target-labels: "📍 Assigned" + target-column: "Assigned" + ignored-columns: "" + default-column: "Free to take" + skip-if-not-in-project: true - name: Move Issue to "Assigned" Column in "Good First Issues" - uses: m7kvqbe1/github-action-move-issues@v1.1.1 + uses: m7kvqbe1/github-action-move-issues@feat/skip-if-not-in-project-flag with: - github-token: ${{ secrets.GH_TOKEN_ACTION_MOVE_ISSUE }} - project-url: "https://github.com/orgs/JabRef/projects/5" - target-labels: "FirstTimeCodeContribution" - target-column: "Assigned" - ignored-columns: "" - Assigned: - name: "📍 Assigned" - if: ${{ github.event.label.name == '📍 Assigned' }} - runs-on: ubuntu-latest - permissions: - issues: write - steps: - - name: Move Issue to "Assigned" Column in "Candidates for University Projects" - uses: m7kvqbe1/github-action-move-issues@v1.1.1 - with: - github-token: ${{ secrets.GH_TOKEN_ACTION_MOVE_ISSUE }} - project-url: "https://github.com/orgs/JabRef/projects/3" - target-labels: "📍 Assigned" - target-column: "Assigned" - ignored-columns: "" - - name: Move Issue to "Assigned" Column in "Good First Issues" - uses: m7kvqbe1/github-action-move-issues@v1.1.1 - with: - github-token: ${{ secrets.GH_TOKEN_ACTION_MOVE_ISSUE }} - project-url: "https://github.com/orgs/JabRef/projects/5" - target-labels: "📍 Assigned" - target-column: "Assigned" - ignored-columns: "" + github-token: ${{ secrets.GH_TOKEN_ACTION_MOVE_ISSUE }} + project-url: "https://github.com/orgs/JabRef/projects/5" + target-labels: "📍 Assigned" + target-column: "Assigned" + ignored-columns: "" + default-column: "Free to take" + skip-if-not-in-project: true good-first-issue: name: "good first issue" if: "${{ github.event.label.name == 'good first issue' }}" diff --git a/.github/workflows/on-unlabeled-issue.yml b/.github/workflows/on-unlabeled-issue.yml index 0947fd05c2a..9c5870066ca 100644 --- a/.github/workflows/on-unlabeled-issue.yml +++ b/.github/workflows/on-unlabeled-issue.yml @@ -13,20 +13,22 @@ jobs: issues: write steps: - name: Move Issue to "Free to take" Column in "Candidates for University Projects" - uses: m7kvqbe1/github-action-move-issues@v1.1.1 + uses: m7kvqbe1/github-action-move-issues@feat/skip-if-not-in-project-flag with: - github-token: ${{ secrets.GH_TOKEN_ACTION_MOVE_ISSUE }} - project-url: "https://github.com/orgs/JabRef/projects/3" - target-labels: "📍 Assigned" - target-column: "Assigned" - ignored-columns: "" - default-column: "Free to take" + github-token: ${{ secrets.GH_TOKEN_ACTION_MOVE_ISSUE }} + project-url: "https://github.com/orgs/JabRef/projects/3" + target-labels: "📍 Assigned" + target-column: "Assigned" + ignored-columns: "" + default-column: "Free to take" + skip-if-not-in-project: true - name: Move Issue to "Free to take" Column in "Good First Issues" - uses: m7kvqbe1/github-action-move-issues@v1.1.1 + uses: m7kvqbe1/github-action-move-issues@feat/skip-if-not-in-project-flag with: - github-token: ${{ secrets.GH_TOKEN_ACTION_MOVE_ISSUE }} - project-url: "https://github.com/orgs/JabRef/projects/5" - target-labels: "📍 Assigned" - target-column: "Assigned" - ignored-columns: "" - default-column: "Free to take" + github-token: ${{ secrets.GH_TOKEN_ACTION_MOVE_ISSUE }} + project-url: "https://github.com/orgs/JabRef/projects/5" + target-labels: "📍 Assigned" + target-column: "Assigned" + ignored-columns: "" + default-column: "Free to take" + skip-if-not-in-project: true From 30d040974c6853792e762cf87a823d71d75d02e0 Mon Sep 17 00:00:00 2001 From: Mitchell Browne Date: Fri, 18 Oct 2024 22:46:25 +1100 Subject: [PATCH 2/9] Update to MADR 4.0.0 (#12016) * fix typos and update to MADR 4.0.0 * update to MADR 4.0.0 * improve readability * remove redundant escape characters --- ...arkdown-architectural-decision-records.md} | 9 +++-- ...nly-translated-strings-in-language-file.md | 2 +- .../0007-human-readable-changelog.md | 2 +- ...ement-special-fields-as-separate-fields.md | 2 +- .../0020-use-Jackson-to-parse-study-yml.md | 2 +- .../0036-use-textarea-for-chat-content.md | 2 +- docs/decisions/adr-template.md | 40 +++++++------------ docs/decisions/index.md | 2 +- 8 files changed, 26 insertions(+), 35 deletions(-) rename docs/decisions/{0000-use-markdown-any-decision-records.md => 0000-use-markdown-architectural-decision-records.md} (68%) diff --git a/docs/decisions/0000-use-markdown-any-decision-records.md b/docs/decisions/0000-use-markdown-architectural-decision-records.md similarity index 68% rename from docs/decisions/0000-use-markdown-any-decision-records.md rename to docs/decisions/0000-use-markdown-architectural-decision-records.md index 508c6461700..b8caf9eee02 100644 --- a/docs/decisions/0000-use-markdown-any-decision-records.md +++ b/docs/decisions/0000-use-markdown-architectural-decision-records.md @@ -2,15 +2,16 @@ parent: Decision Records nav_order: 0 --- -# Use Markdown Any Decision Records +# Use Markdown Architectural Decision Records ## Context and Problem Statement -We want to record any decisions made in this project independent whether decisions concern the architecture ("architectural decision record"), the code, or other fields. +We want to record architectural decisions made in this project independent whether decisions concern the architecture ("architectural decision record"), the code, or other fields. Which format and structure should these records follow? ## Considered Options +* [MADR](https://adr.github.io/madr/) 4.0.0 – The Markdown Architectural Decision Records * [Michael Nygard's template](http://thinkrelevance.com/blog/2011/11/15/documenting-architecture-decisions) – The first incarnation of the term "ADR" * [Sustainable Architectural Decisions](https://www.infoq.com/articles/sustainable-architectural-design-decisions) – The Y-Statements * Other templates listed at @@ -18,11 +19,11 @@ Which format and structure should these records follow? ## Decision Outcome -Chosen option: "MADR", because +Chosen option: "MADR 4.0.0", because * Implicit assumptions should be made explicit. Design documentation is important to enable people understanding the decisions later on. - See also [A rational design process: How and why to fake it](https://doi.org/10.1109/TSE.1986.6312940). + See also ["A rational design process: How and why to fake it"](https://doi.org/10.1109/TSE.1986.6312940). * MADR allows for structured capturing of any decision. * The MADR format is lean and fits our development style. * The MADR structure is comprehensible and facilitates usage & maintenance. diff --git a/docs/decisions/0006-only-translated-strings-in-language-file.md b/docs/decisions/0006-only-translated-strings-in-language-file.md index 609af7ef1ca..8234c481f16 100644 --- a/docs/decisions/0006-only-translated-strings-in-language-file.md +++ b/docs/decisions/0006-only-translated-strings-in-language-file.md @@ -22,7 +22,7 @@ JabRef has translation files `JabRef_it.properties`, ... There are translated an ## Decision Outcome -Chosen option: "Only translated strings in language file", because comes out best \(see below. +Chosen option: "Only translated strings in language file", because comes out best (see below). ## Pros and Cons of the Options diff --git a/docs/decisions/0007-human-readable-changelog.md b/docs/decisions/0007-human-readable-changelog.md index c0fbf857f9a..9753bc28b5f 100644 --- a/docs/decisions/0007-human-readable-changelog.md +++ b/docs/decisions/0007-human-readable-changelog.md @@ -6,7 +6,7 @@ nav_order: 7 ## Context and Problem Statement -Changes of a release have to be communicated. How and which stile to use? +Changes of a release have to be communicated. How and which style to use? ## Considered Options diff --git a/docs/decisions/0019-implement-special-fields-as-separate-fields.md b/docs/decisions/0019-implement-special-fields-as-separate-fields.md index 77188d32ed3..3e4d6b5ec82 100644 --- a/docs/decisions/0019-implement-special-fields-as-separate-fields.md +++ b/docs/decisions/0019-implement-special-fields-as-separate-fields.md @@ -17,7 +17,7 @@ How to implement special fields in BibTeX databases? ## Decision Outcome -Chosen option: "Special fields as separate fields", because comes out best (see below) +Chosen option: "Special fields as separate fields", because comes out best (see below). ## Pros and Cons of the Options diff --git a/docs/decisions/0020-use-Jackson-to-parse-study-yml.md b/docs/decisions/0020-use-Jackson-to-parse-study-yml.md index 6f0dbee85d7..4f083e8d7d7 100644 --- a/docs/decisions/0020-use-Jackson-to-parse-study-yml.md +++ b/docs/decisions/0020-use-Jackson-to-parse-study-yml.md @@ -20,7 +20,7 @@ What parser should be used to parse YAML files? ## Decision Outcome -Chosen option: Jackson, because as it is a dedicated library for parsing YAML. `yamlbeans` also seem to be viable. They all offer similar functionality. +Chosen option: "Jackson", because as it is a dedicated library for parsing YAML. `yamlbeans` also seem to be viable. They all offer similar functionality. ## Pros and Cons of the Options diff --git a/docs/decisions/0036-use-textarea-for-chat-content.md b/docs/decisions/0036-use-textarea-for-chat-content.md index 1acfe73b665..5f01bebf35f 100644 --- a/docs/decisions/0036-use-textarea-for-chat-content.md +++ b/docs/decisions/0036-use-textarea-for-chat-content.md @@ -25,7 +25,7 @@ This decision record concerns the UI component that is used for rendering the co ## Decision Outcome -Chosen option: "Use TextArea". +Chosen option: "Use `TextArea`". All other options require more time to implement. Some of the options do not support text selection and copying, which for now we value more than Markdown rendering. diff --git a/docs/decisions/adr-template.md b/docs/decisions/adr-template.md index 47b62f5a815..d92254f8eb2 100644 --- a/docs/decisions/adr-template.md +++ b/docs/decisions/adr-template.md @@ -9,16 +9,16 @@ nav_order: 100 # Keep this parent: Decision Records -# These are optional elements. Feel free to remove any of them. -# status: {proposed | rejected | accepted | deprecated | … | superseded by [ADR-0005](0005-example.md)} -# date: {YYYY-MM-DD when the decision was last updated} -# deciders: {list everyone involved in the decision} -# consulted: {list everyone whose opinions are sought (typically subject-matter experts); and with whom there is a two-way communication} -# informed: {list everyone who is kept up-to-date on progress; and with whom there is a one-way communication} +# These are optional metadata elements. Feel free to remove any of them. +status: "{proposed | rejected | accepted | deprecated | … | superseded by ADR-0123" +date: {YYYY-MM-DD when the decision was last updated} +decision-makers: {list everyone involved in the decision} +consulted: {list everyone whose opinions are sought (typically subject-matter experts); and with whom there is a two-way communication} +informed: {list everyone who is kept up-to-date on progress; and with whom there is a one-way communication} --- -# {short title of solved problem and solution} +# {short title, representative of solved problem and found solution} ## Context and Problem Statement @@ -41,25 +41,19 @@ parent: Decision Records ## Decision Outcome -Chosen option: "{title of option 1}", because -{justification. e.g., only option, which meets k.o. criterion decision driver | which resolves force {force} | … | comes out best (see below)}. +Chosen option: "{title of option 1}", because {justification. e.g., only option, which meets k.o. criterion decision driver | which resolves force {force} | … | comes out best (see below)}. -### Positive Consequences +### Consequences -* {e.g., improvement of one or more desired qualities, …} -* … - - -### Negative Consequences - -* {e.g., compromising one or more desired qualities, …} -* … +* Good, because {positive consequence, e.g., improvement of one or more desired qualities, …} +* Bad, because {negative consequence, e.g., compromising one or more desired qualities, …} +* … -## Validation +### Confirmation -{describe how the implementation of/compliance with the ADR is validated. E.g., by a review or an ArchUnit test} +{Describe how the implementation of/compliance with the ADR can/will be confirmed. Is the chosen design and its implementation in line with the decision? E.g., a design/code review or a test with a library such as ArchUnit can help validate this. Note that although we classify this element as optional, it is included in many ADRs.} ## Pros and Cons of the Options @@ -89,8 +83,4 @@ Chosen option: "{title of option 1}", because ## More Information -{You might want to provide additional evidence/confidence for the decision outcome here and/or - document the team agreement on the decision and/or - define when this decision when and how the decision should be realized and if/when it should be re-visited and/or - how the decision is validated. - Links to other decisions and resources might here appear as well.} +{You might want to provide additional evidence/confidence for the decision outcome here and/or document the team agreement on the decision and/or define when/how this decision the decision should be realized and if/when it should be re-visited. Links to other decisions and resources might appear here as well.} diff --git a/docs/decisions/index.md b/docs/decisions/index.md index bab7c46aec3..54c0c329a00 100644 --- a/docs/decisions/index.md +++ b/docs/decisions/index.md @@ -4,7 +4,7 @@ has_children: true --- # Decision Records -Below, all "any decision records" for JabRef are listed. +Below, all "architectural decision records" for JabRef are listed. This list uses the TOC functionality of the [Just the Docs Jekyll template](https://just-the-docs.github.io/just-the-docs/). For new ADRs, please use [adr-template.md](adr-template.md) as basis. From 72b5ec07bf9ea15556b596abc3b7f501182da621 Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Fri, 18 Oct 2024 13:46:40 +0200 Subject: [PATCH 3/9] Fix removing comments (#12019) --- .github/workflows/cleanup-pr.yml | 2 +- .github/workflows/deployment.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cleanup-pr.yml b/.github/workflows/cleanup-pr.yml index 5c816f920fa..bd38e11ea16 100644 --- a/.github/workflows/cleanup-pr.yml +++ b/.github/workflows/cleanup-pr.yml @@ -39,6 +39,6 @@ jobs: if: steps.checksecrets.outputs.secretspresent == 'YES' uses: thollander/actions-comment-pull-request@v3 with: - comment_tag: download-link + comment-tag: download-link message: The build for this PR is no longer available. Please visit for the latest build. mode: upsert diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index ba200bcb843..e6796073e08 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -291,7 +291,7 @@ jobs: with: message: | The build of this PR is available at . - comment_tag: download-link + comment-tag: download-link mode: recreate notarize: # outsourced in a separate job to be able to rerun if this fails for timeouts name: macOS notarization From a3f13aa4e78ef3580fa387f6deab1009cea965e9 Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Fri, 18 Oct 2024 18:56:42 +0200 Subject: [PATCH 4/9] Try other template format (#12011) * Try other template format * Even shorter --- .github/PULL_REQUEST_TEMPLATE.md | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index fc055df043f..c52221619ed 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,10 +1,5 @@ - +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". ### Mandatory checks From 4351a39ba3f214dd489bcc3aa94d7a197022f0c2 Mon Sep 17 00:00:00 2001 From: Adam Ahammed Basheer Date: Sat, 19 Oct 2024 04:21:49 +1100 Subject: [PATCH 5/9] =?UTF-8?q?"Converted=20test=20cases=20in=20FileNameCl?= =?UTF-8?q?eanerTest=20to=20use=20@CsvSource=20for=20im=E2=80=A6=20(#12014?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * "Converted test cases in FileNameCleanerTest to use @CsvSource for improved readability. Added additional test cases for Linux to handle file name restrictions. * Fixed checkstyle error * Removed empytline for checkstyle * Fixed CSV parsing issues by enclosing values containing commas in double quotes. Test case was failing so had to fix * Changed the custom test * Fixed custom test * Fixed custom test (again) * Revised custom test * Fixed the ordering of expected and input * Swapped for all test cases * Added removed test case * Added forgotten comma * Added singlequotes so csvSource can differentiate the 2 strings --- .../logic/util/FileNameCleanerTest.java | 49 +++++++++++-------- 1 file changed, 28 insertions(+), 21 deletions(-) diff --git a/src/test/java/org/jabref/logic/util/FileNameCleanerTest.java b/src/test/java/org/jabref/logic/util/FileNameCleanerTest.java index d4ae98057b2..1193075cd8b 100644 --- a/src/test/java/org/jabref/logic/util/FileNameCleanerTest.java +++ b/src/test/java/org/jabref/logic/util/FileNameCleanerTest.java @@ -2,35 +2,42 @@ import org.jabref.logic.util.io.FileNameCleaner; -import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.CsvSource; import static org.junit.jupiter.api.Assertions.assertEquals; class FileNameCleanerTest { - @Test - void cleanFileName() { - assertEquals("legalFilename.txt", FileNameCleaner.cleanFileName("legalFilename.txt")); - assertEquals("illegalFilename______.txt", FileNameCleaner.cleanFileName("illegalFilename/?*<>|.txt")); - assertEquals("illegalFileName_.txt", FileNameCleaner.cleanFileName("illegalFileName{.txt")); + @ParameterizedTest + @CsvSource({ + "legalFilename.txt, legalFilename.txt", + "illegalFilename______.txt, illegalFilename/?*<>|.txt", + "illegalFileName_.txt, illegalFileName{.txt", + "_The Evolution of Sentiment_ Analysis_.PDF, ?The Evolution of Sentiment} Analysis}.PDF", + "'The Evolution of Sentiment_ Analysis_A Review of Research Topics, Venues, and Top Cited Papers.PDF', 'The Evolution of Sentiment} Analysis}A Review of Research Topics, Venues, and Top Cited Papers.PDF'" + }) + void cleanFileName(String expected, String input) { + assertEquals(expected, FileNameCleaner.cleanFileName(input)); } - @Test - void cleanDirectoryName() { - assertEquals("legalFilename.txt", FileNameCleaner.cleanDirectoryName("legalFilename.txt")); - assertEquals("subdir/legalFilename.txt", FileNameCleaner.cleanDirectoryName("subdir/legalFilename.txt")); - assertEquals("illegalFilename/_____.txt", FileNameCleaner.cleanDirectoryName("illegalFilename/?*<>|.txt")); + @ParameterizedTest + @CsvSource({ + "legalFilename.txt, legalFilename.txt", + "subdir/legalFilename.txt, subdir/legalFilename.txt", + "illegalFilename/_____.txt, illegalFilename/?*<>|.txt" + }) + void cleanDirectoryName(String expected, String input) { + assertEquals(expected, FileNameCleaner.cleanDirectoryName(input)); } - @Test - void cleanDirectoryNameForWindows() { - assertEquals("legalFilename.txt", FileNameCleaner.cleanDirectoryName("legalFilename.txt")); - assertEquals("subdir\\legalFilename.txt", FileNameCleaner.cleanDirectoryName("subdir\\legalFilename.txt")); - assertEquals("illegalFilename\\_____.txt", FileNameCleaner.cleanDirectoryName("illegalFilename\\?*<>|.txt")); - } - - @Test - void cleanCurlyBracesAsWell() { - assertEquals("The Evolution of Sentiment_ Analysis_A Review of Research Topics, Venues, and Top Cited Papers.PDF", FileNameCleaner.cleanFileName("The Evolution of Sentiment} Analysis}A Review of Research Topics, Venues, and Top Cited Papers.PDF")); + @ParameterizedTest + @CsvSource({ + "legalFilename.txt, legalFilename.txt", + "subdir\\legalFilename.txt, subdir\\legalFilename.txt", + "illegalFilename\\_____.txt, illegalFilename\\?*<>|.txt" + }) + void cleanDirectoryNameForWindows(String expected, String input) { + assertEquals(expected, FileNameCleaner.cleanDirectoryName(input)); } } From 0fddc0223a5d3da6458894e980dbf3e358ab67d1 Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Sat, 19 Oct 2024 11:45:28 +0200 Subject: [PATCH 6/9] Add label addition and removal of status: * (#12026) --- .github/workflows/on-review-submitted.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/on-review-submitted.yml diff --git a/.github/workflows/on-review-submitted.yml b/.github/workflows/on-review-submitted.yml new file mode 100644 index 00000000000..5a82fe50d6f --- /dev/null +++ b/.github/workflows/on-review-submitted.yml @@ -0,0 +1,17 @@ +name: On reviewed PR + +on: + pull_request_review: + types: + - submitted + +jobs: + add-label-changes-required: + runs-on: ubuntu-latest + steps: + - run: | + gh pr edit "$PR_URL" --remove-label "status: ready-for-review" + gh pr edit "$PR_URL" --add-label "status: changes required" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GITHUB_TOKEN: ${{secrets.GH_TOKEN_UPDATE_GRADLE_WRAPPER}} From 18a90fce29627c2e3309383111a77d96474dcdfe Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Sat, 19 Oct 2024 12:07:04 +0200 Subject: [PATCH 7/9] Use the beta version (#12027) --- .github/workflows/assign-issue.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/assign-issue.yml b/.github/workflows/assign-issue.yml index 30a2e19e2f3..6d746197fa8 100644 --- a/.github/workflows/assign-issue.yml +++ b/.github/workflows/assign-issue.yml @@ -15,7 +15,7 @@ jobs: steps: - name: Assign the user or unassign stale assignments id: assign - uses: takanome-dev/assign-issue-action@refactor-rewrite-action + uses: takanome-dev/assign-issue-action@beta with: github_token: '${{ secrets.GITHUB_TOKEN }}' days_until_unassign: 30 From bbea664c20085e50048244dfffe1e7aca0063589 Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Sat, 19 Oct 2024 12:13:57 +0200 Subject: [PATCH 8/9] Fix placeholders (#12028) --- .github/workflows/assign-issue.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/assign-issue.yml b/.github/workflows/assign-issue.yml index 6d746197fa8..e88f6b762d2 100644 --- a/.github/workflows/assign-issue.yml +++ b/.github/workflows/assign-issue.yml @@ -21,21 +21,17 @@ jobs: days_until_unassign: 30 maintainers: koppor, Siedlerchr, ThiloteE, calixtus, HoussemNasri assigned_comment: | - 👋 Hey @{{ comment.user.login }}, + 👋 Hey @{{ handle }}, thank you for your interest in this issue! 🎉 - Thanks for your interest in this issue! 🎉 - - Newcomers, we're excited to have you on board. Start by exploring our [Contributing](https://github.com/JabRef/jabref/blob/main/CONTRIBUTING.md) guidelines, and don't forget to check out our [workspace setup guidelines](https://devdocs.jabref.org/getting-into-the-code/guidelines-for-setting-up-a-local-workspace) to get started smoothly. + We're excited to have you on board. Start by exploring our [Contributing](https://github.com/JabRef/jabref/blob/main/CONTRIBUTING.md) guidelines, and don't forget to check out our [workspace setup guidelines](https://devdocs.jabref.org/getting-into-the-code/guidelines-for-setting-up-a-local-workspace) to get started smoothly. In case you encounter failing tests during development, please check our [developer FAQs](https://devdocs.jabref.org/code-howtos/faq.html)! Having any questions or issues? Feel free to ask here on GitHub. Need help setting up your local workspace? Join the conversation on [JabRef's Gitter chat](https://gitter.im/JabRef/jabref). And don't hesitate to open a (draft) pull request early on to show the direction it is heading towards. This way, you will receive valuable feedback. - ⚠ Note that this issue will become unassigned if it isn't closed within **{{ totalDays }} days**. - - 🔧 A maintainer can also add the **{{ inputs.pin_label }}** label to prevent it from being unassigned automatically. - Happy coding! 🚀 + + ⏳ Please note, you will be automatically unassigned if the issue isn't closed within **{{ total_days }} days** (by **{{ unassigned_date }}**). A maintainer can also add the "**{{ pin_label }}**"" label to prevent automatic unassignment. - name: Move Issue to "Assigned" Column in "Candidates for University Projects" if: steps.assign.outputs.assigned == 'yes' uses: m7kvqbe1/github-action-move-issues@feat/skip-if-not-in-project-flag From aa1fa0b8ce7453f53e40a29c898ff6983b1b357e Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Sat, 19 Oct 2024 12:56:26 +0200 Subject: [PATCH 9/9] Fix environement variable name for gh cli (#12029) --- .github/workflows/automerge.yml | 10 +++++----- .github/workflows/on-review-submitted.yml | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml index 1e5c7011f23..856b3f66b57 100644 --- a/.github/workflows/automerge.yml +++ b/.github/workflows/automerge.yml @@ -10,13 +10,13 @@ jobs: runs-on: ubuntu-latest # Run only if PR is inside JabRef's main repository and created by dependabot or by an update workflow if: > - (github.repository == 'JabRef/jabref') && + (github.repository == 'JabRef/jabref') && (github.event.pull_request.head.repo.full_name == 'JabRef/jabref') && ( (github.actor == 'dependabot[bot]') || ( - startsWith(github.event.pull_request.title, '[Bot] ') || - startsWith(github.event.pull_request.title, 'Bump ') || + startsWith(github.event.pull_request.title, '[Bot] ') || + startsWith(github.event.pull_request.title, 'Bump ') || startsWith(github.event.pull_request.title, 'New Crowdin updates') || startsWith(github.event.pull_request.title, 'Update Gradle Wrapper from') ) @@ -26,9 +26,9 @@ jobs: run: gh pr review --approve "$PR_URL" env: PR_URL: ${{github.event.pull_request.html_url}} - GITHUB_TOKEN: ${{secrets.GH_TOKEN_JABREF_MACHINE_PR_APPROVE}} + GH_TOKEN: ${{secrets.GH_TOKEN_JABREF_MACHINE_PR_APPROVE}} - name: Merge PR run: gh pr merge --auto --squash "$PR_URL" env: PR_URL: ${{github.event.pull_request.html_url}} - GITHUB_TOKEN: ${{secrets.GH_TOKEN_UPDATE_GRADLE_WRAPPER}} + GH_TOKEN: ${{secrets.GH_TOKEN_UPDATE_GRADLE_WRAPPER}} diff --git a/.github/workflows/on-review-submitted.yml b/.github/workflows/on-review-submitted.yml index 5a82fe50d6f..f82cfd9a304 100644 --- a/.github/workflows/on-review-submitted.yml +++ b/.github/workflows/on-review-submitted.yml @@ -14,4 +14,4 @@ jobs: gh pr edit "$PR_URL" --add-label "status: changes required" env: PR_URL: ${{github.event.pull_request.html_url}} - GITHUB_TOKEN: ${{secrets.GH_TOKEN_UPDATE_GRADLE_WRAPPER}} + GH_TOKEN: ${{secrets.GH_TOKEN_UPDATE_GRADLE_WRAPPER}}