From aa12ef06b4cbafe1cce4024d8dc15a9c51c5d89f Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Mon, 22 Jun 2026 13:27:47 +0100 Subject: [PATCH] Do not create draft PRs where we did so to trigger workflows with `ready_for_review` before --- .github/actions/prepare-mergeback-branch/action.yml | 7 ++----- .github/update-release-branch.py | 6 ++---- .github/workflows/rebuild.yml | 3 +-- .github/workflows/update-bundle.yml | 1 - 4 files changed, 5 insertions(+), 12 deletions(-) diff --git a/.github/actions/prepare-mergeback-branch/action.yml b/.github/actions/prepare-mergeback-branch/action.yml index d4dee99bc..2c57dfc01 100644 --- a/.github/actions/prepare-mergeback-branch/action.yml +++ b/.github/actions/prepare-mergeback-branch/action.yml @@ -91,18 +91,15 @@ runs: Please do the following: - - [ ] Mark the PR as ready for review to trigger the full set of PR checks. + - [ ] Approve running the full set of PR checks. - [ ] Approve and merge the PR. When merging the PR, make sure "Create a merge commit" is selected rather than "Squash and merge" or "Rebase and merge". EOF ) - # PR checks won't be triggered on PRs created by Actions. Therefore mark the PR as draft - # so that a maintainer can take the PR out of draft, thereby triggering the PR checks. gh pr create \ --head "${NEW_BRANCH}" \ --base "${BASE_BRANCH}" \ --title "${pr_title}" \ --body "${pr_body}" \ - --assignee "${GITHUB_ACTOR}" \ - --draft + --assignee "${GITHUB_ACTOR}" diff --git a/.github/update-release-branch.py b/.github/update-release-branch.py index 784a450ef..263512682 100644 --- a/.github/update-release-branch.py +++ b/.github/update-release-branch.py @@ -136,7 +136,7 @@ def open_pr( body.append(f' - [ ] Check that there are not any unexpected commits being merged into the `{target_branch}` branch.') body.append(' - [ ] Ensure the docs team is aware of any documentation changes that need to be released.') - body.append(' - [ ] Mark the PR as ready for review to trigger the full set of PR checks.') + body.append(' - [ ] Approve running the full set of PR checks if you have not pushed any changes.') body.append(' - [ ] Approve and merge this PR. Make sure `Create a merge commit` is selected rather than `Squash and merge` or `Rebase and merge`.') if is_primary_release: @@ -146,9 +146,7 @@ def open_pr( title = f'Merge {source_branch} into {target_branch}' # Create the pull request - # PR checks won't be triggered on PRs created by Actions. Therefore mark the PR as draft so that - # a maintainer can take the PR out of draft, thereby triggering the PR checks. - pr = repo.create_pull(title=title, body='\n'.join(body), head=new_branch_name, base=target_branch, draft=True) + pr = repo.create_pull(title=title, body='\n'.join(body), head=new_branch_name, base=target_branch) print(f'Created PR #{str(pr.number)}') # Assign the conductor diff --git a/.github/workflows/rebuild.yml b/.github/workflows/rebuild.yml index f1d74dc8f..26acd867f 100644 --- a/.github/workflows/rebuild.yml +++ b/.github/workflows/rebuild.yml @@ -143,6 +143,5 @@ jobs: PR_NUMBER: ${{ github.event.pull_request.number }} run: | echo "Pushed a commit to rebuild the Action." \ - "Please mark the PR as ready for review to trigger PR checks." | + "Please approve running the PR checks." | gh pr comment --body-file - --repo github/codeql-action "$PR_NUMBER" - gh pr ready --undo --repo github/codeql-action "$PR_NUMBER" diff --git a/.github/workflows/update-bundle.yml b/.github/workflows/update-bundle.yml index 94c79bc56..6b15d1932 100644 --- a/.github/workflows/update-bundle.yml +++ b/.github/workflows/update-bundle.yml @@ -114,7 +114,6 @@ jobs: --title "Update default bundle to $cli_version" \ --body "$pr_body" \ --assignee "$GITHUB_ACTOR" \ - --draft \ ) echo "CLI_VERSION=$cli_version" | tee -a "$GITHUB_ENV" echo "PR_URL=$pr_url" | tee -a "$GITHUB_ENV"