Skip to content

Commit 8eeefe1

Browse files
committed
add --draft if 'open' was not passed
1 parent 7ab64d7 commit 8eeefe1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

bin/validate-plugin-version.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,11 @@ main() {
138138
BASE_BRANCH="${BRANCH:-$DEFAULT_BRANCH}"
139139

140140
echo "Creating a pull request with base branch $BASE_BRANCH."
141-
gh pr create --title "Update Tested Up To version to $CURRENT_WP_VERSION" --body "This pull request updates the \"Tested up to\" version in specified files (${FILENAMES}) to match the current WordPress version $CURRENT_WP_VERSION." --base "$BASE_BRANCH" --draft
141+
local PR_OPTIONS="--title \"Update Tested Up To version to $CURRENT_WP_VERSION\" --body \"This pull request updates the 'Tested up to' version in specified files (${FILENAMES}) to match the current WordPress version $CURRENT_WP_VERSION.\" --base \"$BASE_BRANCH\""
142+
if [[ "${PR_STATUS:-}" != "open" ]]; then
143+
PR_OPTIONS="$PR_OPTIONS --draft"
144+
fi
145+
gh pr create $PR_OPTIONS
142146
}
143147

144148
main

0 commit comments

Comments
 (0)