platisd / duplicate-code-detection-tool

A simple Python3 tool to detect similarities between files within a repository
MIT License
162 stars 30 forks source link

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

Open platisd opened 3 years ago

platisd commented 3 years ago

What the title says, let's fix it

idzm commented 1 year ago

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

platisd commented 1 year ago

: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:

idzm commented 11 months ago

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"}
platisd commented 11 months ago

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

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

shinyano commented 4 months ago

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

permissions:
  contents: read
  pull-requests: write