Skip to content
Snippets Groups Projects
Commit b6db73e6 authored by Geoff Brown's avatar Geoff Brown Committed by Johan Lorenzo
Browse files

Bug 1786777 - Fix level and repoFullName for cron tasks (#8)

parent 4a3fa37b
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,7 @@ tasks:
- $let:
trustDomain: mobile
canonicalRepo: git@github.com:mozilla-mobile/firefox-android.git
canonicalHttpsRepo: https://github.com/mozilla-mobile/firefox-android
# Github events have this stuff in different places...
ownerEmail:
$if: 'tasks_for in ["cron", "action"]'
......@@ -29,9 +30,13 @@ tasks:
$if: 'tasks_for == "github-pull-request"'
then: '${event.pull_request.base.repo.full_name}'
else:
$if: 'tasks_for in ["cron", "action"]'
$if: 'tasks_for == "action"'
# Trim git@github.com:
then: '${repository.url[15:-4]}'
else:
$if: 'tasks_for == "cron"'
# Trim https://github.com/
then: '${repository.url[19:]}'
baseRepoUrl:
$if: 'tasks_for == "github-push"'
......@@ -123,7 +128,9 @@ tasks:
then:
$let:
level:
$if: 'tasks_for in ["github-push", "action", "cron"] && repoUrl == canonicalRepo'
$if: >
(tasks_for in ["github-push", "action"] && repoUrl == canonicalRepo)
|| (tasks_for in ["cron"] && repoUrl == canonicalHttpsRepo)
then: '3'
else: '1'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment