On Sun, Oct 9, 2022 at 7:06 PM Volans <volans.ubu...@gmail.com> wrote: > > I've encountered the same problem and come out with a version of the watch > file using the GitHub APIs. In my case I also needed to download the PGP > signature. I've add some comments to the watch file for an easier > understanding. > > The approach should be generic enough to work for others [1]. > > The package name in the URL could also be replaced with @PACKAGE@ if that's > the same of the GitHub project name. > In my case too, tags are prefixed with a 'v' (i.e. v1.2.3), but that's easily > adaptable to different formats. > > What is the process to find an agreement on which updated version should be > published on the wiki [2] ?
I mentioned it before, one should increase the limit of results per page to the maximum (which is 100). Also I don't think using `@PACKAGE@` is a good idea inside the URL as it is maybe different from the Debian source package name. For releases I use something like (w/o signatures): ``` version=4 opts="searchmode=plain,\ filenamemangle=s%v?@ANY_VERSION@%@PACKAGE@-$1.tar.gz%" \ https://api.github.com/repos/<user>/<project>/releases?per_page=100 \ https://api.github.com/repos/[^/]+/[^/]+/tarball/v?@ANY_VERSION@ ``` For tags: ``` version=4 opts="searchmode=plain,\ filenamemangle=s%v?@ANY_VERSION@%@PACKAGE@-$1.tar.gz%" \ https://api.github.com/repos/<user>/<project>/tags?per_page=100 \ https://api.github.com/repos/[^/]+/[^/]+/tarball/refs/tags/v?@ANY_VERSION@ ``` One could probably combine the tarball search link into a unified regex expression, didn't try that yet. Overall I agree that the Github API thing should be documented in the Wiki and in the uscan man page. Cheers, Stephan