-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Description
Currently, the scoring algorithm gives the first word in the title a score of 1, which decreases logarithmically according to the formula 2/(1+n)
The body scores each word the same, but this score is configurable
Use Case
Logarithmic scoring for titles might not be ideal for everyone - especially users who have the action configured such that ties will frequently (intentionally) happen.
I'm not sure if anyone would want logarithmic scoring for the body - but that could be supported pretty easily
Any proposals for alternate methods of scoring would be much appreciated
Proposed Solution
This is where area scoring is done:
aws-issue-triage-manager/src/issue.ts
Lines 44 to 62 in 3df9fb5
| const weightedTitle: (n: number) => number = (n: number) => { | |
| return (2/(1+n)); | |
| } | |
| // For each word in the title, check if it matches any keywords. If it does, add decreasing score based on inverse function to the area keyword is in. | |
| if(this.titleIssueWords) { | |
| this.titleIssueWords.forEach(content => { | |
| potentialAreas = this.scoreArea(content, potentialAreas, titleValue); | |
| ++x; | |
| titleValue = weightedTitle(x); | |
| }); | |
| } | |
| // Add static value to area keyword is in if keyword is found in body | |
| if(this.bodyIssueWords) { | |
| this.bodyIssueWords.forEach(content => { | |
| potentialAreas = this.scoreArea(content, potentialAreas, this.bodyValue); | |
| }); | |
| } |
I can think of a few ways to potentially do this, will comment later
Other Info
No response
Acknowledge
- I may be able to implement this feature request
- This feature might incur a breaking change