joshjohanning / joshjohanning.github.io

josh-ops.com | a devops blog
https://josh-ops.com
MIT License
8 stars 0 forks source link

GitHub Packages: Migrate NuGet Packages Between GitHub Instances | josh-ops #29

Open utterances-bot opened 10 months ago

utterances-bot commented 10 months ago

GitHub Packages: Migrate NuGet Packages Between GitHub Instances | josh-ops

Migrating NuGet packages stored in GitHub Packages from one instance to another

https://josh-ops.com/posts/github-packages-migrate-nuget-packages/

ivohlavaty commented 10 months ago

Hi Josh, it seems that graphql is no longer supporting nuget packages .. do you have any workaround ? gh: nuget registry is not supported by GraphQL APIs.

joshjohanning commented 10 months ago

@ivohlavaty Thank you for motiving me to finally make the changes! 🙇 I pushed the new URL format to the repo linked in the post.

I will update the post shortly - the only difference is we need to pass in a <source-pat> when calling now.

Try it out and let me know if it works for you! Cheers

ivohlavaty commented 10 months ago

@joshjohanning thanks a lot, it's working

joshjohanning commented 10 months ago

@ivohlavaty excellent! great to hear 😄

ivohlavaty commented 9 months ago

Hi @joshjohanning .. I just discovered that you are missing pagination in your script. I was curious how's possible that I miss random packages and then figured out it fetches only the first page .. gh api "/orgs/solarwinds/packages?package_type=nuget&page=2" is required to sync another page

joshjohanning commented 9 months ago

Great catch @ivohlavaty! Totally missed that. That's the main reason why I used gh api was so I could use the gh api --paginate option 😄

Fixed now!