Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: enable comments for pull_request_target event #57

Merged
merged 1 commit into from
Sep 16, 2024
Merged

feat: enable comments for pull_request_target event #57

merged 1 commit into from
Sep 16, 2024

Conversation

adonis0147
Copy link
Contributor

@adonis0147 adonis0147 commented Sep 15, 2022

Currently, the action comments the pull requests only when it is triggered by pull_request event (See L205).

However, according to the article Keeping your GitHub Actions and workflows secure, the workflow has read-only permissions when it is triggered by pull_request event and it may fail and get the following errors.

Commenting on the pull request
{
  "message": "Resource not accessible by integration",
  "documentation_url": "https://docs.github.com/rest/reference/issues#create-an-issue-comment"
}

This pr enables the action to comment the pull requests when it is triggered by pull_request_target which has write permissions and fixes the above the errors.

@josegonzalez
Copy link
Contributor

@luizm bump :)

@luizm luizm merged commit 17bd25a into luizm:master Sep 16, 2024
@luizm
Copy link
Owner

luizm commented Sep 16, 2024

Sorry for two year dalay, could you test if it is working as you expected?

@adonis0147
Copy link
Contributor Author

Sorry for two year dalay, could you test if it is working as you expected?

Hi @luizm , thanks for merging this PR. The modification in our project has been working well for a while.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants