fix: fix regression with protected tags

This commit is contained in:
Karl-Philipp Wulfert
2019-06-04 11:51:16 +02:00
parent 27a8bccf5a
commit 65a7233905

View File

@@ -263,7 +263,7 @@ export async function tidyProtectedTags(api: Api, projects: Project[]): Promise<
if (protectedTags.findIndex((protectedTag) => {
return protectedTag.name === 'v*';
}) >= 0) {
}) === -1) {
await api.makeGitLabAPIRequest(`projects/${project.id}/protected_tags`, {
data: {
create_access_level: AccessLevel.Maintainer,
@@ -374,10 +374,10 @@ export async function tidy(api: Api) {
const projects = await getProjects(api, groups);
await Promise.all([
tidyLabels(api, projects),
tidyMilestones(api, projects),
tidyProtectedBranches(api, projects),
tidyProtectedTags(api, projects),
await tidyLabels(api, projects),
await tidyMilestones(api, projects),
await tidyProtectedBranches(api, projects),
await tidyProtectedTags(api, projects),
]);
await tidyOpenIssuesWithoutMeetingLabel(api);