add site labels to issues
This commit is contained in:
parent
fdd3382982
commit
8bd49e05cc
@ -58,6 +58,11 @@ SITES = {
|
|||||||
'SR' => 'Simula Research Laboratory',
|
'SR' => 'Simula Research Laboratory',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
REVERSE_SITES = {}
|
||||||
|
SITES.each_pair do |key, name|
|
||||||
|
REVERSE_SITES[name] = key
|
||||||
|
end
|
||||||
|
|
||||||
#------------------- Parsing proposal.pdata ---------------------
|
#------------------- Parsing proposal.pdata ---------------------
|
||||||
|
|
||||||
def split_line(line)
|
def split_line(line)
|
||||||
@ -382,11 +387,14 @@ def populate_workpackage(github, repo, workpackage)
|
|||||||
end
|
end
|
||||||
|
|
||||||
workpackage['tasks'].each_value do |task|
|
workpackage['tasks'].each_value do |task|
|
||||||
|
org_labels = [REVERSE_SITES[task['lead']]] + \
|
||||||
|
(task['partners'] or []).map {|site| REVERSE_SITES[site]}
|
||||||
|
|
||||||
make_task_issue(github, repo, task, {
|
make_task_issue(github, repo, task, {
|
||||||
:labels => [
|
:labels => [
|
||||||
'task',
|
'task',
|
||||||
workpackage['label'],
|
workpackage['label'],
|
||||||
]
|
] + org_labels
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
workpackage['deliverables'].each do |deliverable|
|
workpackage['deliverables'].each do |deliverable|
|
||||||
@ -396,6 +404,7 @@ def populate_workpackage(github, repo, workpackage)
|
|||||||
:labels => [
|
:labels => [
|
||||||
'deliverable',
|
'deliverable',
|
||||||
workpackage['label'],
|
workpackage['label'],
|
||||||
|
REVERSE_SITES[deliverable['lead']]
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user