Skip to content

Commit

Permalink
clean up comments
Browse files Browse the repository at this point in the history
  • Loading branch information
wschurman committed Oct 21, 2024
1 parent a6e2491 commit e8c5a8a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,17 @@ export default class Runner {
this.filesChangedReader.read(repo, pullRequest.number)
])

// filter out the PR author so that they don't get double-notified
const matchingRules = configuration.rules
// filter to rules that match
.filter(rule => micromatch(filesChanged, rule.patterns).length > 0)
// filter out the PR author from mentions so that they don't get double-notified
.map((rule: MentionRule) => ({
...rule,
mentions: rule.mentions.filter(
mention => mention !== pullRequest.user.login
)
}))
// filter out the rules that no longer have mentions due to author filtering
.filter(rule => rule.mentions.length > 0)

await this.commentUpserter.upsert(
Expand Down

0 comments on commit e8c5a8a

Please sign in to comment.