Skip to content

Commit

Permalink
feat(branch-status): use targeted doc links for merge confidence and …
Browse files Browse the repository at this point in the history
…minimum release age (#28378)
  • Loading branch information
setchy authored Apr 17, 2024
1 parent a39ca89 commit 7c598d6
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions lib/workers/repository/update/branch/status-checks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { platform } from '../../../../modules/platform';
import type { BranchStatus } from '../../../../types';
import { isActiveConfidenceLevel } from '../../../../util/merge-confidence';
import type { MergeConfidence } from '../../../../util/merge-confidence/types';
import { coerceString } from '../../../../util/string';
import { joinUrlParts } from '../../../../util/url';

export async function resolveBranchStatus(
branchName: string,
Expand Down Expand Up @@ -75,12 +77,18 @@ export async function setStability(config: StabilityConfig): Promise<void> {
config.stabilityStatus === 'green'
? 'Updates have met minimum release age requirement'
: 'Updates have not met minimum release age requirement';

const docsLink = joinUrlParts(
coerceString(config.productLinks?.documentation),
'configuration-options/#minimumreleaseage',
);

await setStatusCheck(
config.branchName,
context,
description,
config.stabilityStatus,
config.productLinks?.documentation,
docsLink,
);
}

Expand Down Expand Up @@ -110,11 +118,17 @@ export async function setConfidence(config: ConfidenceConfig): Promise<void> {
config.confidenceStatus === 'green'
? 'Updates have met Merge Confidence requirement'
: 'Updates have not met Merge Confidence requirement';

const docsLink = joinUrlParts(
coerceString(config.productLinks?.documentation),
'merge-confidence',
);

await setStatusCheck(
config.branchName,
context,
description,
config.confidenceStatus,
config.productLinks?.documentation,
docsLink,
);
}

0 comments on commit 7c598d6

Please sign in to comment.