This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "Bot: Working On Comment" | |
| on: | |
| issue_comment: | |
| types: [created] | |
| workflow_dispatch: | |
| inputs: | |
| dry_run: | |
| description: 'Log the run without making any changes' | |
| required: true | |
| default: "true" | |
| type: string | |
| jobs: | |
| working-command: | |
| if: github.event_name == 'workflow_dispatch' || (github.event_name == 'issue_comment' && contains(github.event.comment.body, '/working')) | |
| runs-on: ubuntu-latest | |
| permissions: | |
| issues: write | |
| contents: read | |
| concurrency: | |
| group: working-command-${{ github.event.issue.number || github.run_id }} | |
| cancel-in-progress: false | |
| steps: | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2 | |
| with: | |
| egress-policy: audit | |
| - name: Checkout repository | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Handle /working command | |
| id: working | |
| uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 | |
| env: | |
| DRY_RUN: ${{ github.event.inputs.dry_run }} | |
| with: | |
| script: | | |
| const handler = require('./.github/scripts/bot-working-on-comment.js') | |
| await handler({github, context}) |