Skip to content

finding PRs from forks #326

@bryangingechen

Description

@bryangingechen

Currently for pull_request / pull_request_target workflows running on PRs coming from a fork, the suggestion of adding sha: ${{ github.event.pull_request.head.sha }} to the config doesn't work, since the workflow searches for the SHA in the commits of the base repository with https://api.github.com/repos/<base.repo.full_name>/commits/<head.sha>.

However, the commit only lives in the forked repository. Maybe a quick way to fix this would be to include a config option which allows users to specify the repo to search, then we could input somethiing like github.event.pull_request.head.repo.full_name and the API call could use that instead. (Happy to make a PR at some point if this sounds reasonable.)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions