duplicate-code-detection-tool icon indicating copy to clipboard operation
duplicate-code-detection-tool copied to clipboard

The Action doesn't work with pull requests from forked repos

Open platisd opened this issue 4 years ago • 5 comments

What the title says, let's fix it

platisd avatar Apr 11 '21 07:04 platisd

You should use the pull_request_target event instead of the pull_request. Detailed explanation is here.

idzm avatar Nov 01 '22 10:11 idzm

:thinking: If I remember right, there was something code-wise that was the culprit, not necessarily the permissions. Perhaps I should have written a more descriptive analysis of the bug. :sweat_smile:

platisd avatar Nov 13 '22 21:11 platisd

Problem is with writing results:

Posting results to GitHub failed with code: 403
{"message":"Resource not accessible by integration","documentation_url":"https://docs.github.com/rest/issues/comments#create-an-issue-comment"}

idzm avatar Sep 25 '23 08:09 idzm

@idzm do you want to take a look at it? :}

The issue is up for grabs but relatively low in my priority list.

platisd avatar Sep 25 '23 09:09 platisd

I faced same problem, and fixed it by adding following lines in my action script:

permissions:
  contents: read
  pull-requests: write

shinyano avatar May 13 '24 08:05 shinyano