mirror of
https://github.com/jessfraz/dockerfiles.git
synced 2024-11-27 04:16:45 +01:00
fixup
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
This commit is contained in:
parent
44244d5137
commit
139cf92cb5
|
@ -22,16 +22,16 @@ API_HEADER="Accept: application/vnd.github.${API_VERSION}+json"
|
||||||
AUTH_HEADER="Authorization: token ${GITHUB_TOKEN}"
|
AUTH_HEADER="Authorization: token ${GITHUB_TOKEN}"
|
||||||
|
|
||||||
main(){
|
main(){
|
||||||
action=$(cat "$GITHUB_EVENT_PATH" | jq --raw-output .action)
|
action=$(jq --raw-output .action "$GITHUB_EVENT_PATH")
|
||||||
merged=$(cat "$GITHUB_EVENT_PATH" | jq --raw-output .pull_request.merged)
|
merged=$(jq --raw-output .pull_request.merged "$GITHUB_EVENT_PATH")
|
||||||
|
|
||||||
echo "action: $action merged: $merged"
|
echo "action: $action merged: $merged"
|
||||||
|
|
||||||
if [[ "$action" == "closed" ]] && [[ "$merged" == "true" ]]; then
|
if [[ "$action" == "closed" ]] && [[ "$merged" == "true" ]]; then
|
||||||
# delete the branch.
|
# delete the branch.
|
||||||
ref=$(cat "$GITHUB_EVENT_PATH" | jq --raw-output .pull_request.head.ref)
|
ref=$(jq --raw-output .pull_request.head.ref "$GITHUB_EVENT_PATH")
|
||||||
owner=$(cat "$GITHUB_EVENT_PATH" | jq --raw-output .pull_request.head.repo.owner.login)
|
owner=$(jq --raw-output .pull_request.head.repo.owner.login "$GITHUB_EVENT_PATH")
|
||||||
repo=$(cat "$GITHUB_EVENT_PATH" | jq --raw-output .pull_request.head.repo.name)
|
repo=$(jq --raw-output .pull_request.head.repo.name "$GITHUB_EVENT_PATH")
|
||||||
|
|
||||||
if [[ "$ref" == "master" ]]; then
|
if [[ "$ref" == "master" ]]; then
|
||||||
# Never delete the master branch.
|
# Never delete the master branch.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user