From 6d3168246a6670e6c7f2de2181b8b1f1652f55cd Mon Sep 17 00:00:00 2001 From: Victor Diez Date: Fri, 3 Jul 2026 20:07:58 +0200 Subject: [PATCH 1/4] CLP-129 Normalize Jira automation workflows --- .github/workflows/PullRequestClosed.yml | 6 +++--- .github/workflows/PullRequestCreated.yml | 3 ++- .github/workflows/RequestReview.yml | 2 +- .github/workflows/SubmitReview.yml | 2 +- PULL_REQUEST_TEMPLATE.md | 6 ------ 5 files changed, 7 insertions(+), 12 deletions(-) delete mode 100644 PULL_REQUEST_TEMPLATE.md diff --git a/.github/workflows/PullRequestClosed.yml b/.github/workflows/PullRequestClosed.yml index d410f5bbb2a..8285001cb90 100644 --- a/.github/workflows/PullRequestClosed.yml +++ b/.github/workflows/PullRequestClosed.yml @@ -5,9 +5,9 @@ on: types: [closed] jobs: - PullRequestMerged_job: - name: Pull Request Merged - runs-on: sonar-xs-public + PullRequestClosed_job: + name: Pull Request Closed + runs-on: sonar-xs permissions: id-token: write pull-requests: read diff --git a/.github/workflows/PullRequestCreated.yml b/.github/workflows/PullRequestCreated.yml index 8d5515ec1c6..28ccbf3c463 100644 --- a/.github/workflows/PullRequestCreated.yml +++ b/.github/workflows/PullRequestCreated.yml @@ -7,12 +7,13 @@ on: jobs: PullRequestCreated_job: name: Pull Request Created - runs-on: sonar-xs-public + runs-on: sonar-xs permissions: id-token: write # For external PR, ticket should be created manually if: | github.event.pull_request.head.repo.full_name == github.repository + && github.event.sender.type != 'Bot' steps: - id: secrets uses: SonarSource/vault-action-wrapper@v3 diff --git a/.github/workflows/RequestReview.yml b/.github/workflows/RequestReview.yml index 55e5b49df06..539acd4466c 100644 --- a/.github/workflows/RequestReview.yml +++ b/.github/workflows/RequestReview.yml @@ -7,7 +7,7 @@ on: jobs: RequestReview_job: name: Request review - runs-on: sonar-xs-public + runs-on: sonar-xs permissions: id-token: write # For external PR, ticket should be moved manually diff --git a/.github/workflows/SubmitReview.yml b/.github/workflows/SubmitReview.yml index c15fc56af27..7d1a1a6a479 100644 --- a/.github/workflows/SubmitReview.yml +++ b/.github/workflows/SubmitReview.yml @@ -7,7 +7,7 @@ on: jobs: SubmitReview_job: name: Submit Review - runs-on: sonar-xs-public + runs-on: sonar-xs permissions: id-token: write # For external PR, ticket should be moved manually diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index c97f76b8046..00000000000 --- a/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,6 +0,0 @@ -Please ensure your pull request adheres to the following guidelines: - -- [ ] Use the following formatting style: [SonarSource/sonar-developer-toolset](https://github.com/SonarSource/sonar-developer-toolset#code-style) -- [ ] Unit tests are passing and you provided a unit test for your fix -- [ ] ITs should pass : To run ITs locally, checkout the [README](https://github.com/SonarSource/sonar-java/blob/master/README.md) of the project. -- [ ] If there is a [Jira](http://jira.sonarsource.com/browse/SONARJAVA) ticket available, please make your commits and pull request start with the ticket number (SONARJAVA-XXXX) From 8579ce8ba900680e50bae0d4447246e20445811c Mon Sep 17 00:00:00 2001 From: Victor Diez Date: Mon, 6 Jul 2026 14:43:01 +0200 Subject: [PATCH 2/4] CLP-129 Remove bot exclusion from Jira automation workflow --- .github/workflows/PullRequestCreated.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/PullRequestCreated.yml b/.github/workflows/PullRequestCreated.yml index 28ccbf3c463..376f51bf7d6 100644 --- a/.github/workflows/PullRequestCreated.yml +++ b/.github/workflows/PullRequestCreated.yml @@ -13,7 +13,6 @@ jobs: # For external PR, ticket should be created manually if: | github.event.pull_request.head.repo.full_name == github.repository - && github.event.sender.type != 'Bot' steps: - id: secrets uses: SonarSource/vault-action-wrapper@v3 From 288d1f0cdafa2e09680e413713e47ade745e9ba0 Mon Sep 17 00:00:00 2001 From: Victor Diez Date: Tue, 7 Jul 2026 10:48:45 +0200 Subject: [PATCH 3/4] CLP-129 Restore Jira workflow alignment and PR cleanup job --- .github/workflows/PullRequestClosed.yml | 11 +++++++++-- .github/workflows/SubmitReview.yml | 4 ++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/PullRequestClosed.yml b/.github/workflows/PullRequestClosed.yml index 8285001cb90..5047dc7c9b4 100644 --- a/.github/workflows/PullRequestClosed.yml +++ b/.github/workflows/PullRequestClosed.yml @@ -24,5 +24,12 @@ jobs: - uses: sonarsource/gh-action-lt-backlog/PullRequestClosed@v2 with: github-token: ${{secrets.GITHUB_TOKEN}} - jira-user: ${{ fromJSON(steps.secrets.outputs.vault).JIRA_USER }} - jira-token: ${{ fromJSON(steps.secrets.outputs.vault).JIRA_TOKEN }} + jira-user: ${{ fromJSON(steps.secrets.outputs.vault).JIRA_USER }} + jira-token: ${{ fromJSON(steps.secrets.outputs.vault).JIRA_TOKEN }} + + PR_Build_Cleanup: + runs-on: sonar-xs + permissions: + actions: write + steps: + - uses: SonarSource/ci-github-actions/pr_cleanup@v1 diff --git a/.github/workflows/SubmitReview.yml b/.github/workflows/SubmitReview.yml index 7d1a1a6a479..2906d521f89 100644 --- a/.github/workflows/SubmitReview.yml +++ b/.github/workflows/SubmitReview.yml @@ -26,5 +26,5 @@ jobs: - uses: sonarsource/gh-action-lt-backlog/SubmitReview@v2 with: github-token: ${{ fromJSON(steps.secrets.outputs.vault).GITHUB_TOKEN }} - jira-user: ${{ fromJSON(steps.secrets.outputs.vault).JIRA_USER }} - jira-token: ${{ fromJSON(steps.secrets.outputs.vault).JIRA_TOKEN }} + jira-user: ${{ fromJSON(steps.secrets.outputs.vault).JIRA_USER }} + jira-token: ${{ fromJSON(steps.secrets.outputs.vault).JIRA_TOKEN }} From 8ab3d30d0d909f445f450dc8f35601a1ae6e4077 Mon Sep 17 00:00:00 2001 From: Victor Diez Date: Tue, 7 Jul 2026 20:49:18 +0200 Subject: [PATCH 4/4] CLP-129 Remove PR cleanup changes --- .github/workflows/PullRequestClosed.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/PullRequestClosed.yml b/.github/workflows/PullRequestClosed.yml index 5047dc7c9b4..d23ba1c6044 100644 --- a/.github/workflows/PullRequestClosed.yml +++ b/.github/workflows/PullRequestClosed.yml @@ -26,10 +26,3 @@ jobs: github-token: ${{secrets.GITHUB_TOKEN}} jira-user: ${{ fromJSON(steps.secrets.outputs.vault).JIRA_USER }} jira-token: ${{ fromJSON(steps.secrets.outputs.vault).JIRA_TOKEN }} - - PR_Build_Cleanup: - runs-on: sonar-xs - permissions: - actions: write - steps: - - uses: SonarSource/ci-github-actions/pr_cleanup@v1