You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2026/09/02 23:38:49 UTC

(groovy) branch master updated (4b90ea0159 -> 2ca56681c4)

This is an automated email from the ASF dual-hosted git repository.

paulk-asert pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git


    from 4b90ea0159 temp change testing ENV variable levels in GitHub actions
     new 478c085b4d Remove the temporary Develocity env probe
     new 2ca56681c4 CI: grant the pull-request write scope to the job that comments

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/workflows/groovy-build-performance.yml | 5 +++--
 .github/workflows/groovy-jmh-classic.yml       | 5 +++--
 .github/workflows/groovy-jmh.yml               | 5 +++--
 .github/workflows/groovy-perf-daily.yml        | 8 +++++---
 .github/workflows/groovy-rat-check.yml         | 7 -------
 5 files changed, 14 insertions(+), 16 deletions(-)


(groovy) 02/02: CI: grant the pull-request write scope to the job that comments

Posted by pa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

paulk-asert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit 2ca56681c42e8b0599a878de848098df2155d25e
Author: Paul King <pa...@asert.com.au>
AuthorDate: Thu Sep 3 09:01:47 2026 +1000

    CI: grant the pull-request write scope to the job that comments
    
    In groovy-jmh.yml and groovy-jmh-classic.yml the scopes were on the wrong
    job. The test job, which builds and runs PR code, carried pull-requests
    and issues write and used neither. The summary job, which runs
    jmh-summary.py to upsert the JMH regression comment, declared no
    permissions at all and so inherited contents:read - meaning its POST to
    /issues/{pr}/comments has been failing with 403 on same-repo pull
    requests. The script catches the error and prints a warning, which is why
    a comment that never appeared looked like a comment that had nothing to
    say.
    
    The write scope moves to the summary job, and only pull-requests: write
    goes with it - the script comments on pull requests and nothing else.
    
    groovy-build-performance.yml and groovy-perf-daily.yml declared their
    writes workflow-wide. Each has a single job today so the effective scope
    is the same, but a second job added later would inherit them silently.
    Both now scope per job, as groovy-jmh-daily.yml already did; the
    performance one keeps only pull-requests: write, since its commenting is
    github-action-benchmark's comment-on-alert, already restricted to
    same-repo pull requests.
    
    No security exposure is closed by this. GitHub downgrades fork-PR tokens
    to read-only and same-repo authors already hold write, so the over-grant
    was unreachable. It is worth doing because it repairs the comment and
    leaves each job holding what it uses.
---
 .github/workflows/groovy-build-performance.yml | 5 +++--
 .github/workflows/groovy-jmh-classic.yml       | 5 +++--
 .github/workflows/groovy-jmh.yml               | 5 +++--
 .github/workflows/groovy-perf-daily.yml        | 8 +++++---
 4 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/.github/workflows/groovy-build-performance.yml b/.github/workflows/groovy-build-performance.yml
index 658de055d8..b0768b09b9 100644
--- a/.github/workflows/groovy-build-performance.yml
+++ b/.github/workflows/groovy-build-performance.yml
@@ -28,11 +28,12 @@ concurrency:
 
 permissions:
   contents: read
-  pull-requests: write   # dispatch-metrics regression comments
-  issues: write
 
 jobs:
   test:
+    permissions:
+      contents: read
+      pull-requests: write   # dispatch-metrics regression comments
     if: >-
       contains(github.event.head_commit.message || '', 'GROOVY-') ||
       contains(github.event.pull_request.title || '', 'GROOVY-')
diff --git a/.github/workflows/groovy-jmh-classic.yml b/.github/workflows/groovy-jmh-classic.yml
index 458b9b2969..4813c44f94 100644
--- a/.github/workflows/groovy-jmh-classic.yml
+++ b/.github/workflows/groovy-jmh-classic.yml
@@ -33,8 +33,6 @@ jobs:
   test:
     permissions:
       contents: read
-      pull-requests: write
-      issues: write
     if: >-
       contains(github.event.head_commit.message || '', 'GROOVY-') ||
       contains(github.event.pull_request.title || '', 'GROOVY-')
@@ -96,6 +94,9 @@ jobs:
 
   summary:
     needs: test
+    permissions:
+      contents: read
+      pull-requests: write   # jmh-summary.py upserts the regression comment
     if: >-
       always() &&
       (contains(github.event.head_commit.message || '', 'GROOVY-') ||
diff --git a/.github/workflows/groovy-jmh.yml b/.github/workflows/groovy-jmh.yml
index ccf3cb5b14..c5f8167290 100644
--- a/.github/workflows/groovy-jmh.yml
+++ b/.github/workflows/groovy-jmh.yml
@@ -33,8 +33,6 @@ jobs:
   test:
     permissions:
       contents: read
-      pull-requests: write
-      issues: write
     if: >-
       contains(github.event.head_commit.message || '', 'GROOVY-') ||
       contains(github.event.pull_request.title || '', 'GROOVY-')
@@ -96,6 +94,9 @@ jobs:
 
   summary:
     needs: test
+    permissions:
+      contents: read
+      pull-requests: write   # jmh-summary.py upserts the regression comment
     if: >-
       always() &&
       (contains(github.event.head_commit.message || '', 'GROOVY-') ||
diff --git a/.github/workflows/groovy-perf-daily.yml b/.github/workflows/groovy-perf-daily.yml
index 0c5fafe264..4feff3e81d 100644
--- a/.github/workflows/groovy-perf-daily.yml
+++ b/.github/workflows/groovy-perf-daily.yml
@@ -21,12 +21,14 @@ on:
   workflow_dispatch:
 
 permissions:
-  contents: write         # gh-pages push
-  deployments: write
-  issues: write           # commit comments
+  contents: read
 
 jobs:
   benchmark:
+    permissions:
+      contents: write         # gh-pages push
+      deployments: write
+      issues: write           # commit comments
     runs-on: ubuntu-latest
     env:
       DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}


(groovy) 01/02: Remove the temporary Develocity env probe

Posted by pa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

paulk-asert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit 478c085b4df5872398e100315484e1b0d0bd1ea9
Author: Paul King <pa...@asert.com.au>
AuthorDate: Thu Sep 3 08:54:11 2026 +1000

    Remove the temporary Develocity env probe
    
    Backs out 4b90ea0159. The probe answered its question: setup-gradle
    replaces DEVELOCITY_ACCESS_KEY in the environment with a short-lived
    token, so steps after it - including the third-party actions in five
    other workflows, all of which run setup-gradle first - never see the
    long-lived key.
---
 .github/workflows/groovy-rat-check.yml | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/.github/workflows/groovy-rat-check.yml b/.github/workflows/groovy-rat-check.yml
index 3c51242053..fdcc6c8686 100644
--- a/.github/workflows/groovy-rat-check.yml
+++ b/.github/workflows/groovy-rat-check.yml
@@ -65,13 +65,6 @@ jobs:
         # dists are cached by the explicit branch-keyed step above instead.
         with:
           cache-disabled: true
-      - name: "TEMP f024 probe"
-        run: |
-          if [ "$DEVELOCITY_ACCESS_KEY" = '${{ secrets.DEVELOCITY_ACCESS_KEY }}' ]; then
-            echo "SAME - long-lived key still in env, visible to later steps"
-          else
-            echo "REPLACED - short-lived token, long-lived key hidden"
-          fi
       - name: Check licenses with rat
         run: ./gradlew rat
         timeout-minutes: 60