parent
4752d7e91a
commit
e174231d15
@ -1,11 +1,17 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
curl \
|
commit_message=$( cat commit-details/message )
|
||||||
-s \
|
|
||||||
-u ${GITHUB_USERNAME}:${GITHUB_PASSWORD} \
|
if [[ ${commit_message} != "" ]]; then
|
||||||
-H "Content-type:application/json" \
|
curl \
|
||||||
-d "{\"head\":\"${BRANCH}\",\"base\":\"${BASE_BRANCH}\",\"title\":\"${ISSUE_TITLE}\",\"body\":\"\",\"labels\":[\"status: waiting-for-triage\",\"type: task\"]}" \
|
-s \
|
||||||
-f \
|
-u ${GITHUB_USERNAME}:${GITHUB_PASSWORD} \
|
||||||
-X \
|
-H "Content-type:application/json" \
|
||||||
POST "https://api.github.com/repos/${GITHUB_ORGANIZATION}/${GITHUB_REPO}/pulls" > /dev/null || { echo "Failed to create pull request" >&2; exit 1; }
|
-d "{\"head\":\"${BRANCH}\",\"base\":\"${BASE_BRANCH}\",\"title\":\"${ISSUE_TITLE}\",\"body\":\"\",\"labels\":[\"status: waiting-for-triage\",\"type: task\"]}" \
|
||||||
|
-f \
|
||||||
|
-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"
|
||||||
|
fi
|
Loading…
Reference in New Issue