Add GitHub Action to apply @copilot implement comments #19
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: copilot-apply-suggestions | |
| on: | |
| issue_comment: | |
| types: [created] | |
| pull_request_review_comment: | |
| types: [created] | |
| jobs: | |
| apply-suggestion: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| issues: read | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| - name: Run copilot comment handler | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.BOT_TOKEN || github.token }} | |
| GITHUB_EVENT_PATH: ${{ github.event_path }} | |
| GITHUB_REPOSITORY: ${{ github.repository }} | |
| run: | | |
| cd .github/actions/handle-comment | |
| npm ci | |
| node index.js |