This is an automated email from the ASF dual-hosted git repository.
ppkarwasz pushed a commit to branch gha/v0
in repository https://gitbox.apache.org/repos/asf/logging-parent.git
The following commit(s) were added to refs/heads/gha/v0 by this push:
new cf63109 Don't switch to "Draft mode" (#500)
cf63109 is described below
commit cf6310917ed33592e3cba1ea035c43c6709fee0c
Author: Piotr P. Karwasz <[email protected]>
AuthorDate: Fri Jul 24 12:36:40 2026 +0200
Don't switch to "Draft mode" (#500)
* Don't switch to "Draft mode"
Since GitHub's June 11, 2026 change "Bot-created pull requests can run
workflows if approved"[1], workflows triggered by the "Process Dependabot
PR" push are no longer silently dropped, but created in an
approval-required state. A maintainer can start the required build checks
with the "Approve workflows to run" button, so parking the PR in draft
mode is no longer necessary.
Also drop the `pull-requests: write` permission, which was only needed to
toggle draft mode, and explicitly opt into `persist-credentials` for the
checkout, since the changelog commit push relies on it.
[1]
https://github.blog/changelog/2026-06-11-bot-created-pull-requests-can-run-workflows-if-approved/
Assisted-By: Claude Fable 5 <[email protected]>
* Enable auto-merge instead
Since the required build checks can now be started with the "Approve
workflows to run" button, restore the pre-#475 behavior of enabling
"auto-merge" on the PR: after a maintainer approves the PR and its
workflow runs, the PR merges automatically once the required checks pass.
Assisted-By: Claude Fable 5 <[email protected]>
---
.github/workflows/process-dependabot-reusable.yaml | 19 +++++--------------
1 file changed, 5 insertions(+), 14 deletions(-)
diff --git a/.github/workflows/process-dependabot-reusable.yaml
b/.github/workflows/process-dependabot-reusable.yaml
index 5de0638..9c7c6b6 100644
--- a/.github/workflows/process-dependabot-reusable.yaml
+++ b/.github/workflows/process-dependabot-reusable.yaml
@@ -43,7 +43,7 @@ jobs:
permissions:
# Push changelog commit
contents: write
- # Switch PR into draft mode
+ # Enable auto-merge on the PR
pull-requests: write
steps:
@@ -79,6 +79,8 @@ jobs:
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # 7.0.0
with:
ref: ${{ steps.pr.outputs.head-ref }}
+ # The credentials will be used in the "Add & commit changes" step
+ persist-credentials: true
# An action triggered by `workflow_run` has access to secrets.
# Checking out untrusted code requires an explicit opt-in.
allow-unsafe-pr-checkout: true
@@ -142,21 +144,10 @@ jobs:
git push origin "HEAD:${HEAD_REF}"
fi
- # Pushes made with the default `GITHUB_TOKEN` do not trigger workflows
(GitHub anti-recursion rule),
- # so the required checks will not re-run against the changelog commit
pushed above.
- # Introducing a PAT is undesirable, so we park the PR in draft mode
instead.
- # A maintainer must then:
- # 1. Approve the PR.
- # 2. Mark the PR as “Ready for review”, this fires `ready_for_review`,
- # which runs CI against the changelog commit.
- # 3. Enable “auto-merge”.
- - name: Switch PR into draft mode
+ - name: Enable auto-merge on PR
shell: bash
env:
GH_TOKEN: ${{ github.token }}
PR_ID: ${{ steps.pr.outputs.id }}
run: |
- is_draft=$(gh pr view "$PR_ID" --json isDraft -q .isDraft)
- if [ "$is_draft" = "false" ]; then
- gh pr ready --undo "$PR_ID"
- fi
+ gh pr merge --squash --auto "$PR_ID"