Do not create draft PRs where we did so to trigger workflows with ready_for_review before

This commit is contained in:
Michael B. Gale
2026-06-22 13:27:47 +01:00
parent e3a04b7473
commit aa12ef06b4
4 changed files with 5 additions and 12 deletions

View File

@@ -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}"

View File

@@ -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

View File

@@ -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"

View File

@@ -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"