This is an automated email from the ASF dual-hosted git repository.
JiriOndrusek pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-upgrade-recipes.git
The following commit(s) were added to refs/heads/main by this push:
new 75671ac Remove the PR suggestion bot blocked by the ASF actions
allow-list
75671ac is described below
commit 75671ac00bc96bfbd22d707bc2efcd18014a36f6
Author: croway <[email protected]>
AuthorDate: Tue Nov 3 15:57:21 2026 +0100
Remove the PR suggestion bot blocked by the ASF actions allow-list
comment-pr.yml has ended in startup_failure, with no job created, on every
run since 2026-03-20. GitHub rejects the workflow because
googleapis/code-suggester@v4 is not on the ASF GitHub Actions allow-list
(apache/infrastructure-actions), which ASF has enforced since then; no other
apache repository uses that action. It was not a GITHUB_TOKEN permission
problem.
receive-pr.yml only existed to produce the patch and PR number artifacts
that
comment-pr.yml posted, so it is removed too. The patch it produced covered
best-practice drift across the whole repository rather than the PR's own
changes. The openrewrite Maven profile stays, so the best practices can
still
be applied locally with mvn -Popenrewrite rewrite:run.
Closes #133
---
.github/workflows/comment-pr.yml | 58 ----------------------------------
.github/workflows/receive-pr.yml | 67 ----------------------------------------
README.adoc | 3 +-
3 files changed, 1 insertion(+), 127 deletions(-)
diff --git a/.github/workflows/comment-pr.yml b/.github/workflows/comment-pr.yml
deleted file mode 100644
index 8338f90..0000000
--- a/.github/workflows/comment-pr.yml
+++ /dev/null
@@ -1,58 +0,0 @@
-# Description: This workflow is triggered when the `receive-pr` workflow
completes to post suggestions on the PR.
-# Since this pull request has write permissions on the target repo, we should
**NOT** execute any untrusted code.
-#
https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
----
-name: comment-pr
-
-on:
- workflow_run:
- workflows: ["receive-pr"]
- types:
- - completed
-
-jobs:
- post-suggestions:
- #
https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#running-a-workflow-based-on-the-conclusion-of-another-workflow
- if: ${{ github.event.workflow_run.conclusion == 'success' }}
- runs-on: ubuntu-latest
- permissions:
- pull-requests: write
- env:
- #
https://docs.github.com/en/actions/reference/authentication-in-a-workflow#permissions-for-the-github_token
- ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- timeout-minutes: 10
- steps:
- - uses: actions/checkout@v4
- with:
- ref: ${{github.event.workflow_run.head_branch}}
- repository: ${{github.event.workflow_run.head_repository.full_name}}
-
- # Download the patch
- - uses: actions/download-artifact@v4
- with:
- name: patch
- github-token: ${{ secrets.GITHUB_TOKEN }}
- run-id: ${{ github.event.workflow_run.id }}
- - name: Apply patch
- run: |
- git apply git-diff.patch --allow-empty
- rm git-diff.patch
-
- # Download the PR number
- - uses: actions/download-artifact@v4
- with:
- name: pr_number
- github-token: ${{ secrets.GITHUB_TOKEN }}
- run-id: ${{ github.event.workflow_run.id }}
- - name: Read pr_number.txt
- run: |
- PR_NUMBER=$(cat pr_number.txt)
- echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_ENV
- rm pr_number.txt
-
- # Post suggestions as a comment on the PR
- - uses: googleapis/code-suggester@v4
- with:
- command: review
- pull_number: ${{ env.PR_NUMBER }}
- git_dir: '.'
diff --git a/.github/workflows/receive-pr.yml b/.github/workflows/receive-pr.yml
deleted file mode 100644
index b2e138e..0000000
--- a/.github/workflows/receive-pr.yml
+++ /dev/null
@@ -1,67 +0,0 @@
-# Description: This workflow runs OpenRewrite recipes against opened pull
request and upload the patch.
-# Since this pull request receives untrusted code, we should **NOT** have any
secrets in the environment.
-#
https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
----
-name: receive-pr
-
-on:
- pull_request:
- types: [opened, synchronize]
- branches:
- - main
-
-permissions:
- contents: read
-
-concurrency:
- group: ${{ github.workflow }}-${{ github.ref }}
- cancel-in-progress: true
-
-defaults:
- run:
- shell: bash
-
-env:
- MAVEN_OPTS: -Xmx8g
- GRADLE_OPTS: -Dorg.gradle.jvmargs='-Xmx8g'
-
-jobs:
- upload-patch:
- runs-on: ubuntu-latest
- timeout-minutes: 10
- steps:
- - uses: actions/checkout@v4
- with:
- ref: ${{github.event.pull_request.head.ref}}
- repository: ${{github.event.pull_request.head.repo.full_name}}
- - name: Set up JDK 17
- uses: actions/setup-java@v4
- with:
- distribution: temurin
- java-version: 17
- cache: 'maven'
-
- # Capture the PR number
- #
https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#using-data-from-the-triggering-workflow
- - name: Create pr_number.txt
- run: echo "${{ github.event.number }}" > pr_number.txt
- - uses: actions/upload-artifact@v4
- with:
- name: pr_number
- path: pr_number.txt
- - name: Remove pr_number.txt
- run: rm -f pr_number.txt
-
- # Execute recipes
- - name: Apply OpenRewrite recipes
- run: |
- mvn --batch-mode --activate-profiles openrewrite rewrite:run
-
- # Capture the diff
- - name: Create patch
- run: |
- git diff | tee git-diff.patch
- - uses: actions/upload-artifact@v4
- with:
- name: patch
- path: git-diff.patch
diff --git a/README.adoc b/README.adoc
index 7e85614..164664d 100644
--- a/README.adoc
+++ b/README.adoc
@@ -189,8 +189,7 @@ svn commit -m "Cleaning cancelled Camel Upgrade Recipes
release *$VERSION)"
## Applying OpenRewrite best practices
-On pull requests, a GitHub Action is run to apply OpenRewrite best practices
to the codebase.
-To minimize changes, you can run the following command locally to apply the
same best practices:
+The `openrewrite` profile applies the OpenRewrite recipe best practices to the
codebase. Run it locally before opening a pull request:
```
mvn -Popenrewrite rewrite:run