Skip to content

Commit

Permalink
use event path
Browse files Browse the repository at this point in the history
Signed-off-by: Jorgen Lundman <[email protected]>
  • Loading branch information
lundman committed Dec 20, 2024
1 parent 1631639 commit 5d42415
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/notify-irc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@
echo "Dumping ENV"
env

COMMITS_JSON="${1:-""}"
ACTOR="${2:-unknown}"
BRANCH="${3:-unknown}"
COMPARE_URL="${4:-unknown}"
EVENT_PATH="${GITHUB_EVENT_PATH}"

# Read the commits data from the GITHUB_EVENT_PATH JSON file
COMMITS_JSON=$(jq -r '.commits' "$EVENT_PATH")
ACTOR="${GITHUB_ACTOR:-unknown}"
BRANCH="${GITHUB_REF_NAME:-unknown}"
COMPARE_URL="${GITHUB_COMPARE_URL:-unknown}"

commit_count=$(echo "$COMMITS_JSON" | jq 'length')
commit_count=${commit_count:-0}
Expand Down

0 comments on commit 5d42415

Please sign in to comment.