File tree Expand file tree Collapse file tree 4 files changed +8
-7
lines changed Expand file tree Collapse file tree 4 files changed +8
-7
lines changed Original file line number Diff line number Diff line change
1
+ import type { Config } from './types' ;
1
2
import { cosmiconfigSync } from 'cosmiconfig' ;
2
3
import { existsSync , readFileSync } from 'fs' ;
3
4
import { resolve } from 'path' ;
4
5
import { load } from 'js-yaml' ;
5
6
import { getRepository } from './misc' ;
6
- import { Config } from './types' ;
7
7
8
8
export const normalizeConfigKey = ( key : string ) : string => key . replace ( / [ - \s ] + / g, '_' ) . toUpperCase ( ) ;
9
9
Original file line number Diff line number Diff line change
1
+ import type { Config } from './types' ;
1
2
import dotenv from 'dotenv' ;
2
3
import { existsSync , readFileSync } from 'fs' ;
3
4
import { resolve } from 'path' ;
4
- import { Config } from './types' ;
5
5
6
6
export const loadTokenFromEnv = ( dir : string ) : string | undefined => {
7
7
if ( ! existsSync ( resolve ( dir , '.env' ) ) ) {
Original file line number Diff line number Diff line change
1
+ import type { Context } from '@actions/github/lib/context' ;
2
+ import type { Config , ContextArgs } from './types' ;
1
3
import { readFileSync } from 'fs' ;
2
4
import { resolve } from 'path' ;
3
- import { Context } from '@actions/github/lib/context' ;
4
5
import { GitHelper } from '@technote-space/github-action-helper' ;
5
6
import { Logger } from '@technote-space/github-action-log-helper' ;
6
- import { Config , ContextArgs } from './types' ;
7
7
8
8
export const getRepository = ( dir : string ) : { owner : string ; repo : string } | never => {
9
9
const json = JSON . parse ( readFileSync ( resolve ( dir , 'package.json' ) , { encoding : 'utf8' } ) ) ;
Original file line number Diff line number Diff line change
1
+ import type { Context } from '@actions/github/lib/context' ;
2
+ import type { GitHelper } from '@technote-space/github-action-helper' ;
3
+ import type { ContextArgs } from './types' ;
1
4
import { mkdirSync } from 'fs' ;
2
- import { Context } from '@actions/github/lib/context' ;
3
- import { GitHelper , Command } from '@technote-space/github-action-helper' ;
5
+ import { Command } from '@technote-space/github-action-helper' ;
4
6
import { Logger } from '@technote-space/github-action-log-helper' ;
5
7
import * as command from '@technote-space/release-github-actions/lib/utils/command' ;
6
8
import * as misc from '@technote-space/release-github-actions/lib/utils/misc' ;
7
9
import { getContext } from './misc' ;
8
- import { ContextArgs } from './types' ;
9
10
10
11
export const isValidContext = ( args : ContextArgs ) : boolean => misc . isValidContext ( getContext ( args ) ) ;
11
12
You can’t perform that action at this time.
0 commit comments