Chore: reuse shared 'setup-gradle' in all places in test-code.yml#15043
Chore: reuse shared 'setup-gradle' in all places in test-code.yml#15043Siedlerchr merged 3 commits intomainfrom
Conversation
Review Summary by QodoReuse shared setup-gradle action in test-code workflow
WalkthroughsDescription• Consolidate Gradle setup to use shared action • Replace direct gradle/actions/setup-gradle with local wrapper • Improve consistency across CI workflow Diagramflowchart LR
A["test-code.yml workflow"] -- "previously used" --> B["gradle/actions/setup-gradle@v5"]
A -- "now uses" --> C["./.github/actions/setup-gradle"]
C -- "wraps" --> B
File Changes1. .github/workflows/tests-code.yml
|
Code Review by Qodo
1. Unpinned JBang action
|
| check-latest: true | ||
| - name: Setup Gradle | ||
| uses: gradle/actions/setup-gradle@v5 | ||
| - uses: ./.github/actions/setup-gradle |
There was a problem hiding this comment.
1. Unpinned jbang action 🐞 Bug ⛨ Security
• After switching to the composite ./.github/actions/setup-gradle, this job now runs jbangdev/setup-jbang@main. • Referencing an external action by a moving branch (@main) is a supply-chain and reliability risk (upstream changes can break CI or introduce unexpected behavior). • While this unpinned reference pre-exists in the composite action, this PR expands its usage to the requirements_coverage job, increasing the blast radius.
Agent Prompt
### Issue description
The composite action `./.github/actions/setup-gradle` uses `jbangdev/setup-jbang@main`, which is a moving target and creates supply-chain and CI stability risks. This PR makes `requirements_coverage` depend on that unpinned action.
### Issue Context
Even if the composite action is local, it still pulls and executes external actions. Pinning to a tag/SHA reduces risk and prevents unexpected breakages.
### Fix Focus Areas
- .github/actions/setup-gradle/action.yml[39-40]
- .github/workflows/tests-code.yml[551-555]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
koppor
left a comment
There was a problem hiding this comment.
Both work.... Here, I had speed in mind. However, consitency is maybe more important 😅
koppor
left a comment
There was a problem hiding this comment.
Neeed to address #15043 (comment)
✅ All tests passed ✅🏷️ Commit: 528e46b Learn more about TestLens at testlens.app. |
…es/jablib/src/main/resources/csl-styles-6c79ffe * upstream/main: (68 commits) Chore(deps): Bump org.apache.httpcomponents.client5:httpclient5 (#15060) Chore(deps): Bump com.google.errorprone:error_prone_core in /versions (#15059) Chore(deps): Bump de.undercouch.download:de.undercouch.download.gradle.plugin (#15057) Chore(deps): Bump org.postgresql:postgresql in /versions (#15058) Chore(deps): Bump de.undercouch.download:de.undercouch.download.gradle.plugin (#15056) Updates on Wednesday, not on Sunday Add screenshot requirement (#15050) Switch image for javadoc Better docker layer caching during build (#15042) New Crowdin updates (#15045) Chore: reuse shared 'setup-gradle' in all places in test-code.yml (#15043) Chore: add 'testlens-app/setup-testlens' GH action (#15044) Add: HTTP Server and LSP server toggles to quick settings (#14972) Some more recipes from OpenRewrite (#15030) feat: Add PDF Upload endpoint to EntryResource (#14963) Heuristics also used at batch (#15025) Fix cleanup-pr.yml New Crowdin updates (#15035) Use patched Gradle version (#15034) Add OpenAlex-based Citation Fetcher (#15023) ...
I noticed that there was one place in the GH actions setup where the
./.github/actions/setup-gradleis not used, but instead thegradle/actions/setup-gradle@v5is used directly. I assume this is not intentional (?). This PR adjusts this one line intest-code.yml.Steps to test
This is tested by the GH actions running on this PR.
Mandatory checks
/
I manually tested my changes in running JabRef (always required)I added JUnit tests for changes (if applicable)I added screenshots in the PR description (if change is visible to the user)described the change inCHANGELOG.mdin a way that is understandable for the average user (if change is visible to the user)I checked the user documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request updating file(s) in https://github.com/JabRef/user-documentation/tree/main/en.