-
The default GitHub Actions environment variables have $GITHUB_HEAD_REF and $GITHUB_BASE_REF for working with pull requests. They also have $GITHUB_REPOSITORY which resolves to the base repository name in pull-requests. However, there does not seem to be any way to get the name of the head repository in PRs (eg. a $GITHUB_HEAD_REPOSITORY). At the moment we are resolving this by running the following bash command:
But it seems kind of hacky! Am I missing something here? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
${{github.event.pull_request.head.repo.full_name}} https://developer.github.com/v3/activity/events/types/#pullrequestevent |
Beta Was this translation helpful? Give feedback.
-
Amazing, thank you! I had not cottoned on to the fact that github.event accessed the whole API like that. So many possibilities! |
Beta Was this translation helpful? Give feedback.
${{github.event.pull_request.head.repo.full_name}}
https://developer.github.com/v3/activity/events/types/#pullrequestevent