feat: add selfmedia production release lane
This commit is contained in:
@@ -6,6 +6,7 @@ export interface PacBootstrapRepositoryIdentity {
|
||||
readonly owner: string;
|
||||
readonly repo: string;
|
||||
readonly cloneUrl: string;
|
||||
readonly sourceBranch: string;
|
||||
}
|
||||
|
||||
export function resolvePacBootstrapMirrorRepository(
|
||||
@@ -18,12 +19,13 @@ export function resolvePacBootstrapMirrorRepository(
|
||||
&& item.gitea.owner === repository.owner
|
||||
&& item.gitea.name === repository.repo
|
||||
&& repositoryUrlIdentity(item.gitea.readUrl) === repositoryUrlIdentity(repository.cloneUrl)
|
||||
&& item.upstream.branch === repository.sourceBranch
|
||||
));
|
||||
if (candidates.length !== 1) {
|
||||
const disposition = candidates.length === 0 ? "no exact match" : `${candidates.length} exact matches`;
|
||||
throw new Error(
|
||||
`cannot resolve the YAML-owned Gitea bootstrap repository for PaC repository ${repository.id} on ${targetId}: ${disposition}; `
|
||||
+ "match targetId, gitea owner/name, and read URL in config/platform-infra/gitea.yaml",
|
||||
+ "match targetId, gitea owner/name, read URL, and source branch in config/platform-infra/gitea.yaml",
|
||||
);
|
||||
}
|
||||
return candidates[0];
|
||||
|
||||
Reference in New Issue
Block a user