From 7fd77fa64b0def211645264602db3bc235232a88 Mon Sep 17 00:00:00 2001 From: Dan Ballard Date: Sat, 7 Jul 2018 14:36:07 -0500 Subject: [PATCH] gogs_url a plugin param --- gogs-notify | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gogs-notify b/gogs-notify index d71ba87..aa031b0 100755 --- a/gogs-notify +++ b/gogs-notify @@ -1,8 +1,8 @@ #!/bin/sh -URL="$GOGS_URL/api/v1/repos/${DRONE_REPO}/issues/${DRONE_PULL_REQUEST}/comments" +URL="$PLUGIN_GOGS_URL/api/v1/repos/$DRONE_REPO/issues/$DRONE_PULL_REQUEST/comments" -RESULT=$(curl -s -o /dev/null -w "%{http_code}" -H "Authorization: token $GOGS_ACCOUNT_TOKEN" -H "Content-Type: application/json" -d "{\"Body\": \"Drone Build Status: ${DRONE_BUILD_STATUS}\n\n${DRONE_BUILD_LINK}\"}" -X POST $URL) +RESULT=$(curl -s -o /dev/null -w "%{http_code}" -H "Authorization: token $GOGS_ACCOUNT_TOKEN" -H "Content-Type: application/json" -d "{\"Body\": \"Drone Build Status: $DRONE_BUILD_STATUS\n\n$DRONE_BUILD_LINK\"}" -X POST $URL) CURL_RESULT=$? if [ $RESULT -eq 201 ]