Skip to content

Implement the File API's open method, base File abstraction and File.stat operation. #32

Implement the File API's open method, base File abstraction and File.stat operation.

Implement the File API's open method, base File abstraction and File.stat operation. #32

name: 'Auto assign maintainer to issue'
on:
issues:
types: [opened]
permissions:
issues: write
jobs:
assign-user:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v6
with:
script: |
const assignees = ['mstoykov', 'imiric', 'codebien', 'olegbespalov', 'oleiade'];
const assigneeCount = 1;
// Do not automatically assign users if someone was already assigned or it was opened by a maintainer
if (context.payload.issue.assignees.length > 0 || assignees.includes(context.payload.issue.user.login)) {
return;
}
github.rest.issues.addAssignees({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
assignees: assignees.sort(() => 0.5 - Math.random()).slice(0, assigneeCount),
});