Skip to content

Commit

Permalink
fix: use base repo name for project in pull requests (#954)
Browse files Browse the repository at this point in the history
The rename of this repository has exposed that we rely on fork names to set `project` in PRs. This causes issues in certain circumstances, eg: if we try to fire an action in a PR where the head repository is not named the same, we end up with [the wrong treeherder routes](https://github.com/mozilla/translations/blob/f9010478a45cd40bf7ad3d0aecdd62dd281ec5d6/.taskcluster.yml#L146), which causes scope issues.
  • Loading branch information
bhearsum authored Dec 6, 2024
1 parent f901047 commit 95dbfd5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .taskcluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ tasks:
project:
$switch:
'tasks_for == "github-push"': '${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 95dbfd5

Please sign in to comment.