Skip to content

Commit 2fb931c

Browse files
committed
refactor: remove token arg
1 parent 233b897 commit 2fb931c

1 file changed

Lines changed: 3 additions & 9 deletions

File tree

  • packages/slice-machine/src/features/customTypes/customTypesBuilder/ImportSlicesFromLibraryModal/utils

packages/slice-machine/src/features/customTypes/customTypesBuilder/ImportSlicesFromLibraryModal/utils/github.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -156,28 +156,24 @@ export const parseGithubUrl = (
156156
export const getDefaultBranch = async ({
157157
owner,
158158
repo,
159-
token,
160159
}: {
161160
owner: string;
162161
repo: string;
163-
token?: string;
164162
}): Promise<string> => {
165-
const github = new GitHubRepositoryAPI({ owner, repo, token });
163+
const github = new GitHubRepositoryAPI({ owner, repo });
166164
return github.getDefaultBranch();
167165
};
168166

169167
export const getSliceLibraries = async ({
170168
owner,
171169
repo,
172170
branch,
173-
token,
174171
}: {
175172
owner: string;
176173
repo: string;
177174
branch: string;
178-
token?: string;
179175
}): Promise<string[]> => {
180-
const github = new GitHubRepositoryAPI({ owner, repo, token });
176+
const github = new GitHubRepositoryAPI({ owner, repo });
181177
return github.getSliceLibraries(branch);
182178
};
183179

@@ -186,15 +182,13 @@ export const fetchSlicesFromLibraries = async ({
186182
repo,
187183
branch,
188184
libraries,
189-
token,
190185
}: {
191186
owner: string;
192187
repo: string;
193188
branch: string;
194189
libraries: string[];
195-
token?: string;
196190
}) => {
197-
const github = new GitHubRepositoryAPI({ owner, repo, token });
191+
const github = new GitHubRepositoryAPI({ owner, repo });
198192
const fetchedSlices: SliceImport[] = [];
199193

200194
console.log(

0 commit comments

Comments
 (0)