You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add option for automerger workflow to create non-draft PRs
Add an option to the GitHub automerger workflow to optionally create a
PR as non-draft. When this is the case, the tests will be demanded by
commenting `@swift-ci please test` on the created PR.
Copy file name to clipboardExpand all lines: .github/workflows/create_automerge_pr.yml
+17-3Lines changed: 17 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -59,6 +59,10 @@ on:
59
59
type: string
60
60
description: The message that should be included in the PR created by this job
61
61
default: This PR was automatically opened by a GitHub action. Review the changes included in this PR and determine if they should be included in the release branch. If yes, merge the PR. Otherwise revert changes that should not be included on this branch.
62
+
create_as_draft:
63
+
type: boolean
64
+
description: Whether to create the PR as a draft
65
+
default: true
62
66
63
67
jobs:
64
68
create_merge_pr:
@@ -93,6 +97,10 @@ jobs:
93
97
env:
94
98
GH_TOKEN: ${{ github.token }}
95
99
run: |
100
+
# Define variables based on workflow input
101
+
if [[ "${{ inputs.create_as_draft }} == "true" ]] ; then
102
+
DRAFT_FLAG="--draft"
103
+
fi
96
104
# Create a branch for the PR instead of opening a PR that merges head_branch directly so that we have a fixed
97
105
# target in the PR and don't modify the PR as new commits are put on the head branch.
0 commit comments