mirror of
https://github.com/kiegroup/git-backporting.git
synced 2025-06-28 05:33:47 +00:00
fix: --no-squash on single-commit GitLab MR (#93)
Due to off-by-one error in GitLabMapper, --no-squash was not effective on an MR containing single commit. Fix by using the same condition as GitHubMapper.
This commit is contained in:
parent
b7df1f80dc
commit
300fa91a8a
7 changed files with 376 additions and 165 deletions
|
@ -41,8 +41,8 @@ export default class GitLabMapper implements GitResponseMapper<MergeRequestSchem
|
|||
sourceRepo: await this.mapSourceRepo(mr),
|
||||
targetRepo: await this.mapTargetRepo(mr),
|
||||
// if commits list is provided use that as source
|
||||
nCommits: (commits && commits.length > 1) ? commits.length : 1,
|
||||
commits: (commits && commits.length > 1) ? commits : this.getSha(mr)
|
||||
nCommits: (commits && commits.length > 0) ? commits.length : 1,
|
||||
commits: (commits && commits.length > 0) ? commits : this.getSha(mr)
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue