Skip to content

[BUG] Test issue

[BUG] Test issue #1

Workflow file for this run

name: Apply 'untriaged' label during issue lifecycle
on:
issues:
types: [opened, reopened, transferred]
jobs:
apply-label:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v6
with:
script: |
const codeowners = await github.repos.listCodeowners({
owner: context.repo.owner,
repo: context.repo.repo
});
console.log(codeowners)
const issueAuthor = context.payload.issue.user.login;
const isCodeowner = codeowners.data.some(codeowner => codeowner.login === issueAuthor);
console.log(isCodeOwner)
if (!isCodeowner) {
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['untriaged']
});
}