-
Notifications
You must be signed in to change notification settings - Fork 0
/
constants.go
82 lines (78 loc) · 3.55 KB
/
constants.go
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
package trackeractivity
// The keys in this map represent all valid story states.
//
// See https://www.pivotaltracker.com/help/api/rest/v5#story_resource
//
// See also https://www.pivotaltracker.com/help/articles/story_states/
//
// The values in this map represent all of the labels that should be
// automatically managed by this app per state. This code assumes that
// these labels already exist in your GitHub repository.
//
// When a story transitions into the state defined by the key, this app
// will update the linked issue to remove all of the labels mentioned
// by any value in the map, and then add the labels at that specific
// key's value.
var issueLabelsToApplyPerStoryState = map[string][]string{
"unscheduled": {"priority/undecided"}, // "unscheduled" stories are in the icebox
"unstarted": {"priority/backlog"}, // "unstarted" stories in the backlog
"started": {"priority/backlog", "state/started"},
"finished": {"priority/backlog", "state/finished"},
"delivered": {"priority/backlog", "state/delivered"},
"rejected": {"priority/backlog", "state/rejected"},
"accepted": {"state/accepted"}, // "accepted" stories are done, so they're not in the backlog anymore
// The feature of Tracker that causes a story to be "planned" is not commonly used.
// It should be similar to the "unstarted" state for our purposes here.
// See https://www.pivotaltracker.com/help/articles/automatic_vs_manual_planning/
"planned": {"priority/backlog"},
}
// The keys in this map represent all valid story types.
//
// See https://www.pivotaltracker.com/help/api/rest/v5#story_resource
//
// See also https://www.pivotaltracker.com/help/articles/adding_stories/
//
// The values in this map represent all of the labels that should be
// automatically managed by this app per state. This code assumes that
// these labels already exist in your GitHub repository.
//
// When a story transitions into the story type defined by the key, this app
// will update the linked issue to remove all of the labels mentioned
// by any value in the map, and then add the labels at that specific
// key's value.
var issueLabelsToApplyPerStoryType = map[string][]string{
"feature": {"enhancement"},
"bug": {"bug"},
"chore": {"chore"},
"release": {}, // empty means just remove the other labels
}
// The keys in this map represent story estimates.
//
// See https://www.pivotaltracker.com/help/api/rest/v5#story_resource
//
// See also https://www.pivotaltracker.com/help/articles/estimating_stories/
//
// The values in this map represent all of the labels that should be
// automatically managed by this app per state. This code assumes that
// these labels already exist in your GitHub repository.
//
// When a story's estimate is edited, this app
// will update the linked issue to remove all of the labels mentioned
// by any value in the map, and then add the labels at that specific
// key's value.
//
// Tracker's estimation scales:
// - Fibonacci scale: 0, 1, 2, 3, 5, 8 -> XS, S, M, L, XL, XXL
// - Powers of 2 scale: 0, 1, 2, 4, 8 -> XS, S, M, L, XXL
// - Linear scale: 0, 1, 2, 3 -> XS, S, M, L
// - Custom scale: Not supported unless you edit the code below to match
// allowed values of your custom scale.
var issueLabelsToApplyPerStoryEstimate = map[string][]string{
"0": {"estimate/XS"},
"1": {"estimate/S"},
"2": {"estimate/M"},
"3": {"estimate/L"}, // 3 is used in fibonacci and linear
"4": {"estimate/L"}, // 4 is only used in powers of 2
"5": {"estimate/XL"}, // 5 is only used in fibonacci
"8": {"estimate/XXL"}, // 8 is only used in fibonacci and powers of 2
}