Skip to content

Commit

Permalink
Add limit for bugs per message
Browse files Browse the repository at this point in the history
  • Loading branch information
skyrising committed Nov 14, 2021
1 parent b170701 commit d6574f9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions eigenbot.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,11 @@ async function onMessage (msg) {
return url.split('/')[4]
}))
}
for (const issueKey of new Set(matches)) {
await respondWithIssue(msg, issueKey)
const keys = new Set(matches)
if (!config.maxBugsPerMessage || keys.size <= config.maxBugsPerMessage) {
for (const issueKey of keys) {
await respondWithIssue(msg, issueKey)
}
}
}

Expand Down
1 change: 1 addition & 0 deletions sample-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"Invalid": 9441545, //For Invalid, Duplicate, Incomplete, and Cannot Reproduce resolutions
"Working": 16777215 //For Won't Fix and Works as Intended resolutions
},
"maxBugsPerMessage": , // Number of bug ids allowed per message
"modlog": "", // channel id where to log deletions
"cleanup-streams": {
"twitchApiClientId": "", // Twitch API client id (required to check which streams are live)
Expand Down

0 comments on commit d6574f9

Please sign in to comment.