mirror of
https://github.com/google/blockly.git
synced 2025-12-16 14:20:10 +01:00
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 <cpcallen+github@gmail.com> * chore: store the found upstream name --------- Co-authored-by: Christopher Allen <cpcallen+github@gmail.com>
This commit is contained in:
committed by
GitHub
parent
2ac13b5a28
commit
2a2b3b3ac5
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user