From d93974d9232fc8f79df1d19be2c162b7f2fb9676 Mon Sep 17 00:00:00 2001 From: Nedyalko Andreev Date: Fri, 28 Apr 2023 16:19:33 +0300 Subject: [PATCH] Auto-assign maintainers only to non-assigned external issues --- .github/workflows/issue-auto-assign.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/issue-auto-assign.yml b/.github/workflows/issue-auto-assign.yml index e15dbc263e8..dcc660da416 100644 --- a/.github/workflows/issue-auto-assign.yml +++ b/.github/workflows/issue-auto-assign.yml @@ -16,6 +16,11 @@ jobs: 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.contains(context.payload.issue.user.login)) { + return; + } + github.rest.issues.addAssignees({ owner: context.repo.owner, repo: context.repo.repo,