From 2a2b3b3ac506e58896c1a8a215c566f9739329a0 Mon Sep 17 00:00:00 2001 From: Maribeth Bottorff Date: Fri, 4 Aug 2023 16:41:24 -0700 Subject: [PATCH] chore: change the way we look for upstream remote (#7230) * chore: change the way we look for upstream remote * chore: use js instead of shell thanks christopher Co-authored-by: Christopher Allen * chore: store the found upstream name --------- Co-authored-by: Christopher Allen --- scripts/gulpfiles/git_tasks.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/gulpfiles/git_tasks.js b/scripts/gulpfiles/git_tasks.js index a1a133449..ebf9bb356 100644 --- a/scripts/gulpfiles/git_tasks.js +++ b/scripts/gulpfiles/git_tasks.js @@ -36,9 +36,8 @@ let upstream = null; function getUpstream() { if (upstream) return upstream; for (const line of String(execSync('git remote -v')).split('\n')) { - const [remote, url] = line.split('\t'); - if (url.includes('github.com/google/blockly')) { - upstream = remote; + if (line.includes('google/blockly')) { + upstream = line.split('\t')[0]; return upstream; } }