Skip to content

Commit d024d61

Browse files
committed
refactor: move to utils folder
1 parent 6cea5ae commit d024d61

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

src/api/github/checkRun.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ import { Octokit } from '@octokit/rest';
22
import type { Endpoints } from '@octokit/types';
33
import { mocked } from 'ts-jest/utils';
44

5+
import { getHeadSha, getOwnerRepo } from '../../utils/git';
56
import type * as GitHub from '../github';
67

78
import { createCheckRun } from './checkRun';
8-
import { getHeadSha, getOwnerRepo } from './util';
99

1010
type CreateCheckRunResponse =
1111
Endpoints['POST /repos/{owner}/{repo}/check-runs']['response'];
1212

1313
jest.mock('@octokit/rest');
14-
jest.mock('./util');
14+
jest.mock('../../utils/git');
1515

1616
const mockClient = {
1717
checks: {

src/api/github/checkRun.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import { Octokit } from '@octokit/rest';
22
import type { Endpoints } from '@octokit/types';
33

4+
import { getHeadSha, getOwnerRepo } from '../../utils/git';
45
import { pluralise } from '../../utils/logging';
56

6-
import { getHeadSha, getOwnerRepo } from './util';
7-
87
type Output = NonNullable<
98
Endpoints['POST /repos/{owner}/{repo}/check-runs']['parameters']['output']
109
>;

src/api/github/util.test.ts renamed to src/utils/git.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { ReadCommitResult } from 'isomorphic-git';
22
import git from 'isomorphic-git';
33
import { mocked } from 'ts-jest/utils';
44

5-
import { getHeadSha, getOwnerRepo } from './util';
5+
import { getHeadSha, getOwnerRepo } from './git';
66

77
jest.mock('isomorphic-git');
88

File renamed without changes.

0 commit comments

Comments
 (0)