Skip to content

Commit

Permalink
Update cherryPick.js
Browse files Browse the repository at this point in the history
  • Loading branch information
ZheSun88 authored Feb 14, 2023
1 parent 39dfa9d commit 8f4e830
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/cherryPick.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ async function cherryPickCommits(){
for(let i=arrPR.length-1; i>=0; i--){
let branchName = `cherry-pick-${arrPR[i]}-to-${arrBranch[i]}-${Date.now()}`;

await exec('git checkout master');
await exec('git checkout main');
await exec('git pull');
await exec(`git checkout ${arrBranch[i]}`);
await exec(`git reset --hard origin/${arrBranch[i]}`);
Expand All @@ -141,14 +141,14 @@ async function cherryPickCommits(){
await labelCommit(arrURL[i], `need to pick manually ${arrBranch[i]}`);
await postComment(arrURL[i], arrUser[i], arrMergedBy[i], arrBranch[i], err);
await exec(`git cherry-pick --abort`);
await exec(`git checkout master`);
await exec(`git checkout main`);
await exec(`git branch -D ${branchName}`);
continue;
}
await exec(`git push origin HEAD:${branchName}`);

await createPR(arrTitle[i], branchName, arrBranch[i]);
await exec(`git checkout master`);
await exec(`git checkout main`);
await exec(`git branch -D ${branchName}`);
await labelCommit(arrURL[i], `cherry-picked-${arrBranch[i]}`);
}
Expand Down

0 comments on commit 8f4e830

Please sign in to comment.