Skip to content

docs: add cloud metadata guide and map it to iam-role-assume + PrivateLink setup #60

docs: add cloud metadata guide and map it to iam-role-assume + PrivateLink setup

docs: add cloud metadata guide and map it to iam-role-assume + PrivateLink setup #60

name: Auto-assign Issues to Copilot
on:
issues:
types: [opened]
permissions:
issues: write
jobs:
assign-issue:
runs-on: ubuntu-latest
steps:
- name: Assign issue to Copilot via REST API
env:
COPILOT_TOKEN: ${{ secrets.COPILOT_ASSIGN_TOKEN }}
REPO: ${{ github.repository }}
ISSUE_NUMBER: ${{ github.event.issue.number }}
BASE_BRANCH: ${{ github.event.repository.default_branch }}
run: |
if [ -z "$COPILOT_TOKEN" ]; then
echo "Missing COPILOT_ASSIGN_TOKEN secret."
exit 1
fi
cat <<JSON | curl -sS -X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $COPILOT_TOKEN" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"https://api.github.com/repos/$REPO/issues/$ISSUE_NUMBER/assignees" \
-d @-
{
"assignees": ["copilot-swe-agent[bot]"],
"agent_assignment": {
"target_repo": "${REPO}",
"base_branch": "${BASE_BRANCH}",
"custom_instructions": "",
"custom_agent": "",
"model": ""
}
}
JSON