mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-12 21:53:00 -06:00
ff10db092b
* 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
57 lines
1.8 KiB
YAML
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}.`);
|