-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.js
65 lines (63 loc) · 2.47 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
const aggregator = require('../lib/score-aggregator')
const config = {}
/**
* Default config for scoreManager
*
* similar-title: compare titles if file and tasks
* context-file-timestamp-tasks-timestamp: compares timestamps of file and tasks - timeLimit = 600s (default in plugin)
* context-file-timestamp-tasks-timestamp: compares keywords of file title with keywords of description of tasks
* context-file-description-task-title: compares keywords of file description with keywords of description of tasks
* context-file-description-task-description: compares keywords of file description with keywords of description of tasks
*/
config.scoreManager = {
aggregator: new aggregator.Mean(),
plugins: {
// similar-title-plugin pulls file.name from file and tasks[].name from tasks[] itself
'similar-file-title-task-title': {
use: 'similar-context-plugin',
inputs: ['file.name', 'tasks[].name']
},
// timestamp comparison defaults to 600 sec
'context-file-timestamp-tasks-timestamp': {
use: 'close-time-plugin',
inputs: ['file.created_at', 'tasks[].created_at']
},
'context-file-timestamp-tasks-timestamp-long': {
use: 'close-time-plugin',
inputs: ['file.created_at', 'tasks[].created_at'],
params: { 'time-limit': 3000 }
},
'context-file-title-task-description': {
use: 'similar-context-plugin',
inputs: ['file.title', 'tasks[].description'],
params: { 'extractKeywords': true }
},
'context-file-description-task-title': {
use: 'similar-context-plugin',
inputs: ['file.description', 'tasks[].title'],
params: { 'extractKeywords': true }
},
'context-file-description-task-description': {
use: 'similar-context-plugin',
inputs: ['file.description', 'tasks[].description'],
params: { 'extractKeywords': true }
},
'similar-file-title-task-description': {
use: 'similar-context-plugin',
inputs: ['file.title', 'tasks[].description'],
params: { 'extractKeywords': false }
},
'similar-file-description-task-title': {
use: 'similar-context-plugin',
inputs: ['file.description', 'tasks[].title'],
params: { 'extractKeywords': false }
},
'similar-file-description-task-description': {
use: 'similar-context-plugin',
inputs: ['file.description', 'tasks[].description'],
params: { 'extractKeywords': false }
}
}
}
config.secretToken = '8cd96c8697d12daf4dfd135aec01fd63ee058ab4'
module.exports = config