
























@@ -18,26 +18,11 @@ jobs:
1818issues: write
1919pull-requests: write
2020env:
21-CLOWNFISH_APP_ID: ${{ vars.CLOWNFISH_APP_ID || secrets.CLOWNFISH_APP_ID }}
22-CLOWNFISH_APP_AUTH_ENABLED: ${{ secrets.CLOWNFISH_APP_PRIVATE_KEY != '' && (vars.CLOWNFISH_APP_ID != '' || secrets.CLOWNFISH_APP_ID != '') && '1' || '0' }}
23-MAINTAINER_COMMAND_REACTIONS: ${{ vars.MAINTAINER_COMMAND_REACTIONS || '/autoclose,/clownfish autoclose,/clownfish automerge,/merge,/land,/landpr' }}
21+MAINTAINER_COMMAND_REACTIONS: ${{ vars.MAINTAINER_COMMAND_REACTIONS || '/autoclose,/clawsweeper autoclose,/clawsweeper automerge,/merge,/land,/landpr' }}
2422steps:
25- - name: Create Clownfish reaction token
26-id: clownfish-token
27-if: ${{ env.CLOWNFISH_APP_AUTH_ENABLED == '1' }}
28-continue-on-error: true
29-uses: actions/create-github-app-token@v3
30-with:
31-app-id: ${{ env.CLOWNFISH_APP_ID }}
32-private-key: ${{ secrets.CLOWNFISH_APP_PRIVATE_KEY }}
33-owner: openclaw
34-repositories: openclaw
35-permission-issues: write
36-3723 - name: React to maintainer slash command
3824uses: actions/github-script@v9
3925with:
40-github-token: ${{ steps.clownfish-token.outputs.token || github.token }}
4126script: |
4227 const comment = context.payload.comment;
4328 const issue = context.payload.issue;
@@ -59,13 +44,8 @@ jobs:
5944 const isAutocloseCommand =
6045 commandLine === "/autoclose" ||
6146 commandLine.startsWith("/autoclose ") ||
62- commandLine === "/clownfish autoclose" ||
63- commandLine.startsWith("/clownfish autoclose ");
64- const isClownfishCommand =
65- isAutocloseCommand ||
66- commandLine === "/clownfish automerge" ||
67- commandLine.startsWith("/clownfish automerge ");
68-47+ commandLine === "/clawsweeper autoclose" ||
48+ commandLine.startsWith("/clawsweeper autoclose ");
6949 if (!issue.pull_request && !isAutocloseCommand) {
7050 core.info("Skipping non-autoclose command reaction because the comment is not on a pull request.");
7151 return;
@@ -93,12 +73,6 @@ jobs:
9373 return;
9474 }
957596- const tokenIsClownfishApp = "${{ steps.clownfish-token.outputs.token != '' }}" === "true";
97- if (isClownfishCommand && !tokenIsClownfishApp) {
98- core.info("Skipping Clownfish command reaction because the Clownfish App token is unavailable.");
99- return;
100- }
101-10276 async function react(content) {
10377 try {
10478 await github.rest.reactions.createForIssueComment({
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。