Skip to content

Commit

Permalink
Fix ref parsing in githubWebhook (#14)
Browse files Browse the repository at this point in the history
Make `githubWebhook` parse refs properly when they contain more than two
slashes.

Closes: #13
  • Loading branch information
pnmadelaine authored Feb 11, 2024
1 parent 6fae2e5 commit 6b9300b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nix/lib/github/githubWebhook.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ utils: lib: {
echo null | jq --argjson body "$body" '[]
| if $body.created or $body.deleted then . + [{"command":"UpdateJobsets"}] else . end
| if $body.deleted | not then . + [{"command":"EvaluateJobset","name":$body.ref|split("/")|.[2]}] else . end
| if $body.deleted | not then . + [{"command":"EvaluateJobset","name":$body.ref|split("/")|.[2:]|join("/")}] else . end
| .'
'';
};
Expand Down

0 comments on commit 6b9300b

Please sign in to comment.