Skip to content

Commit 7492e0c

Browse files
authored
Merge pull request #3 from unthreaded/feature/github-actions-support
Mended issue with broken branch URL in hook
2 parents ec9e4fd + 8622a10 commit 7492e0c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

send.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ COMMITTER_NAME="$(git log -1 "$GITHUB_SHA" --pretty="%cN")"
3434
COMMIT_SUBJECT="$(git log -1 "$GITHUB_SHA" --pretty="%s")"
3535
COMMIT_MESSAGE="$(git log -1 "$GITHUB_SHA" --pretty="%b")" | sed -E ':a;N;$!ba;s/\r{0,1}\n/\\n/g'
3636
COMMIT_URL="https://github.com/$GITHUB_REPOSITORY/commit/$GITHUB_SHA"
37-
BRANCH_URL="https://github.com/$GITHUB_REPOSITORY/tree/$BRANCH_NAME"
3837

3938
# If, for example, $GITHUB_REF = refs/heads/feature/example-branch
4039
# Then this sed command returns: feature/example-branch
4140
BRANCH_NAME="$(echo $GITHUB_REF | sed 's/^.*\/.*\///g')"
41+
BRANCH_URL="https://github.com/$GITHUB_REPOSITORY/tree/$BRANCH_NAME"
4242

4343
if [ "$AUTHOR_NAME" == "$COMMITTER_NAME" ]; then
4444
CREDITS="$AUTHOR_NAME authored & committed"

0 commit comments

Comments
 (0)