Skip to content

Commit

Permalink
chore: renamed type to targets
Browse files Browse the repository at this point in the history
  • Loading branch information
gentlementlegen committed Jun 10, 2024
1 parent 5dfbef8 commit 7867782
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 22 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,34 +84,34 @@ with:
td: 1
hr: 0
multipliers:
- type: [ ISSUE, ISSUER, SPECIFICATION ]
- targets: [ ISSUE, ISSUER, SPECIFICATION ]
formattingMultiplier: 1
wordValue: 0.1
- type: [ ISSUE, ISSUER, COMMENTED ]
- targets: [ ISSUE, ISSUER, COMMENTED ]
formattingMultiplier: 1
wordValue: 0.2
- type: [ ISSUE, ASSIGNEE, COMMENTED ]
- targets: [ ISSUE, ASSIGNEE, COMMENTED ]
formattingMultiplier: 0
wordValue: 0
- type: [ ISSUE, COLLABORATOR, COMMENTED ]
- targets: [ ISSUE, COLLABORATOR, COMMENTED ]
formattingMultiplier: 1
wordValue: 0.1
- type: [ ISSUE, CONTRIBUTOR, COMMENTED ]
- targets: [ ISSUE, CONTRIBUTOR, COMMENTED ]
formattingMultiplier: 0.25
wordValue: 0.1
- type: [ REVIEW, ISSUER, TASK ]
- targets: [ REVIEW, ISSUER, TASK ]
formattingMultiplier: 0
wordValue: 0
- type: [ REVIEW, ISSUER, COMMENTED ]
- targets: [ REVIEW, ISSUER, COMMENTED ]
formattingMultiplier: 2
wordValue: 0.2
- type: [ REVIEW, ASSIGNEE, COMMENTED ]
- targets: [ REVIEW, ASSIGNEE, COMMENTED ]
formattingMultiplier: 1
wordValue: 0.1
- type: [ REVIEW, COLLABORATOR, COMMENTED ]
- targets: [ REVIEW, COLLABORATOR, COMMENTED ]
formattingMultiplier: 1
wordValue: 0.1
- type: [ REVIEW, CONTRIBUTOR, COMMENTED ]
- targets: [ REVIEW, CONTRIBUTOR, COMMENTED ]
formattingMultiplier: 0.25
wordValue: 0.1
permitGeneration:
Expand Down
22 changes: 11 additions & 11 deletions src/configuration/formatting-evaluator-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,59 +13,59 @@ export const formattingEvaluatorConfigurationType = Type.Object({
*/
multipliers: Type.Array(
Type.Object({
type: Type.Array(type),
targets: Type.Array(type),
formattingMultiplier: Type.Number(),
wordValue: Type.Number(),
}),
{
default: [
{
type: ["ISSUE", "ISSUER", "SPECIFICATION"],
targets: ["ISSUE", "ISSUER", "SPECIFICATION"],
formattingMultiplier: 1,
wordValue: 0.1,
},
{
type: ["ISSUE", "ISSUER", "COMMENTED"],
targets: ["ISSUE", "ISSUER", "COMMENTED"],
formattingMultiplier: 1,
wordValue: 0.2,
},
{
type: ["ISSUE", "ASSIGNEE", "COMMENTED"],
targets: ["ISSUE", "ASSIGNEE", "COMMENTED"],
formattingMultiplier: 0,
wordValue: 0,
},
{
type: ["ISSUE", "COLLABORATOR", "COMMENTED"],
targets: ["ISSUE", "COLLABORATOR", "COMMENTED"],
formattingMultiplier: 1,
wordValue: 0.1,
},
{
type: ["ISSUE", "CONTRIBUTOR", "COMMENTED"],
targets: ["ISSUE", "CONTRIBUTOR", "COMMENTED"],
formattingMultiplier: 0.25,
wordValue: 0.1,
},
{
type: ["REVIEW", "ISSUER", "TASK"],
targets: ["REVIEW", "ISSUER", "TASK"],
formattingMultiplier: 0,
wordValue: 0,
},
{
type: ["REVIEW", "ISSUER", "COMMENTED"],
targets: ["REVIEW", "ISSUER", "COMMENTED"],
formattingMultiplier: 2,
wordValue: 0.2,
},
{
type: ["REVIEW", "ASSIGNEE", "COMMENTED"],
targets: ["REVIEW", "ASSIGNEE", "COMMENTED"],
formattingMultiplier: 1,
wordValue: 0.1,
},
{
type: ["REVIEW", "COLLABORATOR", "COMMENTED"],
targets: ["REVIEW", "COLLABORATOR", "COMMENTED"],
formattingMultiplier: 1,
wordValue: 0.1,
},
{
type: ["REVIEW", "CONTRIBUTOR", "COMMENTED"],
targets: ["REVIEW", "CONTRIBUTOR", "COMMENTED"],
formattingMultiplier: 0.25,
wordValue: 0.1,
},
Expand Down
2 changes: 1 addition & 1 deletion src/parser/formatting-evaluator-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export class FormattingEvaluatorModule implements Module {
this._multipliers = this._configuration.multipliers.reduce((acc, curr) => {
return {
...acc,
[curr.type.reduce((a, b) => CommentType[b] | a, 0)]: {
[curr.targets.reduce((a, b) => CommentType[b] | a, 0)]: {
wordValue: curr.wordValue,
formattingMultiplier: curr.formattingMultiplier,
},
Expand Down

0 comments on commit 7867782

Please sign in to comment.