Skip to content

Commit

Permalink
fix: use base repo for project name in github .taskcluster.yml templa…
Browse files Browse the repository at this point in the history
…te (#610)

* fix: use base repo for project name in github .taskcluster.yml template

project name is mainly used in routes, which require specific scopes to be set. Because of this, we should always use the `base` version of this. In cases where the `head` repository has a different name this ends up breaking things like actions in PRs.

* fix: update project to use base repo name in PRs in this repo
  • Loading branch information
bhearsum authored Dec 6, 2024
1 parent 59d4e38 commit 33803c5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .taskcluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ tasks:
project:
$switch:
'tasks_for in ["github-push", "github-release"]': '${event.repository.name}'
'tasks_for[:19] == "github-pull-request"': '${event.pull_request.head.repo.name}'
'tasks_for[:19] == "github-pull-request"': '${event.pull_request.base.repo.name}'
'tasks_for in ["cron", "action", "pr-action"]': '${repository.project}'
head_branch:
$switch:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ tasks:
project:
$switch:
'tasks_for in ["github-push", "github-release"]': '${event.repository.name}'
'tasks_for[:19] == "github-pull-request"': '${event.pull_request.head.repo.name}'
'tasks_for[:19] == "github-pull-request"': '${event.pull_request.base.repo.name}'
'tasks_for in ["cron", "action", "pr-action"]': '${repository.project}'
head_branch:
$switch:
Expand Down

0 comments on commit 33803c5

Please sign in to comment.