Skip to content

fix merge tests

fix merge tests #32

---
name: Auto-Assign New Issues to Copilot
# This workflow automatically assigns newly opened issues to the GitHub Copilot account
# It runs whenever a new issue is opened in the repository
on:
issues:
types: [opened]
permissions:
issues: write
jobs:
assign-to-copilot:
runs-on: ubuntu-latest
steps:
- name: Assign issue to copilot
uses: actions/github-script@v7
with:
script: |
const issueNumber = context.issue.number;
const repo = context.repo.repo;
const owner = context.repo.owner;
try {
// Assign the issue to Copilot (note: case sensitive)
await github.rest.issues.addAssignees({
owner,
repo,
issue_number: issueNumber,
assignees: ['Copilot']
});
console.log(
`Successfully assigned issue #${issueNumber} to Copilot`
);
} catch (error) {
console.error(
`Error assigning issue to Copilot: ${error.message}`
);
}