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

Github workflow: PHP backport changes action doesn't work in case of forked repository #59441

Closed
t-hamano opened this issue Feb 28, 2024 · 2 comments
Labels
GitHub Actions Pull requests that update GitHub Actions code [Type] Bug An existing feature does not function as intended

Comments

@t-hamano
Copy link
Contributor

Description

My understanding is that if a PR contains a file contained in a particular directory, or a PHP file, GitHub Actions will be triggered and a comment will be added to prompt a backport to core. However, this GitHub Actions doesn't seem to work correctly when the PR is sent from a forked repository.

Below is examples:

It seems that creating comments is failing.

Another strange thing is that there was a PR where this GitHub Action was executed even though no changes were made to the PHP file:

https://github.com/WordPress/gutenberg/actions/runs/8057484383

Step-by-step reproduction instructions

N/A

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@t-hamano t-hamano added [Type] Bug An existing feature does not function as intended GitHub Actions Pull requests that update GitHub Actions code labels Feb 28, 2024
@t-hamano
Copy link
Contributor Author

Update: This GitHub workflow is realized by peter-evans/create-or-update-comment. If I look at the README, it mentions the following, so this may be related.

Note: In public repositories this action does not work in pull_request workflows when triggered by forks. Any attempt will be met with the error, Resource not accessible by integration. This is due to token restrictions put in place by GitHub Actions. Private repositories can be configured to enable workflows from forks to run without restriction. See here for further explanation. Alternatively, use the pull_request_target event to comment on pull requests.

@t-hamano
Copy link
Contributor Author

This workflow has been removed as of #62609 and should no longer cause the issue.

@t-hamano t-hamano closed this as not planned Won't fix, can't repro, duplicate, stale Jul 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GitHub Actions Pull requests that update GitHub Actions code [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant