mirror of
https://github.com/google/blockly.git
synced 2026-01-04 23:50:12 +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() {
|
function getUpstream() {
|
||||||
if (upstream) return upstream;
|
if (upstream) return upstream;
|
||||||
for (const line of String(execSync('git remote -v')).split('\n')) {
|
for (const line of String(execSync('git remote -v')).split('\n')) {
|
||||||
const [remote, url] = line.split('\t');
|
if (line.includes('google/blockly')) {
|
||||||
if (url.includes('github.com/google/blockly')) {
|
upstream = line.split('\t')[0];
|
||||||
upstream = remote;
|
|
||||||
return upstream;
|
return upstream;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user