Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get projects marked for deletion #3443

Closed
3 of 5 tasks
dsebastien opened this issue Oct 24, 2023 · 8 comments · Fixed by #3609
Closed
3 of 5 tasks

Get projects marked for deletion #3443

dsebastien opened this issue Oct 24, 2023 · 8 comments · Fixed by #3609
Labels
released This issue/pull request has been released. type:types Adding or enhancing typescript types

Comments

@dsebastien
Copy link

dsebastien commented Oct 24, 2023

Description

I would like to be able to list projects that have been marked for deletion

Proposal

  • Add the marked_for_deletion_on property to ProjectSchema
  • Add markedForDeletion: boolean to AllProjectsOptions
  • Add markedForDeletion: boolean to AllGroupsOptions

Checklist

  • I have checked that this is not a duplicate issue.
  • I have read the documentation.
@jdalrymple
Copy link
Owner

Add markedForDeletion: boolean to AllProjectsOptions

Where do you see this in the docs for the all projects query? https://docs.gitlab.com/ee/api/projects.html#list-all-projects

@dsebastien
Copy link
Author

dsebastien commented Oct 25, 2023

Sorry for the confusion. You're right, it doesn't seem to be supported yet. I'll continue filtering on the client side for now:

import { ProjectSchema, Camelize, Gitlab } from 'https://esm.sh/@gitbeaker/rest?dts';

export async function getProjectsMarkedForDeletion(gitLabClient: InstanceType<typeof Gitlab>): Promise<(ProjectSchema | Camelize<ProjectSchema>)[]> {
  // TODO refactor once improved upstream: https://github.com/jdalrymple/gitbeaker/issues/3443
  const allProjects = await gitLabClient.Projects.all();

  return (allProjects as any).filter((project: any) => project.markedForDeletionOn);
}

@dsebastien
Copy link
Author

I have introduced issues to request this for groups and projects:

@jdalrymple
Copy link
Owner

jdalrymple commented Oct 26, 2023

Ill will keep this issue open for better tracking!

@jdalrymple
Copy link
Owner

I updated the types on the ProjectSchema, but am awaiting the results of those two issues to update options schema

@jdalrymple
Copy link
Owner

I have introduced issues to request this for groups and projects:

The first one has been sorted, the last one is still opened

@jdalrymple
Copy link
Owner

Seems to also be done, but we have a duplicate. The other case is: https://gitlab.com/gitlab-org/gitlab/-/issues/463939.

Ill add the options ASAP and close this.

@jdalrymple
Copy link
Owner

🚀 Issue was released in 40.1.2 🚀

@jdalrymple jdalrymple added the released This issue/pull request has been released. label Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released This issue/pull request has been released. type:types Adding or enhancing typescript types
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants