Repository navigation
JAVA-7411 Create an automated workflow to update the JDT package - #202
aurelien-coet-sonarsource wants to merge 1 commit into
Conversation
Code Review 👍 Approved with suggestions 🔴 High risk 0 closed / 2 findingsThe workflow grants a GitHub App contents, issues, and pull-request write access and asks Gitar to push repairs, so mis-scoped automation could alter repository branches. Adds a GitHub Actions workflow and 💡 Quality: README calls the conflicting update run 'failed', but it finishes green📄 README.md:163-167 📄 scripts/ciUpdate.py:77-81 📄 scripts/ciUpdate.py:268-269 When the updater hits a conflict, Describe the linked run accuratelyℹ️ Cross-PR: New JDT update workflow skips the mise-action wrapper migration · #200📄 .github/workflows/jdt-update.yml:59-63 📄 .github/workflows/jdt-update.yml:152 Breaks when this PR and #200 both merge, in either order. How
Fix
Compared 🤖 Prompt for agentsVerification Rules 4/5 met Knowledge ✅ 1 PRs 1 inspectedRules 1 failed 4 passed 1 not applicable
Functional validation No results Broader impact PRs 1 inspectedCross-PR 1 PR inspected 1 open impact
Auto-approval Not enabledFor more verification details, comment OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |
|
| The workflow reconstructs the patches and runs `mvn verify` before opening a PR. For previews it selects the required JDK and | ||
| installs the pinned JDT Core and ECJ artifacts before the Maven build. If a patch conflicts, the workflow opens a draft, applies | ||
| the `gitar-managed` label, and comments with the exact update command and the failed run. Gitar recreates the workspace and | ||
| pushes the completed update to the same PR. The workflow checks the selected source, reconstructs the patches, and runs Maven | ||
| verification again before marking the draft ready for review. |
There was a problem hiding this comment.
💡 Quality: README calls the conflicting update run 'failed', but it finishes green
When the updater hits a conflict, ciUpdate.prepare writes the target/pending_patch outputs and returns None, so sys.exit(main()) exits 0. Validation and Maven are skipped, and publishing opens the draft successfully. The dispatch run therefore ends green. The new README section says the workflow comments with "the failed run", and an operator may go looking for a red run that doesn't exist. The comment itself labels the link [Update run], which is accurate. Change the README wording to match, e.g. "the update run that stopped on the conflict".
Describe the linked run accurately:
the `gitar-managed` label, and comments with the exact update command and a link to the update run that stopped on the conflict. Gitar recreates the workspace and
- Apply fix
Check the box to apply the fix or reply for a change | Was this helpful? React with 👍 / 👎
| - &setup-mise | ||
| uses: jdx/mise-action@924e7c586e33d7d4bae9c14e26c5d22e2beb6e78 # v5.3.0 | ||
| if: steps.validate.outcome == 'success' | ||
| with: | ||
| version: 2026.11.14 |
There was a problem hiding this comment.
ℹ️ Cross-PR: New JDT update workflow skips the mise-action wrapper migration · #200
Breaks when this PR and #200 both merge, in either order. jdt-update.yml would then be the only workflow that still calls third-party jdx/mise-action directly.
How
.github/workflows/jdt-update.yml:60addsjdx/mise-action@924e7c586e33…(v5.3.0) through the&setup-miseanchor.verify-repairreuses that anchor at line 152.- #200 replaces every
jdx/mise-actionuse in.github/workflows/build.yml:29,89andunified-dogfooding.yml:21withSonarSource/mise-action-wrapper@f6366c8008c1(2.1.0), passingpersist_github_token: false. - #200 only rewrites the files it touches, so it cannot cover the new workflow. Both
updateandverify-repairwould keep running the action that #200 removes for supply-chain reasons.
Fix
- This PR: Use
SonarSource/mise-action-wrapperwithpersist_github_token: falsein the&setup-misestep, as #200 does, or rebase after #200 merges and adopt it then. - #200: If it merges second, also migrate
.github/workflows/jdt-update.yml.
Compared d676235 with #200 at e32a5d9
Was this helpful? React with 👍 / 👎





Summary by Gitar
jdt-update.ymlto prepare, verify, and publish JDT Core upgradesciUpdate.pyto validate upgrades, open update PRs, and request Gitar repairsPatchConflicthandling and exit code 3 with--conflict-fileoutput injdt.pyandpatch.pyREADME.mdThis will update automatically on new commits.