fix merge tests #32
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: 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}` | |
); | |
} |