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
This commit is contained in:
George Kalpakas 2020-12-17 23:59:49 +02:00 committed by Joey Perrott
parent 10a468aab9
commit 5831d2b685
1 changed files with 1 additions and 1 deletions

View File

@ -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;