Skip to content

Declaration: [Country Name] #42

Declaration: [Country Name]

Declaration: [Country Name] #42

name: 🤖 Trigger Copilot Migration Agent222
on:
issues:
types: [labeled]
jobs:
initiate_migration:
if: github.event.label.name == 'declaration-keys-migration-request'
runs-on: ubuntu-latest
permissions:
issues: write
contents: write
pull-requests: write
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: 🚀 Assign to Copilot Agent
env:
GH_TOKEN: ${{ secrets.COPILOT_ASSIGNER_TOKEN }}
run: |
# Use the REST API to bypass GraphQL errors
# We use -F to pass the assignee as a JSON array
gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/assignees \
-F "assignees[]=github-copilot"
gh issue comment ${{ github.event.issue.number }} --body "🚀 **Handoff Successful.** The Copilot Agent has been assigned. Please wait 1-2 minutes for the Pull Request."