change how hookname greps the branch

This commit is contained in:
Bella 2020-03-10 11:17:32 -04:00
parent c9e3bc67bd
commit 3f25cafc40
No known key found for this signature in database
GPG Key ID: 03B01AC937D1C89C
1 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
#!/bin/bash
BRANCH="$(git branch | grep "*")"
BRANCH="${BRANCH:2}"
BRANCH="$(git branch | grep '^\*')"
BRANCH="${BRANCH#??}"
curl -H "Content-Type: application/json" -X POST -d '{"username": "Github Actions", "content": "**Branch:** `'$BRANCH'`"}' "$WEBHOOK"