forked from termie/lp2gh
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
204 lines (169 loc) · 5.05 KB
/
README
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
Ready to make the switch? Here's how.
Read these:
- https://github.com/termie/lp2gh/blob/master/docs/moving_branches.rst
- https://github.com/termie/lp2gh/blob/master/docs/moving_issues.rst
-- milestone as label
or milestone as milestone
-- blueprints as issues
-- status as label
-- importance as label
-- assignee as assignee
or assignee as mention
General order of events for a full import: (+ == done, - == in progress)
+ Generate all default labels that don't exist
+ Import all the milestones
+ Make a milestone name -> milestone id mapping db
+ Import bugs
+ Gather up all the tags that are used and generate those first
+ First pass import simply, setting basic values, labels
+ Build old id -> new id mapping db
+ Second pass
+ Add all comments, translating auto-linkable values
+ Build a 'summary' text that includes appropriate @mentions, possibly
translating from a mapping db of lp names to gh names.
+ Update the description translating auto-linkable values and apply the
milestones
- Import blueprints
- First pass set basic values
- Build spec name -> new id mapping db
- Second pass
- Update the description translating auto-linkable values
- Build a 'summary' comment that includes appropriate @mentions, possibly
translating from a mapping db of lp names to gh names.
- Add whiteboard comments, translating auto-linkable values
Summary bug template <<EOF
Imported from Launchpad using lp2gh.
* date created: %(date_created)s
* owner: @%(owner)s
* assignee: @%(assignee)s
* marked duplicate of issue #%(new_issued_id)s
* the following issues have been marked duplicates of this:
* issue #%(duplicate_1)s
* issue #%(duplicate_n)s
* the launchpad url was %(lp_url)s
EOF
Summary blueprint template <<EOF
Imported from Launchpad using lp2gh.
* date created: %(date_created)s
* drafter: @%(drafter)s
* assignee: @%(assignee)s
* marked duplicate of issue #%(new_issued_id)s
* the following issues have been associated with this:
* issue #%(issue_1)s
* issue #%(issue_n)s
* this spec depends on these specs:
* spec #%(issue_1)s
* spec #%(issue_n)s
* full spec url: %(url)s
* the launchpad url was %(lp_url)s
EOF
Whiteboard blueprint template <<EOF
The whiteboard from the launchpad original:
%(whiteboard)s
EOF
Exported bugs look like
{'id': bug.id,
'status': bug_task.status,
'importance': bug_task.importance,
'assignee': assignee and assignee.name or None,
'owner': owner.name,
'milestone': milestone and milestone.name,
'title': bug.title,
'description': bug.description,
'duplicate_of': duplicate_of.id,
'duplicates': [x.id for x in duplicates]
'date_created': to_timestamp(bug_task.date_created),
'comments': [message_to_dict(x) for x in messages]},
'tags': bug.tags.split(),
'security_related': bug.security_related,
'lp_url': bug.web_link,
id -> local mapping db of new ids to old ids
status -> label and state
importance -> (optional) label
assignee -> (optional) to comment with mention
owner -> (optional) comment with mention
milestone -> (optional) milestone or label
title -> title
description -> body
duplicate_of_link --> comment pointing to new id of duplicated
duplicates_collection_link --> comment mentioning new ids of duplicates
comments -> commments
comment pointing to original launchpad link
tags -> labels
Those comments look like:
{'owner': owner.name,
'content': message.content,
'date_created': to_timestamp(message.date_created),
}
Exported milestones look like:
{'name': ms.name,
'date_targeted': date_targeted and to_timestamp(date_targeted) or None})
Exported specs look like:
{'assignee': assignee and assignee.name or None,
'bugs': [x.id for x in spec.bugs],
'definition_status': spec.definition_status,
'dependencies': [x.name for x in spec.dependencies],
'date_created': util.to_timestamp(spec.date_created),
'drafter': drafter and drafter.name or None,
'implementation_status': spec.implementation_status,
'lifecycle_status': spec.lifecycle_status,
'milestone': milestone and milestone.name or None,
'name': spec.name,
'priority': spec.priority,
'summary': spec.summary,
'title': spec.title,
'whiteboard': spec.whiteboard,
'url': spec.specification_url,
'lp_url': spec.web_link,
}
Status labels are:
['New',
'Incomplete',
'Invalid',
"Won't Fix",
'Confirmed',
'Triaged',
'In Progress',
'Fix Committed',
'Fix Released']
Definition status labels are:
Approved
Pending Approval
Review
Drafting
Discussion
New
Superseded
Obsolete
Implementation status labels are:
Unknown
Not started
Deferred
Needs Infrastructure
Blocked
Started
Slow progress
Good progress
Beta Available
Needs Code Review
Deployment
Implemented
Informational
Lifecycle status labels are:
Not started
Started
Complete
Importance is:
Critical
High
Medium
Low
Wishlist
Undecided
Priorities are:
Not
Undefined
Low
Medium
High
Essential