fedora-infra / anitya

A cross-distribution upstream release monitoring project
https://release-monitoring.org
GNU General Public License v2.0
250 stars 105 forks source link

Need version suffix for github #259

Open opoplawski opened 8 years ago

opoplawski commented 8 years ago

https://github.com/Unidata/netcdf4-python uses "vX.X.Xrel" tags for releases, but GitHub backend only allows for version prefix.

pypingou commented 8 years ago

You could use the custom backend and your own regex

lemenkov commented 8 years ago

Maybe it would be better to add (off by default) switch to provide a regexp instead of just prefix? Some projects (RabbitMQ among them) are using very unusual tag schemes. In case of RabbitMQ they have tags like "rabbitmq_v3_6_1_rc2" which can be matched by a regex like that:

perl -pe 's/rabbitmqv(\d+)(\d+)_(\d+).*$/$1.$2.$3/'

lemenkov commented 8 years ago

Also do we use an API for GitHub? They provide a very nice JSON API. For example:

https://api.github.com/repos/rabbitmq/rabbitmq-server/tags

pypingou commented 8 years ago

We don't use the API for github as it is rate limited and we don't know how many projects we have on github or will have.

perl -pe 's/rabbitmq_v(\d+)(\d+)(\d+).*$/$1.$2.$3/'

Isn't it just simpler to use the custom backend then?

torsava commented 7 years ago

+1, I could use a custom suffix as well instead of having to create a custom backend.

luto commented 7 years ago

@pypingou for authenticated requests the API is rate limited to 5000 requests per hour. Note that only requests that actually yield new data are counted, assuming the correct headers are used. This means running into those limits would require anitya to find 5k new releases within just one hour. If the app hits the HTML equivalents that often, I'm sure github would step in and rate limit the source IP anyway. Using the official API instead of parsing HTML returns via regex seems to be a better way of solving this, in my opinion.

Zlopez commented 2 years ago

It will be best to use https://packit.dev/docs/configuration/#upstream_tag_template instead and allow users to specify their own template for retrieved version.

Zopolis4 commented 1 year ago

Same issue with exif, I can strip out the exif- with a prefix but the -release suffix still remains.