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

github: Use API to properly tag prereleases #246

Merged
merged 5 commits into from
Jul 7, 2024

Conversation

jvanbruegge
Copy link
Contributor

r-ryantm keeps opening pull requests for a github package where the latest release is a prerelease
https://github.com/NixOS/nixpkgs/pulls?q=is%3Apr+is%3Aclosed+audible-cli

The reason is that nix-updated uses the RSS feed to get the releases which does not distinguish between a release and a prerelease. Using the github API fixes that.

@jvanbruegge jvanbruegge force-pushed the github-prerelease branch 6 times, most recently from f061b90 to 2333ada Compare April 28, 2024 16:21
@jvanbruegge jvanbruegge force-pushed the github-prerelease branch 2 times, most recently from fb85fc2 to 75f75fb Compare July 6, 2024 15:46
@jvanbruegge
Copy link
Contributor Author

jvanbruegge commented Jul 6, 2024

@Mic92 I've added the atom feed as a fallback now and also added support for GITHUB_TOKEN

@jvanbruegge
Copy link
Contributor Author

The test failure is from pnpm and it also happens on master, so is unrelated to this PR

@Mic92 Mic92 force-pushed the github-prerelease branch 3 times, most recently from 1ad7fc4 to 9a70e95 Compare July 7, 2024 08:22
@Mic92
Copy link
Owner

Mic92 commented Jul 7, 2024

@mergify queue

Copy link
Contributor

mergify bot commented Jul 7, 2024

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at 2c1937e

@mergify mergify bot merged commit 2c1937e into Mic92:master Jul 7, 2024
4 checks passed
@jvanbruegge jvanbruegge deleted the github-prerelease branch July 7, 2024 09:43
@jvanbruegge
Copy link
Contributor Author

Could you cut a new release? I'd really like to get rid of the r-ryantm spam

@Mic92
Copy link
Owner

Mic92 commented Aug 13, 2024

Release is out.

@Mic92
Copy link
Owner

Mic92 commented Aug 13, 2024

There is one issue with this. Some projects don't have github releases i.e. https://github.com/mongodb/mongo/

On the other hand tags work: https://api.github.com/repos/mongodb/mongo/tags?per_page=1000

@SebTM
Copy link

SebTM commented Aug 14, 2024

There is one issue with this. Some projects don't have github releases i.e. https://github.com/mongodb/mongo/

Yes, ran into this issue for protonvpn-gui and dependencies today:

https://api.github.com/repos/ProtonVPN/proton-vpn-gtk-app/releases

does not contain the tags but the old atom-feed did. Can we have a switch for the new behavior and keep the old default for now?

@jvanbruegge
Copy link
Contributor Author

I can add a second fallback in case list of releases is empty. I think that is a better approach

@jvanbruegge
Copy link
Contributor Author

@Mic92 @SebTM see #269

@lilyinstarlight
Copy link
Contributor

This breaks so many packages that have used GitHub releases in the past but only push tags these days. The audible-cli package should be changed to use --version-regex to fix its issue (as is already done in nixpkgs packages with this issue, such as aws-sam-cli) and this be reverted in nix-update rather than breaking updates for a lot of packages

@lf-
Copy link

lf- commented Aug 31, 2024

#221 related pr, closed because it would have been a regression

@jian-lin
Copy link

jian-lin commented Sep 6, 2024

I can add a second fallback in case list of releases is empty.

I think this is not enough. Some packages, such as lspce, have a non-empty release list but there are newer tags which are not included in the release list.

@lilyinstarlight
Copy link
Contributor

Partial revert in #274

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

Successfully merging this pull request may close these issues.

6 participants