Skip to content

Commit ed8fb59

Browse files
committed
actions: fix scope check on mercurial (bug 1965754)
The action task's scopes are tied to the head repo.
1 parent 5143893 commit ed8fb59

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/taskgraph/actions/registry.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -300,13 +300,13 @@ def sanity_check_task_scope(callback, parameters, graph_config):
300300
else:
301301
raise ValueError(f"No action with cb_name {callback}")
302302

303-
raw_url = parameters["base_repository"]
304-
parsed_url = parse(raw_url)
303+
parsed_base_url = parse(parameters["base_repository"])
304+
parsed_head_url = parse(parameters["head_repository"])
305305
action_scope = (
306-
f"assume:{parsed_url.taskcluster_role_prefix}:action:{action.permission}"
306+
f"assume:{parsed_head_url.taskcluster_role_prefix}:action:{action.permission}"
307307
)
308308
pr_action_scope = (
309-
f"assume:{parsed_url.taskcluster_role_prefix}:pr-action:{action.permission}"
309+
f"assume:{parsed_base_url.taskcluster_role_prefix}:pr-action:{action.permission}"
310310
)
311311

312312
# the scope should appear literally; no need for a satisfaction check. The use of

0 commit comments

Comments
 (0)