Add early 👀 ack reaction for /stageblog

listFiles pagination + workflow dispatch can take a few seconds. Without
an early ack, the commenter gets no feedback until the outcome reaction
lands. 👀 confirms the command was recognized and authorized while the
heavier work runs.
This commit is contained in:
Den Delimarsky 2026-03-11 20:39:44 +00:00
commit df23d396f5
No known key found for this signature in database

View file

@ -250,6 +250,10 @@ module.exports = async ({ github, context, core }) => {
// cancel is meaningless here — just ignore silently
if (cancel) return setResult('noop', actor);
// Ack early — listFiles pagination + workflow dispatch can take a few
// seconds and the commenter otherwise gets no feedback until then.
await react(commentId, 'eyes');
// Gate: PR must touch blog paths
const blogRegexes = process.env.STAGEBLOG_PATHS
.split(',').map(s => s.trim()).filter(Boolean).map(patternToRegex);