Skip to content
This repository was archived by the owner on Nov 1, 2022. It is now read-only.

Commit 4b28913

Browse files
ahalmergify[bot]
authored andcommitted
Strip 'refs/heads/' out of 'base_ref' parameter in .taskcluster.yml
(cherry picked from commit 784db87)
1 parent e7e4668 commit 4b28913

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

.taskcluster.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,16 @@ tasks:
7070
#
7171
# [1] https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#push
7272
$if: 'tasks_for == "github-push" && event.base_ref'
73-
then: ${event.base_ref}
73+
then:
74+
$if: 'event.base_ref[:11] == "refs/heads/"'
75+
then: {$eval: 'event.base_ref[11:]'}
76+
else: ${event.base_ref}
7477
else:
7578
$if: 'tasks_for == "github-push"'
76-
then: ${event.ref}
79+
then:
80+
$if: 'event.ref[:11] == "refs/heads/"'
81+
then: {$eval: 'event.ref[11:]'}
82+
else: ${event.ref}
7783
else:
7884
$if: 'tasks_for in ["cron", "action"]'
7985
then: '${push.branch}'

0 commit comments

Comments
 (0)