From e9b6ceb14d4785cdf08b0ff25145d09331d6d943 Mon Sep 17 00:00:00 2001 From: Doug Parker Date: Wed, 24 Sep 2025 13:43:34 -0700 Subject: [PATCH] refactor(devtools): update DevTools release script to resolve `origin` URL (#64062) `git config` only lists the configured value, but `git remote get-url` actually resolves the URL and is more stable. I had a local configuration which aliased `gh:` to the appropriate GitHub URL: ``` [url "git@github.com:"] insteadOf = "gh:" pushInsteadOf = "git@github.com" ``` In this scenario, `git config` returns `gh:dgp1130/angular`, but `git remote get-url` returns `git@github.com:dgp1130/angular`, which is what the subsequent regex expects. PR Close #64062 --- devtools/tools/release.mts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devtools/tools/release.mts b/devtools/tools/release.mts index bdd8ab350f3..0884ca118aa 100644 --- a/devtools/tools/release.mts +++ b/devtools/tools/release.mts @@ -298,7 +298,7 @@ async function prepareReleasePullRequest(newVersion: string): Promise { await exec(`git push origin ${releaseBranch} --force-with-lease`); console.log(chalk.green('Release branch pushed to your fork.')); - const {stdout: remoteUrl} = await exec('git config --get remote.origin.url'); + const {stdout: remoteUrl} = await exec('git remote get-url origin'); const match = remoteUrl.trim().match(/github\.com[/:]([\w-]+)\/angular/); const origin = match ? match[1] : 'angular';