refactor: adjust code to updated dependencies

This commit is contained in:
Karl-Philipp Wulfert
2019-11-19 17:24:07 +01:00
parent 249e8e0905
commit dbcdb9fc1f

View File

@@ -241,7 +241,7 @@ export async function tidyProtectedBranches(api: Api, projects: Project[]): Prom
export async function tidyProtectedTags(api: Api, projects: Project[]): Promise<void> { export async function tidyProtectedTags(api: Api, projects: Project[]): Promise<void> {
await asyncPool(CONCURRENCY, projects, async (project) => { await asyncPool(CONCURRENCY, projects, async (project) => {
// TODO: move this to GitLab API // TODO: move this to GitLab API
const protectedTags: Array<{ const protectedTags = await api.makeGitLabAPIRequest(`projects/${project.id}/protected_tags`) as Array<{
/** /**
* List of access levels to create a tag * List of access levels to create a tag
*/ */
@@ -259,7 +259,7 @@ export async function tidyProtectedTags(api: Api, projects: Project[]): Promise<
* Name of the tag * Name of the tag
*/ */
name: string; name: string;
}> = await api.makeGitLabAPIRequest(`projects/${project.id}/protected_tags`); }>;
if (protectedTags.findIndex((protectedTag) => { if (protectedTags.findIndex((protectedTag) => {
return protectedTag.name === 'v*'; return protectedTag.name === 'v*';