mirror of
https://code.forgejo.org/actions/git-backporting.git
synced 2025-05-29 08:54:30 -04:00
feat(issue-77): handle multiple target branches (#78)
fix: https://github.com/kiegroup/git-backporting/issues/77 This enhancement allow users to backport the same change to multiple branches with one single tool invocation
This commit is contained in:
parent
c19a56a9ad
commit
5fc72e127b
25 changed files with 1774 additions and 234 deletions
|
@ -63,9 +63,13 @@ export default class GitCLIService {
|
|||
this.logger.info(`Cloning repository ${from} to ${to}`);
|
||||
if (!fs.existsSync(to)) {
|
||||
await simpleGit().clone(this.remoteWithAuth(from), to, ["--quiet", "--shallow-submodules", "--no-tags", "--branch", branch]);
|
||||
} else {
|
||||
this.logger.warn(`Folder ${to} already exist. Won't clone`);
|
||||
return;
|
||||
}
|
||||
|
||||
this.logger.info(`Folder ${to} already exist. Won't clone`);
|
||||
// checkout to the proper branch
|
||||
this.logger.info(`Checking out branch ${branch}`);
|
||||
await this.git(to).checkout(branch);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue