Files
openclaw/.github/workflows/mantis-clear-reaction.yml
Peter Steinberger ff10db092b ci(mantis): extract shared request-resolution, ref-trust, and reaction workflows (#121339)
* ci(mantis): extract shared request, trust, and reaction workflows

* ci(mantis): drop caller-less params from shared resolve workflow

* test(mantis): read candidate-override parsing from shared resolve workflow
2026-08-09 22:04:27 -07:00

57 lines
1.8 KiB
YAML

name: Mantis Clear Reaction
on:
workflow_call:
inputs:
comment-id:
description: Issue comment id that owns the Mantis reaction
required: true
type: string
reaction-id:
description: Exact Mantis eyes reaction id to remove
required: true
type: string
secrets:
MANTIS_GITHUB_APP_ID:
required: true
MANTIS_GITHUB_APP_PRIVATE_KEY:
required: true
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
jobs:
clear:
name: Clear Mantis command reaction
runs-on: ubuntu-24.04
permissions: {}
steps:
- name: Create Mantis cleanup GitHub App token
id: mantis_reaction_token
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3
with:
app-id: ${{ secrets.MANTIS_GITHUB_APP_ID }}
private-key: ${{ secrets.MANTIS_GITHUB_APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
repositories: ${{ github.event.repository.name }}
permission-issues: write
- name: Remove Mantis eyes reaction
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
env:
COMMENT_ID: ${{ inputs.comment-id }}
REACTION_ID: ${{ inputs.reaction-id }}
with:
github-token: ${{ steps.mantis_reaction_token.outputs.token }}
script: |
const { owner, repo } = context.repo;
const commentId = Number(process.env.COMMENT_ID);
const reactionId = Number(process.env.REACTION_ID);
await github.rest.reactions.deleteForIssueComment({
owner,
repo,
comment_id: commentId,
reaction_id: reactionId,
});
core.info(`Removed Mantis eyes reaction ${reactionId}.`);