Open beafialho opened 4 months ago
Based on permissions, it looks like this should be working for @beafialho, but perhaps we are encountering an error and pushing to a fork as a fallback here: https://github.com/WordPress/wordpress-playground/blob/a7004a574444ca555394fbb0b3a90eb74d190c52/packages/playground/website/src/github/github-export-form/form.tsx#L933-L942
GitHub permissions are weird. Sometimes you are a repo admin, but the organization restricted what you can do via different types of auth tokens – like the OAuth token we use here. Assuming organization restrictions are the problem here, here's what would help:
Since this issue is a blocker for GitHub automations leaving comments with PR preview links in the Automattic/themes repo (since the pull_request:
trigger won't run for forks), I left this comment and added the other issue to the board:
@mikachan would there be anything wrong with using the pull_request_target: trigger instead of pull_request: in the preview-theme.yml workflow? This would make it work for PRs from forks.
When I create a new PR to add a new theme to the repo, I would expect it to end up on https://github.com/Automattic/themes/, but the PR is opened from a fork of this repo https://github.com/beafialho/themes instead.
More context