Skip to content

Run rosdistro-reviewer in target repository context #43606

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

Merged
merged 1 commit into from
Nov 21, 2024

Conversation

cottsay
Copy link
Member

@cottsay cottsay commented Nov 20, 2024

When using the pull_request event, we can't use write permissions on the target repository, probably because the submitter could change the action as part of their PR.

The pull_request_target event runs the action with the target repository's state instead of the PR's merged state. This will make testing changes to the automation a little more difficult, but also means that the automation no longer requires approval to run for first-time submitters.

Because the checkout operation now fetches the PR target's HEAD, we need to explicitly fetch the PR's HEAD (but not check it out) so that the automation can inspect the git tree to find the changes.

Follow-up to #42309

When using the `pull_request` event, we can't use `write` permissions on
the target repository, probably because the submitter could change the
action as part of their PR.

The `pull_request_target` event runs the action with the target
repository's state instead of the PR's merged state. This will make
testing changes to the automation a little more difficult, but also
means that the automation no longer requires approval to run for
first-time submitters.

Because the checkout operation now fetches the PR target's HEAD, we need
to explicitly fetch the PR's HEAD (but not check it out) so that the
automation can inspect the git tree to find the changes.
@cottsay cottsay self-assigned this Nov 20, 2024
@cottsay cottsay merged commit ca8a9ff into ros:master Nov 21, 2024
4 checks passed
@cottsay cottsay deleted the rosdistro-reviewer-permissions branch November 21, 2024 05:52
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