Fix case when pull request already exists

If a PR with the given title exists, we clone the existing PR branch so
that it doesn't get overridden by master.

See gh-20530
This commit is contained in:
Madhura Bhave
2020-03-31 13:54:37 -07:00
parent 9ef56b43bf
commit 1ea8c7b55d
4 changed files with 23 additions and 19 deletions

View File

@@ -11,5 +11,5 @@ if [[ -f commit-details/message ]]; then
-X \
POST "https://api.github.com/repos/${GITHUB_ORGANIZATION}/${GITHUB_REPO}/pulls" > /dev/null || { echo "Failed to create pull request" >&2; exit 1; }
else
echo "Already up-to-date"
echo "Already up-to-date."
fi