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 additional configurability to the GitHub automerger workflow to
optionally create the PR as non-draft, and to trigger testing by commenting
`@swift-ci please test` on the created PR.
Copy file name to clipboardExpand all lines: .github/workflows/create_automerge_pr.yml
+21-3Lines changed: 21 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -59,6 +59,14 @@ 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
66
+
should_test:
67
+
type: boolean
68
+
description: Whether the created PR should trigger tests
69
+
default: false
62
70
63
71
jobs:
64
72
create_merge_pr:
@@ -93,6 +101,10 @@ jobs:
93
101
env:
94
102
GH_TOKEN: ${{ github.token }}
95
103
run: |
104
+
# Define variables based on workflow input
105
+
if [[ "${{ inputs.create_as_draft }} == "true" ]] ; then
106
+
DRAFT_FLAG="--draft"
107
+
fi
96
108
# Create a branch for the PR instead of opening a PR that merges head_branch directly so that we have a fixed
97
109
# target in the PR and don't modify the PR as new commits are put on the head branch.
0 commit comments