Skip to content

Add GitHub Action to apply @copilot implement comments #19

Add GitHub Action to apply @copilot implement comments

Add GitHub Action to apply @copilot implement comments #19

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