Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 1641282 - support action tasks on github pull requests #426

Merged
merged 1 commit into from
Feb 12, 2024

Conversation

jcristau
Copy link
Contributor

@jcristau jcristau commented Feb 6, 2024

No description provided.

@jcristau jcristau force-pushed the action-pr branch 2 times, most recently from 59efc37 to 85b4d52 Compare February 7, 2024 09:09
@jcristau jcristau changed the title look at base repository for actions Bug 1641282 - support action tasks on github pull requests Feb 7, 2024
@jcristau jcristau force-pushed the action-pr branch 8 times, most recently from 42aa4cc to fdf0bab Compare February 8, 2024 09:21
@jcristau
Copy link
Contributor Author

jcristau commented Feb 8, 2024

This depends on #447.

@jcristau jcristau marked this pull request as ready for review February 8, 2024 09:27
@jcristau jcristau requested review from a team and gbrownmozilla February 8, 2024 09:27

# the scope should appear literally; no need for a satisfaction check. The use of
# get_current_scopes here calls the auth service through the Taskcluster Proxy, giving
# the precise scopes available to this task.
if expected_scope not in taskcluster.get_current_scopes():
raise ValueError(f"Expected task scope {expected_scope} for this action")
if not set((action_scope, pr_action_scope)) & set(taskcluster.get_current_scopes()):
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way to know here which scope to expect?

@jcristau jcristau requested a review from ahal February 8, 2024 10:09
@jcristau jcristau force-pushed the action-pr branch 2 times, most recently from a519199 to 34362ec Compare February 9, 2024 14:27
Copy link
Collaborator

@ahal ahal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, lgtm!

- use "pr-action" instead of "action" hook and scope when registering an
  action from a pull-request graph
- pass the base repo url and branch in the action payload: the base repo
  is what the scope should be based on, and the base repo+branch need to
  be passed back to action tasks so they can check out the right thing
@jcristau jcristau merged commit 63dbbed into taskcluster:main Feb 12, 2024
9 of 11 checks passed
@jcristau jcristau deleted the action-pr branch February 12, 2024 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants