Does GitHub’s New Pull Request Rule Affect My Astro Blog?
Why this blog’s Cloudflare build needed no changes and how Flutter kept its revert label working.
When I push a new post to main, I can watch the build from GitHub. On December 2, GitHub started blocking pull_request_target by default in affected public repositories. I opened the Quiet Iterations repo to see whether that changed anything about publishing the next post. GitHub’s announcement
A quick check on this blog
I ran one command from the root of the repo.
git grep -n -w pull_request_target -- .github/workflowsIt printed nothing. There are no GitHub Actions workflow files in this repo. A push to main goes straight to Cloudflare Workers Builds, which builds the site and reports the result back to GitHub. That’s the check I’ve been seeing next to my commits. This post can go through the same build as the first three. How I deployed this blog
What a label does in Flutter
Flutter had a more interesting result. A maintainer could put a revert label on a merged pull request, and a bot would open another PR to undo the change. The workflow behind that label used pull_request_target. Flutter’s issue
A regular pull_request build can test a change from a fork with read-only access. The _target version runs in the repository receiving the change and can use its secrets. Flutter’s bot needed permission to open a PR. A preview of a new blog post just needs to build the Markdown. GitHub’s guide to the two events
Flutter split the work. One workflow notices the label. A second checks the PR and opens the revert. A reviewer asked what would happen if someone added the label to a PR that had been merged before the new workflow existed.
On those older PRs, the label could sit there without starting anything. The team added a way for a maintainer to start the revert by hand. If I ever add a label like that to one of my projects, I’ll try it on something I merged last week. A test on a fresh PR would have missed the whole problem. Flutter’s merged change
Keep a little room for curiosity. — Q.