File tree Expand file tree Collapse file tree 2 files changed +24
-21
lines changed
lib/workers/repository/reconfigure Expand file tree Collapse file tree 2 files changed +24
-21
lines changed Original file line number Diff line number Diff line change 1+ import is from '@sindresorhus/is' ;
2+ import { platform } from '../../../modules/platform' ;
3+ import type { BranchStatus } from '../../../types' ;
4+
15export function getReconfigureBranchName ( prefix : string ) : string {
26 return `${ prefix } reconfigure` ;
37}
8+
9+ export async function setBranchStatus (
10+ branchName : string ,
11+ description : string ,
12+ state : BranchStatus ,
13+ context ?: string | null ,
14+ ) : Promise < void > {
15+ if ( ! is . nonEmptyString ( context ) ) {
16+ // already logged this case when validating the status check
17+ return ;
18+ }
19+
20+ await platform . setBranchStatus ( {
21+ branchName,
22+ context,
23+ description,
24+ state,
25+ } ) ;
26+ }
Original file line number Diff line number Diff line change @@ -7,33 +7,13 @@ import { logger } from '../../../logger';
77import { platform } from '../../../modules/platform' ;
88import { ensureComment } from '../../../modules/platform/comment' ;
99import { scm } from '../../../modules/platform/scm' ;
10- import type { BranchStatus } from '../../../types' ;
1110import { getCache } from '../../../util/cache/repository' ;
1211import { readLocalFile } from '../../../util/fs' ;
1312import { getBranchCommit } from '../../../util/git' ;
1413import { regEx } from '../../../util/regex' ;
1514import { detectConfigFile } from '../init/merge' ;
1615import { setReconfigureBranchCache } from './reconfigure-cache' ;
17- import { getReconfigureBranchName } from './utils' ;
18-
19- async function setBranchStatus (
20- branchName : string ,
21- description : string ,
22- state : BranchStatus ,
23- context ?: string | null ,
24- ) : Promise < void > {
25- if ( ! is . nonEmptyString ( context ) ) {
26- // already logged this case when validating the status check
27- return ;
28- }
29-
30- await platform . setBranchStatus ( {
31- branchName,
32- context,
33- description,
34- state,
35- } ) ;
36- }
16+ import { getReconfigureBranchName , setBranchStatus } from './utils' ;
3717
3818export async function validateReconfigureBranch (
3919 config : RenovateConfig ,
You can’t perform that action at this time.
0 commit comments