Skip to content

Commit 1b0c2e0

Browse files
committed
fix: remove assignees by actually removing them
fixes #107
1 parent d037b60 commit 1b0c2e0

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

dist/index.js

Lines changed: 9 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/issues.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {GitHub} from '@actions/github/lib/utils';
77
interface Issue {
88
number: number;
99
labels: string[];
10+
assignees: string[];
1011
}
1112

1213
interface FetchIssuesArgs {
@@ -47,6 +48,7 @@ export const fetchIssues = async ({octokit, owner, repo, labels, lastActivity, e
4748
return issues.map(issue => ({
4849
number: issue.number,
4950
labels: issue.labels.map(label => (typeof label === 'string' ? label : label.name) || '').filter(label => !!label),
51+
assignees: (issue.assignees ?? []).map(assignee => assignee.login),
5052
}));
5153
};
5254

@@ -66,7 +68,7 @@ export const unassignIssues = async ({octokit, issues, owner, repo, message, lab
6668
await octokit.rest.issues.removeAssignees({
6769
owner,
6870
repo,
69-
assignees: [],
71+
assignees: issue.assignees,
7072
issue_number: issue.number,
7173
});
7274

0 commit comments

Comments
 (0)