Merge pull request #2142 from hmacr/1we7-production-branch-for-github

Default to `providerBranch` for manual VCS re-deployment
This commit is contained in:
Matej Bačo
2025-07-24 13:22:03 +02:00
committed by GitHub
2 changed files with 8 additions and 2 deletions
@@ -51,7 +51,10 @@
.vcs.listRepositoryBranches($installation.$id, selectedRepository);
const sorted = sortBranches(branchList.branches);
branch = sorted[0]?.name ?? null;
branch = sorted.find((b) => b.name === $func.providerBranch)
? $func.providerBranch
: (sorted[0]?.name ?? null);
if (!branch) {
branch = 'main';
@@ -57,7 +57,10 @@
.vcs.listRepositoryBranches($installation.$id, selectedRepository);
const sorted = sortBranches(branchList.branches);
branch = sorted[0]?.name ?? null;
branch = sorted.find((b) => b.name === site.providerBranch)
? site.providerBranch
: (sorted[0]?.name ?? null);
if (!branch) {
branch = 'main';