Skip to content

Distinguishing between PRs #27205

Discussion options

You must be logged in to vote

This is the condition that distinguishes between those two PRs:

- if: github.repository_owner != github.actor

When a PR is triggered from currentRepo/feature/branch to upstream/master, the github.actor returns currentRepo owner, since that’s the person that initiated the workflow run and repo_owner returns the owner of the upstream.

In the other case of PR, currentRepo/feature/branch to currentRepo/master or upstream/feature/branch to upstream/branch, in both case owner and actor are the same.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
1 participant