Skip to content

Automatic commenting on a PR #26002

Answered by weide-zhou
sayakpaul asked this question in Actions
Discussion options

You must be logged in to vote

Hi @sayakpaul,

For event ‘pull_request_target’,

Which means actions/checkout will get codes from base branch by default, not the fake merge branch or PR compare branch.

If your code exists in PR compare branch, you need to specify the repo(and may be with ref), such as:

- name: Checkout tools repo
  uses: actions/checkout@v2
  with:
    repository: weide-zhou/ticket24
    ref: dev

And i also tried the workflow same as you, it works fine on my side.

My workflow is here. Please set the event ‘pull_request_target’ on your base repo and base branch, not the PR compare branch.

Thanks

Replies: 15 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

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