ci: keep clownfish command reactions owned

This commit is contained in:
Vincent Koc
2026-04-29 01:34:23 -07:00
parent 9bb1e59447
commit cf6e4d0ed7

View File

@@ -61,6 +61,10 @@ jobs:
commandLine.startsWith("/autoclose ") ||
commandLine === "/clownfish autoclose" ||
commandLine.startsWith("/clownfish autoclose ");
const isClownfishCommand =
isAutocloseCommand ||
commandLine === "/clownfish automerge" ||
commandLine.startsWith("/clownfish automerge ");
if (!issue.pull_request && !isAutocloseCommand) {
core.info("Skipping non-autoclose command reaction because the comment is not on a pull request.");
@@ -89,6 +93,12 @@ jobs:
return;
}
const tokenIsClownfishApp = "${{ steps.clownfish-token.outputs.token != '' }}" === "true";
if (isClownfishCommand && !tokenIsClownfishApp) {
core.info("Skipping Clownfish command reaction because the Clownfish App token is unavailable.");
return;
}
async function react(content) {
try {
await github.rest.reactions.createForIssueComment({