@@ -13,37 +13,29 @@ jobs:
|
13 | 13 | dispatch: |
14 | 14 | runs-on: ubuntu-latest |
15 | 15 | env: |
16 | | -CLAWSWEEPER_APP_ID: ${{ secrets.CLAWSWEEPER_APP_ID }} |
17 | | -CLAWSWEEPER_APP_PRIVATE_KEY: ${{ secrets.CLAWSWEEPER_APP_PRIVATE_KEY }} |
| 16 | +HAS_CLAWSWEEPER_APP_PRIVATE_KEY: ${{ secrets.CLAWSWEEPER_APP_PRIVATE_KEY != '' }} |
18 | 17 | steps: |
19 | | - - name: Check ClawSweeper app credentials |
20 | | -id: clawsweeper-credentials |
21 | | -run: | |
22 | | - if [ -n "$CLAWSWEEPER_APP_ID" ] && [ -n "$CLAWSWEEPER_APP_PRIVATE_KEY" ]; then |
23 | | - echo "configured=true" >> "$GITHUB_OUTPUT" |
24 | | - else |
25 | | - echo "configured=false" >> "$GITHUB_OUTPUT" |
26 | | - echo "ClawSweeper app credentials are not configured; skipping dispatch." |
27 | | - fi |
28 | | - |
29 | 18 | - name: Create ClawSweeper dispatch token |
30 | | -if: steps.clawsweeper-credentials.outputs.configured == 'true' |
31 | 19 | id: token |
| 20 | +if: ${{ env.HAS_CLAWSWEEPER_APP_PRIVATE_KEY == 'true' }} |
32 | 21 | uses: actions/create-github-app-token@v2 |
33 | 22 | with: |
34 | | -app-id: ${{ env.CLAWSWEEPER_APP_ID }} |
35 | | -private-key: ${{ env.CLAWSWEEPER_APP_PRIVATE_KEY }} |
| 23 | +app-id: 3306130 |
| 24 | +private-key: ${{ secrets.CLAWSWEEPER_APP_PRIVATE_KEY }} |
36 | 25 | owner: openclaw |
37 | 26 | repositories: clawsweeper |
38 | 27 | |
39 | 28 | - name: Dispatch exact ClawSweeper review |
40 | | -if: steps.clawsweeper-credentials.outputs.configured == 'true' |
41 | 29 | env: |
42 | | -GH_TOKEN: ${{ steps.token.outputs.token }} |
| 30 | +GH_TOKEN: ${{ steps.token.outputs.token || secrets.OPENCLAW_GH_TOKEN }} |
43 | 31 | TARGET_REPO: ${{ github.repository }} |
44 | 32 | ITEM_NUMBER: ${{ github.event.issue.number || github.event.pull_request.number }} |
45 | 33 | ITEM_KIND: ${{ github.event_name == 'pull_request_target' && 'pull_request' || 'issue' }} |
46 | 34 | run: | |
| 35 | + if [ -z "$GH_TOKEN" ]; then |
| 36 | + echo "::notice::Skipping ClawSweeper dispatch because no dispatch credential is configured." |
| 37 | + exit 0 |
| 38 | + fi |
47 | 39 | payload="$(jq -nc \ |
48 | 40 | --arg target_repo "$TARGET_REPO" \ |
49 | 41 | --argjson item_number "$ITEM_NUMBER" \ |
|