mirror of
https://code.forgejo.org/actions/git-backporting
synced 2025-07-01 23:06:00 +02:00
feat(issue-41): set and inherit labels (#48)
fix https://github.com/kiegroup/git-backporting/issues/41
This commit is contained in:
parent
f923f7f4c2
commit
fcc01673f4
28 changed files with 962 additions and 140 deletions
|
@ -72,6 +72,18 @@ export default class GitLabClient implements GitClient {
|
|||
|
||||
const mr = data as MergeRequestSchema;
|
||||
|
||||
// labels
|
||||
if (backport.labels.length > 0) {
|
||||
try {
|
||||
this.logger.info("Setting labels: " + backport.labels);
|
||||
await this.client.put(`/projects/${projectId}/merge_requests/${mr.iid}`, {
|
||||
labels: backport.labels.join(","),
|
||||
});
|
||||
} catch(error) {
|
||||
this.logger.warn("Failure trying to update labels. " + error);
|
||||
}
|
||||
}
|
||||
|
||||
// reviewers
|
||||
const reviewerIds: number[] = [];
|
||||
for(const r of backport.reviewers) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue