mirror of
https://github.com/zeldaret/tp
synced 2026-09-04 10:21:54 -04:00
Assignees (#1876)
* checkpoint * finish adding assignee support * test * use test command * use test command * skip build check * add state to common options, move version check * cleanup ok-check * undo dylink change
This commit is contained in:
@@ -11,11 +11,15 @@ import yaml, sys
|
||||
@dataclass
|
||||
class Label:
|
||||
@staticmethod
|
||||
def get_all_from_yaml(data):
|
||||
def get_all_from_yaml(data, project_name: str) -> list['Label']:
|
||||
ret_labels = []
|
||||
sub_labels = []
|
||||
|
||||
|
||||
for d in data:
|
||||
if d.get('project', {}).get('title', 'MISSING_TITLE') != project_name and project_name is not None:
|
||||
LOG.debug("Project name was passed in but doesn't match the current project, skipping.")
|
||||
continue
|
||||
sub_labels = get_sub_labels(d)
|
||||
|
||||
for label in sub_labels:
|
||||
@@ -24,7 +28,6 @@ class Label:
|
||||
|
||||
title_label = Label(data=d)
|
||||
ret_labels.append(title_label)
|
||||
|
||||
return ret_labels
|
||||
|
||||
|
||||
@@ -224,5 +227,5 @@ class Label:
|
||||
StateFile.data['labels'] = [state]
|
||||
|
||||
|
||||
with open("tools/pjstate.yml", 'w') as f:
|
||||
with open(StateFile.file_name, 'w') as f:
|
||||
yaml.safe_dump(StateFile.data, f)
|
||||
|
||||
Reference in New Issue
Block a user