updateLabel method
Future<IssueLabel>
updateLabel(
- RepositorySlug slug,
- String name, {
- String? newName,
- String? color,
- String? description,
Update a label.
API docs: https://developer.github.com/v3/issues/labels/#update-a-label
Implementation
Future<IssueLabel> updateLabel(
RepositorySlug slug,
String name, {
String? newName,
String? color,
String? description,
}) {
return github.patchJSON(
'/repos/${slug.fullName}/labels/$name',
body: GitHubJson.encode({
if (newName != null) 'new_name': newName,
if (color != null) 'color': color,
if (description != null) 'description': description,
}),
convert: IssueLabel.fromJson,
);
}