This is an automated email from the ASF dual-hosted git repository. ppkarwasz pushed a commit to branch docs/main/no-draft-mode in repository https://gitbox.apache.org/repos/asf/logging-parent.git
commit cdf24730107daaaa58bfc581a3565b5716f4bf38 Author: Piotr P. Karwasz <[email protected]> AuthorDate: Fri Jul 24 12:09:08 2026 +0200 Remove "draft trick" documentation Since GitHub's June 11, 2026 change "Bot-created pull requests can run workflows if approved"[1], workflow runs triggered by the changelog commit pushed with `GITHUB_TOKEN` are created in an approval-required state instead of being dropped. A maintainer can start the required checks with the "Approve workflows to run" button, so the "draft trick" documented in #476 is no longer necessary. - Update the `process-dependabot-reusable.yaml` documentation to describe the new flow. - Drop the `pull-requests: write` permission from the caller workflow and the example snippet. - Remove the `ready_for_review` trigger from `build.yaml` and `codeql-analysis.yaml`, restoring the default `pull_request` types. [1] https://github.blog/changelog/2026-06-11-bot-created-pull-requests-can-run-workflows-if-approved/ Assisted-By: Claude Fable 5 <[email protected]> --- .github/workflows/build.yaml | 7 ----- .github/workflows/codeql-analysis.yaml | 7 ----- .github/workflows/process-dependabot.yaml | 4 +-- .../modules/ROOT/examples/process-dependabot.yaml | 2 -- src/site/antora/modules/ROOT/pages/workflows.adoc | 32 +++++----------------- 5 files changed, 8 insertions(+), 44 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d306578..a87c0c8 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -26,13 +26,6 @@ on: - "**.md" - "**.txt" pull_request: - types: - # Standard types - - opened - - synchronize - - reopened - # Used in Dependabot PRs to retrigger required workflows - - ready_for_review # If the branch is `main`, run once per commit. # If the branch is `release/*`, allow only one concurrent run. diff --git a/.github/workflows/codeql-analysis.yaml b/.github/workflows/codeql-analysis.yaml index 532d8ac..9aff2e6 100644 --- a/.github/workflows/codeql-analysis.yaml +++ b/.github/workflows/codeql-analysis.yaml @@ -26,13 +26,6 @@ on: pull_request: branches: - "main" - types: - # Standard types - - opened - - synchronize - - reopened - # Used in Dependabot PRs to retrigger required workflows - - ready_for_review schedule: - cron: '32 12 * * 5' diff --git a/.github/workflows/process-dependabot.yaml b/.github/workflows/process-dependabot.yaml index 0004555..2b6efcc 100644 --- a/.github/workflows/process-dependabot.yaml +++ b/.github/workflows/process-dependabot.yaml @@ -39,10 +39,8 @@ jobs: }} uses: apache/logging-parent/.github/workflows/process-dependabot-reusable.yaml@gha/v0 permissions: - # The default GITHUB_TOKEN will be used to enable the "auto-merge" on the PR - # This requires the following two permissions: + # Append the changelog commit contents: write - pull-requests: write with: # The path to the changelog directory for the current development branch. changelog-path: src/changelog/.12.x.x diff --git a/src/site/antora/modules/ROOT/examples/process-dependabot.yaml b/src/site/antora/modules/ROOT/examples/process-dependabot.yaml index a55cc4c..1504c78 100644 --- a/src/site/antora/modules/ROOT/examples/process-dependabot.yaml +++ b/src/site/antora/modules/ROOT/examples/process-dependabot.yaml @@ -40,8 +40,6 @@ jobs: permissions: # Append the changelog commit contents: write - # Convert the PR into draft - pull-requests: write with: # The path to the changelog directory for the current development branch. changelog-path: src/changelog/.12.x.x diff --git a/src/site/antora/modules/ROOT/pages/workflows.adoc b/src/site/antora/modules/ROOT/pages/workflows.adoc index 87a803a..2d6dbd8 100644 --- a/src/site/antora/modules/ROOT/pages/workflows.adoc +++ b/src/site/antora/modules/ROOT/pages/workflows.adoc @@ -124,40 +124,22 @@ include::example$analyze-dependabot.yaml[tag=analyze-dependabot,indent=0] [#process-dependabot] == {project-github-url}/blob/{project-gha-version}/.github/workflows/process-dependabot-reusable.yaml[`process-dependabot-reusable.yaml`] -Helps to process Dependabot pull requests by: +Helps to process Dependabot pull requests by generating changelog entries for the updated dependencies and committing them to the PR branch. -* Generating changelog entries for the updated dependencies and committing them to the PR branch. -* Switching the pull request into “draft mode”. - -The workflow only needs the default `GITHUB_TOKEN` with `contents: write` and `pull-requests: write` permissions. +The workflow only needs the default `GITHUB_TOKEN` with the `contents: write` permission. This workflow is designed to be triggered by the `workflow_run` event, as soon as the <<analyze-dependabot>> workflow completes. [NOTE] ==== -Pushes made with `GITHUB_TOKEN` do not retrigger workflows (GitHub anti-recursion rule), so the changelog commit cannot re-run the required checks on its own. -This reusable workflow therefore parks the PR in “draft mode” and stops there. +Pushes made with `GITHUB_TOKEN` do not automatically retrigger workflows (GitHub anti-recursion rule), so the required checks do not run against the changelog commit on their own. +However, since GitHub's June 11, 2026 change https://github.blog/changelog/2026-06-11-bot-created-pull-requests-can-run-workflows-if-approved/[Bot-created pull requests can run workflows if approved], the workflow runs are created in an approval-required state instead of being dropped, and a maintainer can start them manually. The expected flow for each Dependabot PR is: -. The reusable workflow appends the changelog commit and converts the PR into draft. -. A maintainer reviews the change, clicks *Ready for review*, and enables *Auto-merge*. -. The required-check workflows re-run against the new HEAD; once they pass, *Auto-merge* completes the merge without further manual action. - -For step 3 to work, every workflow providing a required check must subscribe to `ready_for_review`: - -[source,yaml] ----- -on: - pull_request: - types: - # Standard types - - opened - - synchronize - - reopened - # Used in Dependabot PRs to retrigger required workflows - - ready_for_review ----- +. The reusable workflow appends the changelog commit to the PR branch. +. A maintainer reviews the change, clicks *Approve workflows to run*, and enables *Auto-merge*. +. The required-check workflows run against the new HEAD; once they pass, *Auto-merge* completes the merge without further manual action. This reusable workflow does **not** enable “Auto-merge”; a maintainer must do that by hand. ====
