From 5831d2b6859c92f6c73c5027f570c6c1b74e222b Mon Sep 17 00:00:00 2001 From: George Kalpakas Date: Thu, 17 Dec 2020 23:59:49 +0200 Subject: [PATCH] ci: correctly rebase PRs for branches contain a slash (/) (#40184) Previously, due to a bug in `rebase-pr.js`, PRs for branches containing a slash (/) in their name would fail to be rebased ([example failure][1]). This commit ensures that such branch names are handled correctly. [1]: https://circleci.com/gh/angular/angular/884503 PR Close #40184 --- .circleci/rebase-pr.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/rebase-pr.js b/.circleci/rebase-pr.js index 9f1e8125ed..29d19acb04 100644 --- a/.circleci/rebase-pr.js +++ b/.circleci/rebase-pr.js @@ -92,7 +92,7 @@ async function _main() { * likely correct branch will be the first one encountered in the list. */ function getRefFromBranchList(gitOutput) { - const branches = gitOutput.split('\n').map(b => b.split('/').slice(1).join('').trim()); + const branches = gitOutput.split('\n').map(b => b.split('/').slice(1).join('/').trim()); return branches.sort((a, b) => { if (a === 'master') { return -1;