1
0
Fork 0

feat(remote/github): wire up label list endpoint

This commit is contained in:
ssube 2020-08-12 19:04:00 -05:00 committed by Sean Sube
parent e6857d7c73
commit fa81e86084
1 changed files with 14 additions and 1 deletions

View File

@ -75,7 +75,20 @@ export class GithubRemote implements Remote {
}
public async listLabels(options: ProjectQuery): Promise<Array<LabelUpdate>> {
throw new NotImplementedError();
const path = await this.splitProject(options.project);
const repo = await mustExist(this.request).issues.listLabelsForRepo(path);
const labels: Array<LabelUpdate> = [];
for (const label of repo.data) {
labels.push({
color: label.color,
desc: label.description,
name: label.name,
project: options.project,
});
}
return labels;
}
public async updateIssue(): Promise<IssueUpdate> {