You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@magpie.apache.org by "potiuk (via GitHub)" <gi...@apache.org> on 2026/09/18 04:45:08 UTC

[PR] fix(preview): do not offer previews to bots [magpie-site]

potiuk opened a new pull request, #194:
URL: https://github.com/apache/magpie-site/pull/194

   The publisher announces itself on every open pull request. On this repository
   that means **every dependabot bump gets an explainer comment** telling it it can
   run `/show-preview` — to a bot that does not read comments, on a PR nobody
   wants a rendered preview of, and it lands on `commits@`.
   
   Announcements are now for humans. A pull request whose author reports as a
   `Bot`, or whose login ends in `[bot]`, is skipped.
   
   ## Arming is deliberately not gated the same way
   
   Commenting `/show-preview` on a bot's PR still publishes it. That is on purpose:
   a CSS or Tailwind dependency bump is exactly the case where seeing the rendered
   result earns its keep. What this suppresses is the **unsolicited offer**, not
   the capability.
   
   ## Detection
   
   `user.type === "Bot"` is the authoritative signal. The `[bot]` login suffix is a
   fallback, because some automation shows up as a `User` — renovate has done so
   depending on how it is installed. Both are cheap and neither has a false
   positive worth worrying about: a human account cannot end in `[bot]`, since
   GitHub reserves the suffix.
   
   ## Verification
   
   113 tests (110 + 3). Removing the guard in a structurally faithful copy of the
   tree makes **exactly one** test fail — the bot-announce one — while "still
   publishes a bot's PR when a maintainer arms it" keeps passing. That is what
   makes the two behaviours independent rather than merely untested.
   
   A first attempt at that check was invalid and worth mentioning: I copied the
   module files flat, but `publishOne` reads `../../vendor/...` and `./overlay/...`
   relative to its own URL, so four unrelated tests failed on missing paths and
   the mutation had not even applied. A mutation test that fails for the wrong
   reason proves nothing.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@magpie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(preview): do not offer previews to bots [magpie-site]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk merged PR #194:
URL: https://github.com/apache/magpie-site/pull/194


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@magpie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(preview): do not offer previews to bots [magpie-site]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #194:
URL: https://github.com/apache/magpie-site/pull/194#issuecomment-5725315328

   ### Preview this pull request
   
   A committer can publish a live preview of this PR by commenting `/show-preview` on its own line. It will appear at https://magpie-pr194.staged.apache.org/ and then track this PR's head commit until it closes.
   
   Staging takes a few minutes to pick up each push.
   
   <!-- magpie-preview-howto -->


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@magpie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org