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

delete packages with 0 downloads #10

Open
vincentbriglia opened this issue Apr 1, 2021 · 4 comments
Open

delete packages with 0 downloads #10

vincentbriglia opened this issue Apr 1, 2021 · 4 comments

Comments

@vincentbriglia
Copy link

i haven't found a smart way to remove packages with zero downloads, which can happen when you're publishing "canary" versions of packages constantly. Is that something that off the top of your head you can see would be beneficial to add in this library?

@rubengees
Copy link
Member

That sounds like a very specific need and I'm reluctant to add it to avoid feature creep.

I guess you could fork and adjust the filters and queries to only include versions with zero downloads.

@gdubya
Copy link

gdubya commented Sep 6, 2021

We have the same use case. Our CI pipeline builds an image for every branch, but these are only deployed once the branch is merged, so there is no guarantee that the branch image will be downloaded.

@rubengees
Copy link
Member

I think this can be be handled with the existing parameters and maybe slight adjustments to your build pipeline. These are two options I can think of:

  • Tag images differently based on if they are test images or not depending on the branch. All images built from main are tagged like 1.2.3, images from other branches are tagged e.g. 1.2.3-test.
  • Do not build images you are not actually going to use if that is possible to know beforehand.

Would any of that help? If not, what is preventing you from doing either of these options (trying to understand what the actual need is here)?

@OndrejSpanel
Copy link

I would also like this functionality, I would even start the fork.

Sadly there is no API to get number of downloads. See also actions/delete-package-versions#12 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants