Skip to content

Commit 6cea5ae

Browse files
committed
refactor: use inline export
1 parent e69a285 commit 6cea5ae

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/api/github/util.ts

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import fs from 'fs-extra';
22
import git from 'isomorphic-git';
33

4-
const getHeadSha = async (dir: string): Promise<string> => {
4+
export const getHeadSha = async (dir: string): Promise<string> => {
55
const [commit] = await git.log({ depth: 1, dir, fs });
66

77
return commit.oid;
@@ -24,7 +24,7 @@ const getHeadSha = async (dir: string): Promise<string> => {
2424
*/
2525
const ownerRepoRegex = /github.com(?::|\/)(.+)\/(.+).git$/;
2626

27-
const getOwnerRepo = async (
27+
export const getOwnerRepo = async (
2828
dir: string,
2929
): Promise<{ owner: string; repo: string }> => {
3030
const remotes = await git.listRemotes({ dir, fs });
@@ -42,5 +42,3 @@ const getOwnerRepo = async (
4242

4343
throw new Error('Could not find a GitHub remote');
4444
};
45-
46-
export { getOwnerRepo, getHeadSha };

0 commit comments

Comments
 (0)