-
Notifications
You must be signed in to change notification settings - Fork 97
Open
Description
Hello.
I was thinking about that is not a bad idea to have an ability to migrate isuues priorities from bitbucket to github.
I did it.
I made labels in my github repository: prio:trivial, prio:minor, prio:major, prio:critical, prio:blocker.
Then I just added to config.py
# We map bitbucket's issue "priority" to github "labels".
PRIORITY_MAPPING = {
"trivial": "prio:trivial",
"minor": "prio:minor",
"major": "prio:major",
"critical": "prio:critical",
"blocker": "prio:blocker"
}
and to bitbucket_issues_to_github.py
def map_bpriority_to_glabels(bissue, glabels):
bpriority = bissue['priority']
if bpriority in config.PRIORITY_MAPPING:
glabels.add(config.PRIORITY_MAPPING[bpriority])
...
...
def patch_gissue(gissue, bissue, bexport):
if gissue['title'] != bissue['title']:
raise ValueError('Inconsistent issues')
glabels = set()
map_bkind_to_glabels(bissue=bissue, glabels=glabels)
map_bstatus_to_glabels(bissue=bissue, glabels=glabels)
map_bpriority_to_glabels(bissue=bissue, glabels=glabels) # <-this
gissue_patch = {
"body": construct_gissue_content(bissue=bissue, bexport=bexport),
"assignees": map_bassignee_to_gassignees(bissue=bissue),
"labels": list(glabels),
"state": map_bstatus_to_gstate(bissue=bissue),
}
...
I can make a PR if this idea is really good.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels