Skip to content

Commit

Permalink
fix: Handle emails or logins
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Manouvrier committed Jul 17, 2023
1 parent fb1a45b commit 67a2859
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
5 changes: 3 additions & 2 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ async function run(): Promise<void> {
watchers.getOwner(file.filename)
)
const uniqueWatchers = new Set(watchersForChangedFiles)
core.debug(`Filtered watchers: ${JSON.stringify(uniqueWatchers)}`)
core.debug(`Filtered watchers: ${JSON.stringify([...uniqueWatchers])}`)

// Set assignees
const assignees = await octokit.rest.issues.listAssignees({
Expand All @@ -47,7 +47,9 @@ async function run(): Promise<void> {
)

const uniqueAssignees = assignees.data.filter(
assignee => assignee.email != null && uniqueWatchers.has(assignee.email)
assignee =>
(assignee.email != null && uniqueWatchers.has(assignee.email)) ||
uniqueWatchers.has(assignee.login)
)
core.debug(`Filtered assignees: ${JSON.stringify(uniqueAssignees)}`)

Expand Down

0 comments on commit 67a2859

Please sign in to comment.