feat(issue-41): set and inherit labels (#48)

fix https://github.com/kiegroup/git-backporting/issues/41
This commit is contained in:
Andrea Lamparelli 2023-07-10 08:49:11 +02:00 committed by GitHub
parent f923f7f4c2
commit fcc01673f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
28 changed files with 962 additions and 140 deletions

View file

@ -25,7 +25,6 @@ export default class GitLabMapper implements GitResponseMapper<MergeRequestSchem
}
async mapPullRequest(mr: MergeRequestSchema): Promise<GitPullRequest> {
// throw new Error("Method not implemented.");
return {
number: mr.iid,
author: mr.author.username,
@ -38,6 +37,7 @@ export default class GitLabMapper implements GitResponseMapper<MergeRequestSchem
mergedBy: mr.merged_by?.username,
reviewers: mr.reviewers?.map((r => r.username)) ?? [],
assignees: mr.assignees?.map((r => r.username)) ?? [],
labels: mr.labels ?? [],
sourceRepo: await this.mapSourceRepo(mr),
targetRepo: await this.mapTargetRepo(mr),
nCommits: 1, // info not present on mr