From e1c3f3f75f1293d3b9e6fe0c4df2fd172cab4d69 Mon Sep 17 00:00:00 2001 From: Lucas Combs Date: Tue, 24 Sep 2019 18:18:54 -0400 Subject: [PATCH 01/16] GH-5: Hook will now work on all operating systems * Windows does not have wget * chmod is not needed when we call BASH directly * Updated example --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 17751b3..1b7c4c7 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ## Setup 1. In Github secrets, add a `WEBHOOK_URL` variable with the Discord web hook URL 1. In your Github actions yml file, add this to reference the variable you just created: - - To see a real example, visit [here](https://github.com/unthreaded/git-hooks/blob/80e914105c0a9d94282f8f1b0a1b39ea8d59dc33/.github/workflows/build.yml#L36). + - To see a real example, visit [here](https://github.com/unthreaded/git-hooks/blob/d1f4df504dab979c1406daf67e13f144feb7d47b/.github/workflows/build.yml#L43). ```yaml - name: Send Webhook Notification if: always() @@ -10,8 +10,8 @@ JOB_STATUS: ${{ job.status }} WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }} run: | - wget https://raw.githubusercontent.com/DiscordHooks/github-actions-discord-webhook/master/send.sh - chmod +x send.sh - ./send.sh $JOB_STATUS $WEBHOOK_URL + git clone https://github.com/DiscordHooks/github-actions-discord-webhook.git webhook + bash webhook/send.sh $JOB_STATUS $WEBHOOK_URL + shell: bash ``` -1. Enjoy! \ No newline at end of file +1. Enjoy! From 98f6ae8845fe597f99b0d7227b5cb2b527d1f7a5 Mon Sep 17 00:00:00 2001 From: Lucas Combs Date: Wed, 25 Sep 2019 21:24:02 -0400 Subject: [PATCH 02/16] Added testing script --- testing_utils/README.md | 5 +++++ testing_utils/local_env_run.sh | 10 ++++++++++ 2 files changed, 15 insertions(+) create mode 100644 testing_utils/README.md create mode 100644 testing_utils/local_env_run.sh diff --git a/testing_utils/README.md b/testing_utils/README.md new file mode 100644 index 0000000..1215edc --- /dev/null +++ b/testing_utils/README.md @@ -0,0 +1,5 @@ +# Testing utils +Testing this on GitHub Actions can be annoying due to wait times. While you will eventually have to do so, when developing locally, it's nice to have these tool(s). + +## Tools + - `setup_local_env.sh` Setup dummy variables and run send.sh! \ No newline at end of file diff --git a/testing_utils/local_env_run.sh b/testing_utils/local_env_run.sh new file mode 100644 index 0000000..d099f3d --- /dev/null +++ b/testing_utils/local_env_run.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +export GITHUB_SHA="69a3b64e5b36db68b54ca7291d8acfde261dda76" +# Enter your url.....don't commit this +export DISCORD_URL="" +export GITHUB_REPOSITORY="DiscordHooks/github-actions-discord-webhook" +export GITHUB_REF="refs/heads/feature/example-branch" +export HOOK_OS_NAME="Windows" +export WORKFLOW_NAME="Main Pipeline" +./send.sh Success $DISCORD_URL \ No newline at end of file From 5a19838aa4aaa1573e227122189070565db38ae0 Mon Sep 17 00:00:00 2001 From: Lucas Combs Date: Wed, 25 Sep 2019 21:25:35 -0400 Subject: [PATCH 03/16] Mended branch SED pattern --- send.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/send.sh b/send.sh index 346def2..be5949b 100644 --- a/send.sh +++ b/send.sh @@ -37,8 +37,8 @@ COMMIT_URL="https://github.com/$GITHUB_REPOSITORY/commit/$GITHUB_SHA" # If, for example, $GITHUB_REF = refs/heads/feature/example-branch # Then this sed command returns: feature/example-branch -BRANCH_NAME="$(echo $GITHUB_REF | sed 's/^.*\/.*\///g')" BRANCH_URL="https://github.com/$GITHUB_REPOSITORY/tree/$BRANCH_NAME" +BRANCH_NAME="$(echo $GITHUB_REF | sed 's/^[^/]*\/[^/]*\///g')" if [ "$AUTHOR_NAME" == "$COMMITTER_NAME" ]; then CREDITS="$AUTHOR_NAME authored & committed" From 4a39125c3a4fb3119611264d1b75ff4c07401206 Mon Sep 17 00:00:00 2001 From: Lucas Combs Date: Wed, 25 Sep 2019 21:26:01 -0400 Subject: [PATCH 04/16] Added more GitHub Actions details to hook --- send.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/send.sh b/send.sh index be5949b..52432aa 100644 --- a/send.sh +++ b/send.sh @@ -37,8 +37,10 @@ COMMIT_URL="https://github.com/$GITHUB_REPOSITORY/commit/$GITHUB_SHA" # If, for example, $GITHUB_REF = refs/heads/feature/example-branch # Then this sed command returns: feature/example-branch -BRANCH_URL="https://github.com/$GITHUB_REPOSITORY/tree/$BRANCH_NAME" BRANCH_NAME="$(echo $GITHUB_REF | sed 's/^[^/]*\/[^/]*\///g')" +REPO_URL="https://github.com/$GITHUB_REPOSITORY" +BRANCH_URL="$REPO_URL/tree/$BRANCH_NAME" +ACTION_URL="$COMMIT_URL/checks" if [ "$AUTHOR_NAME" == "$COMMITTER_NAME" ]; then CREDITS="$AUTHOR_NAME authored & committed" @@ -53,12 +55,12 @@ WEBHOOK_DATA='{ "embeds": [ { "color": '$EMBED_COLOR', "author": { - "name": "Build '"$STATUS_MESSAGE"' - '"$GITHUB_REPOSITORY"'", - "url": "'$COMMIT_URL'", + "name": "'"$STATUS_MESSAGE"': '"$WORKFLOW_NAME"' ('"${HOOK_OS_NAME}"') - '"$GITHUB_REPOSITORY"'", + "url": "'$ACTION_URL'", "icon_url": "'$AVATAR'" }, "title": "'"$COMMIT_SUBJECT"'", - "url": "'"$URL"'", + "url": "'"$COMMIT_URL"'", "description": "'"${COMMIT_MESSAGE//$'\n'/ }"\\n\\n"$CREDITS"'", "fields": [ { From fc8425950e995fc1e47269722deb89a80490380e Mon Sep 17 00:00:00 2001 From: Lucas Combs Date: Fri, 27 Sep 2019 17:04:18 -0400 Subject: [PATCH 05/16] Working with pull requests in hook --- send.sh | 15 ++++++++++++--- testing_utils/local_env_run.sh | 1 + 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/send.sh b/send.sh index 52432aa..d48ed50 100644 --- a/send.sh +++ b/send.sh @@ -39,7 +39,8 @@ COMMIT_URL="https://github.com/$GITHUB_REPOSITORY/commit/$GITHUB_SHA" # Then this sed command returns: feature/example-branch BRANCH_NAME="$(echo $GITHUB_REF | sed 's/^[^/]*\/[^/]*\///g')" REPO_URL="https://github.com/$GITHUB_REPOSITORY" -BRANCH_URL="$REPO_URL/tree/$BRANCH_NAME" +BRANCH_OR_PR="Branch" +BRANCH_OR_PR_URL="$REPO_URL/tree/$BRANCH_NAME" ACTION_URL="$COMMIT_URL/checks" if [ "$AUTHOR_NAME" == "$COMMITTER_NAME" ]; then @@ -48,6 +49,14 @@ else CREDITS="$AUTHOR_NAME authored & $COMMITTER_NAME committed" fi +if [ "$GITHUB_EVENT_NAME" == "pull_request" ]; then + BRANCH_OR_PR="Pull Request" + + PR_NUM=$(echo $BRANCH_NAME | sed 's/^\([0-9]\+\).*/\1/g') + BRANCH_OR_PR_URL="$REPO_URL/pull/$PR_NUM" + BRANCH_NAME="#${PR_NUM}" +fi + TIMESTAMP=$(date --utc +%FT%TZ) WEBHOOK_DATA='{ "username": "", @@ -69,8 +78,8 @@ WEBHOOK_DATA='{ "inline": true }, { - "name": "Branch", - "value": "'"[\`${BRANCH_NAME}\`](${BRANCH_URL})"'", + "name": "'"$BRANCH_OR_PR"'", + "value": "'"[\`${BRANCH_NAME}\`](${BRANCH_OR_PR_URL})"'", "inline": true } ], diff --git a/testing_utils/local_env_run.sh b/testing_utils/local_env_run.sh index d099f3d..8c59f52 100644 --- a/testing_utils/local_env_run.sh +++ b/testing_utils/local_env_run.sh @@ -7,4 +7,5 @@ export GITHUB_REPOSITORY="DiscordHooks/github-actions-discord-webhook" export GITHUB_REF="refs/heads/feature/example-branch" export HOOK_OS_NAME="Windows" export WORKFLOW_NAME="Main Pipeline" +export GITHUB_EVENT_NAME = "pull_request" # Could also be push, ext. ./send.sh Success $DISCORD_URL \ No newline at end of file From feab42cb5e5d02ef272a62e332997c29381fcce1 Mon Sep 17 00:00:00 2001 From: Lucas Combs Date: Sat, 28 Sep 2019 10:33:41 -0400 Subject: [PATCH 06/16] Mend timestamp on macOS --- send.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/send.sh b/send.sh index d48ed50..c520357 100644 --- a/send.sh +++ b/send.sh @@ -57,7 +57,7 @@ if [ "$GITHUB_EVENT_NAME" == "pull_request" ]; then BRANCH_NAME="#${PR_NUM}" fi -TIMESTAMP=$(date --utc +%FT%TZ) +TIMESTAMP=$(date -u +%FT%TZ) WEBHOOK_DATA='{ "username": "", "avatar_url": "'$AVATAR'", From f531e6c9c9de0b29f8edde88cf2e0ade72777a60 Mon Sep 17 00:00:00 2001 From: Lucas Combs Date: Sat, 28 Sep 2019 14:45:13 -0400 Subject: [PATCH 07/16] Added support for GitHub pull requests --- README.md | 2 ++ send.sh | 13 +++++++++++-- testing_utils/local_env_run.sh | 4 ++-- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 17751b3..5f2ddd5 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,8 @@ env: JOB_STATUS: ${{ job.status }} WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }} + HOOK_OS_NAME: ${{ runner.os }} + WORKFLOW_NAME: ${{ github.workflow }} run: | wget https://raw.githubusercontent.com/DiscordHooks/github-actions-discord-webhook/master/send.sh chmod +x send.sh diff --git a/send.sh b/send.sh index c520357..b785450 100644 --- a/send.sh +++ b/send.sh @@ -42,7 +42,7 @@ REPO_URL="https://github.com/$GITHUB_REPOSITORY" BRANCH_OR_PR="Branch" BRANCH_OR_PR_URL="$REPO_URL/tree/$BRANCH_NAME" ACTION_URL="$COMMIT_URL/checks" - +COMMIT_OR_PR_URL=$COMMIT_SUBJECT if [ "$AUTHOR_NAME" == "$COMMITTER_NAME" ]; then CREDITS="$AUTHOR_NAME authored & committed" else @@ -55,6 +55,15 @@ if [ "$GITHUB_EVENT_NAME" == "pull_request" ]; then PR_NUM=$(echo $BRANCH_NAME | sed 's/^\([0-9]\+\).*/\1/g') BRANCH_OR_PR_URL="$REPO_URL/pull/$PR_NUM" BRANCH_NAME="#${PR_NUM}" + + # Call to GitHub API to get PR title + PULL_REQUEST_JSON=$(curl -s https://api.github.com/repos/$GITHUB_REPOSITORY/pulls/$PR_NUM) + PULL_REQUEST_TITLE=$(egrep \"title\" <<< $PULL_REQUEST_JSON | sed 's/.*": \"\(.*\)\".*/\1/g') + + COMMIT_SUBJECT=$PULL_REQUEST_TITLE + COMMIT_MESSAGE="Pull Request #$PR_NUM" + ACTION_URL="$BRANCH_OR_PR_URL/checks" + COMMIT_OR_PR_URL=$BRANCH_OR_PR_URL fi TIMESTAMP=$(date -u +%FT%TZ) @@ -69,7 +78,7 @@ WEBHOOK_DATA='{ "icon_url": "'$AVATAR'" }, "title": "'"$COMMIT_SUBJECT"'", - "url": "'"$COMMIT_URL"'", + "url": "'"$COMMIT_OR_PR_URL"'", "description": "'"${COMMIT_MESSAGE//$'\n'/ }"\\n\\n"$CREDITS"'", "fields": [ { diff --git a/testing_utils/local_env_run.sh b/testing_utils/local_env_run.sh index 8c59f52..702145b 100644 --- a/testing_utils/local_env_run.sh +++ b/testing_utils/local_env_run.sh @@ -4,8 +4,8 @@ export GITHUB_SHA="69a3b64e5b36db68b54ca7291d8acfde261dda76" # Enter your url.....don't commit this export DISCORD_URL="" export GITHUB_REPOSITORY="DiscordHooks/github-actions-discord-webhook" -export GITHUB_REF="refs/heads/feature/example-branch" +export GITHUB_REF="refs/heads/4/merge" # refs/heads/feature/new-stuff export HOOK_OS_NAME="Windows" export WORKFLOW_NAME="Main Pipeline" -export GITHUB_EVENT_NAME = "pull_request" # Could also be push, ext. +export GITHUB_EVENT_NAME="pull_request" # Could also be push, ext. ./send.sh Success $DISCORD_URL \ No newline at end of file From 6ff39f1bd9c1ced2acecd0326709365762bbb70f Mon Sep 17 00:00:00 2001 From: Lucas Combs Date: Sat, 28 Sep 2019 14:51:35 -0400 Subject: [PATCH 08/16] Attempt to fix PR # on macOS --- send.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/send.sh b/send.sh index b785450..aa8c354 100644 --- a/send.sh +++ b/send.sh @@ -52,7 +52,7 @@ fi if [ "$GITHUB_EVENT_NAME" == "pull_request" ]; then BRANCH_OR_PR="Pull Request" - PR_NUM=$(echo $BRANCH_NAME | sed 's/^\([0-9]\+\).*/\1/g') + PR_NUM=$(sed 's/\/.*//g' <<< $BRANCH_NAME) BRANCH_OR_PR_URL="$REPO_URL/pull/$PR_NUM" BRANCH_NAME="#${PR_NUM}" From e9802bccb1064783515bd3b9494863e2317ca947 Mon Sep 17 00:00:00 2001 From: Lucas Combs Date: Sat, 28 Sep 2019 15:14:37 -0400 Subject: [PATCH 09/16] Mend bad request for push --- send.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/send.sh b/send.sh index aa8c354..7ab2327 100644 --- a/send.sh +++ b/send.sh @@ -42,7 +42,7 @@ REPO_URL="https://github.com/$GITHUB_REPOSITORY" BRANCH_OR_PR="Branch" BRANCH_OR_PR_URL="$REPO_URL/tree/$BRANCH_NAME" ACTION_URL="$COMMIT_URL/checks" -COMMIT_OR_PR_URL=$COMMIT_SUBJECT +COMMIT_OR_PR_URL=$COMMIT_URL if [ "$AUTHOR_NAME" == "$COMMITTER_NAME" ]; then CREDITS="$AUTHOR_NAME authored & committed" else From 14eea07d1ba6a095761e3a6f5dd1e5e661c318be Mon Sep 17 00:00:00 2001 From: Lucas Combs Date: Sat, 28 Sep 2019 15:26:27 -0400 Subject: [PATCH 10/16] Add fail flag to GitHub api call --- send.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/send.sh b/send.sh index 7ab2327..cec54d9 100644 --- a/send.sh +++ b/send.sh @@ -57,7 +57,7 @@ if [ "$GITHUB_EVENT_NAME" == "pull_request" ]; then BRANCH_NAME="#${PR_NUM}" # Call to GitHub API to get PR title - PULL_REQUEST_JSON=$(curl -s https://api.github.com/repos/$GITHUB_REPOSITORY/pulls/$PR_NUM) + PULL_REQUEST_JSON=$(curl -f -s https://api.github.com/repos/$GITHUB_REPOSITORY/pulls/$PR_NUM) PULL_REQUEST_TITLE=$(egrep \"title\" <<< $PULL_REQUEST_JSON | sed 's/.*": \"\(.*\)\".*/\1/g') COMMIT_SUBJECT=$PULL_REQUEST_TITLE From ba036100443addbf3411d603a84130dca201d394 Mon Sep 17 00:00:00 2001 From: Lucas Combs Date: Sat, 28 Sep 2019 15:41:06 -0400 Subject: [PATCH 11/16] Use cut rather than sed for macOS --- send.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/send.sh b/send.sh index cec54d9..bf1e6c1 100644 --- a/send.sh +++ b/send.sh @@ -58,7 +58,7 @@ if [ "$GITHUB_EVENT_NAME" == "pull_request" ]; then # Call to GitHub API to get PR title PULL_REQUEST_JSON=$(curl -f -s https://api.github.com/repos/$GITHUB_REPOSITORY/pulls/$PR_NUM) - PULL_REQUEST_TITLE=$(egrep \"title\" <<< $PULL_REQUEST_JSON | sed 's/.*": \"\(.*\)\".*/\1/g') + PULL_REQUEST_TITLE=$(egrep \"title\" <<< $PULL_REQUEST_JSON | cut -d\" -f4) COMMIT_SUBJECT=$PULL_REQUEST_TITLE COMMIT_MESSAGE="Pull Request #$PR_NUM" From 88b5a4829279e84163e62cf04f3abe7ebc0f3acb Mon Sep 17 00:00:00 2001 From: Lucas Combs Date: Sat, 28 Sep 2019 16:07:19 -0400 Subject: [PATCH 12/16] Attempting to fix PR info for macOS --- send.sh | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/send.sh b/send.sh index bf1e6c1..b2c5a50 100644 --- a/send.sh +++ b/send.sh @@ -58,7 +58,24 @@ if [ "$GITHUB_EVENT_NAME" == "pull_request" ]; then # Call to GitHub API to get PR title PULL_REQUEST_JSON=$(curl -f -s https://api.github.com/repos/$GITHUB_REPOSITORY/pulls/$PR_NUM) - PULL_REQUEST_TITLE=$(egrep \"title\" <<< $PULL_REQUEST_JSON | cut -d\" -f4) + + echo A $PULL_REQUEST_JSON + which ruby + + # Filter PR JSON to get title + PULL_REQUEST_JSON=$(echo $PULL_REQUEST_JSON | egrep 'title.:') + + echo B $PULL_REQUEST_JSON + + # Left trim title + PULL_REQUEST_TITLE=$(echo $PULL_REQUEST_JSON | sed 's/.*: \"//g') + + echo C $PULL_REQUEST_TITLE + + # Right trim title + PULL_REQUEST_TITLE=$(echo $PULL_REQUEST_TITLE | sed 's/\".*$//g') + + echo D $PULL_REQUEST_TITLE COMMIT_SUBJECT=$PULL_REQUEST_TITLE COMMIT_MESSAGE="Pull Request #$PR_NUM" From fe1f00d9ccd1e0e4da188b3c3c059d518069481e Mon Sep 17 00:00:00 2001 From: Lucas Combs Date: Sat, 28 Sep 2019 18:15:24 -0400 Subject: [PATCH 13/16] Moved github API call to ruby --- get_pull_request_title.rb | 15 +++++++++++++++ send.sh | 21 ++++++--------------- 2 files changed, 21 insertions(+), 15 deletions(-) create mode 100644 get_pull_request_title.rb diff --git a/get_pull_request_title.rb b/get_pull_request_title.rb new file mode 100644 index 0000000..dbc3192 --- /dev/null +++ b/get_pull_request_title.rb @@ -0,0 +1,15 @@ +require 'net/http' +require 'json' + +if ARGV.length != 1 then + puts "Expected only one argument: ENDPOINT_URL" + exit -1 +end + +responce = Net::HTTP.get_response(URI(ARGV[0])) +if responce.code == "200" + puts JSON.parse(responce.body)["title"] +else + puts "Had an issue calling endpoint..." + exit -1 +end diff --git a/send.sh b/send.sh index b2c5a50..d6ed2da 100644 --- a/send.sh +++ b/send.sh @@ -57,24 +57,15 @@ if [ "$GITHUB_EVENT_NAME" == "pull_request" ]; then BRANCH_NAME="#${PR_NUM}" # Call to GitHub API to get PR title - PULL_REQUEST_JSON=$(curl -f -s https://api.github.com/repos/$GITHUB_REPOSITORY/pulls/$PR_NUM) + PULL_REQUEST_ENDPOINT="https://api.github.com/repos/$GITHUB_REPOSITORY/pulls/$PR_NUM" - echo A $PULL_REQUEST_JSON - which ruby - - # Filter PR JSON to get title - PULL_REQUEST_JSON=$(echo $PULL_REQUEST_JSON | egrep 'title.:') - - echo B $PULL_REQUEST_JSON + WORK_DIR=$(dirname ${BASH_SOURCE[0]}) - # Left trim title - PULL_REQUEST_TITLE=$(echo $PULL_REQUEST_JSON | sed 's/.*: \"//g') - - echo C $PULL_REQUEST_TITLE - - # Right trim title - PULL_REQUEST_TITLE=$(echo $PULL_REQUEST_TITLE | sed 's/\".*$//g') + echo Checking for ruby.... + which ruby + PULL_REQUEST_TITLE=$(ruby $WORK_DIR/get_pull_request_title.rb $PULL_REQUEST_ENDPOINT) + echo ${BASH_SOURCE[0]} echo D $PULL_REQUEST_TITLE COMMIT_SUBJECT=$PULL_REQUEST_TITLE From ebd67828ac02bd6d66e489a9f1029d9677542ec4 Mon Sep 17 00:00:00 2001 From: Lucas Combs Date: Sat, 28 Sep 2019 19:07:42 -0400 Subject: [PATCH 14/16] Updated README for new requirements --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5f2ddd5..be9942d 100644 --- a/README.md +++ b/README.md @@ -2,15 +2,16 @@ ## Setup 1. In Github secrets, add a `WEBHOOK_URL` variable with the Discord web hook URL 1. In your Github actions yml file, add this to reference the variable you just created: - - To see a real example, visit [here](https://github.com/unthreaded/git-hooks/blob/80e914105c0a9d94282f8f1b0a1b39ea8d59dc33/.github/workflows/build.yml#L36). + - To see a real example, visit [here](https://github.com/unthreaded/git-hooks/blob/92ea6bde348431fbe25d05c33398c969eec5d3ee/.github/workflows/build.yml#L48). ```yaml + - uses: actions/setup-ruby@v1 - name: Send Webhook Notification if: always() env: JOB_STATUS: ${{ job.status }} WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }} - HOOK_OS_NAME: ${{ runner.os }} - WORKFLOW_NAME: ${{ github.workflow }} + HOOK_OS_NAME: ${{ runner.os }} + WORKFLOW_NAME: ${{ github.workflow }} run: | wget https://raw.githubusercontent.com/DiscordHooks/github-actions-discord-webhook/master/send.sh chmod +x send.sh From 01af3a3dad065d63d9c2de20727299a6ac2c1f6e Mon Sep 17 00:00:00 2001 From: Lucas Combs Date: Sat, 28 Sep 2019 22:21:29 -0400 Subject: [PATCH 15/16] Remove debug printing --- send.sh | 6 ------ 1 file changed, 6 deletions(-) diff --git a/send.sh b/send.sh index d6ed2da..28c6d4d 100644 --- a/send.sh +++ b/send.sh @@ -60,14 +60,8 @@ if [ "$GITHUB_EVENT_NAME" == "pull_request" ]; then PULL_REQUEST_ENDPOINT="https://api.github.com/repos/$GITHUB_REPOSITORY/pulls/$PR_NUM" WORK_DIR=$(dirname ${BASH_SOURCE[0]}) - - echo Checking for ruby.... - which ruby PULL_REQUEST_TITLE=$(ruby $WORK_DIR/get_pull_request_title.rb $PULL_REQUEST_ENDPOINT) - echo ${BASH_SOURCE[0]} - echo D $PULL_REQUEST_TITLE - COMMIT_SUBJECT=$PULL_REQUEST_TITLE COMMIT_MESSAGE="Pull Request #$PR_NUM" ACTION_URL="$BRANCH_OR_PR_URL/checks" From cf72ba0ea7fa5228201b0ac616c26a16d50da228 Mon Sep 17 00:00:00 2001 From: Lucas Combs Date: Sat, 28 Sep 2019 22:37:02 -0400 Subject: [PATCH 16/16] Cleanup README --- testing_utils/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing_utils/README.md b/testing_utils/README.md index 1215edc..5df2b44 100644 --- a/testing_utils/README.md +++ b/testing_utils/README.md @@ -2,4 +2,4 @@ Testing this on GitHub Actions can be annoying due to wait times. While you will eventually have to do so, when developing locally, it's nice to have these tool(s). ## Tools - - `setup_local_env.sh` Setup dummy variables and run send.sh! \ No newline at end of file +- [`local_env_run.sh`](local_env_run.sh) Setup dummy variables and run send.sh! \ No newline at end of file