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

Add support for GitLab tags #24

Closed
sum01 opened this issue Jun 10, 2018 · 3 comments
Closed

Add support for GitLab tags #24

sum01 opened this issue Jun 10, 2018 · 3 comments
Labels
good first issue Good for newcomers

Comments

@sum01
Copy link
Contributor

sum01 commented Jun 10, 2018

API call to get a list of tags: https://WEBSITEHERE/api/v4/projects/USERNAMEHERE%2FREPONAMEHERE/repository/tags.

Notes:

  • So for https://gitlab.gnome.org WEBSITEHERE would be gitlab.gnome.org, but free hosting on gitlab is merely gitlab.com
  • The resulting tag_list[0].name will be the newest tag's version/name.
  • There are no seperate "releases" like Github, everything is under tags.
  • USERNAMEHERE%2FREPONAMEHERE is the username and reponame url-encoded, so that %2F is a forward-slash. It's required that they be url-encoded, so special characters will need to be delt with.

The WEBSITEHERE part would be needed to be stripped from the source target.

For example, getting a tar.gz from https://gitlab.gnome.org/GNOME/nautilus looks like https://gitlab.gnome.org/GNOME/nautilus/-/archive/3.28.1/nautilus-3.28.1.tar.gz, and https://gitlab.com/gitlab-org/gitlab-ce would be https://gitlab.com/gitlab-org/gitlab-ce/-/archive/v11.0.0-rc7/gitlab-ce-v11.0.0-rc7.tar.gz

The prefixed website doesn't change when targetting other sources, such as binaries, bzip's, etc.


Example calls

Source API call
https://gitlab.com/gitlab-org/gitlab-ce https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-ce/repository/tags
https://gitlab.gnome.org/GNOME/nautilus https://gitlab.gnome.org/api/v4/projects/GNOME%2Fnautilus/repository/tags
@simon04 simon04 changed the title [Request] Support Gitlab tags Add support for GitLab tags Jun 14, 2018
@simon04 simon04 added the help wanted Extra attention is needed label Jun 14, 2018
@sum01
Copy link
Contributor Author

sum01 commented Jun 15, 2018

I'm looking at the code & I'm curious if there's any recommendations for contributing? Like "use go imports" or "follow xyz styleguide", etc?

@sum01
Copy link
Contributor Author

sum01 commented Jun 18, 2018

I'm working on it, although I'm not very experienced with Go so it might take a day or two before I push a PR. I'm just using Goimports to format code, so I hope that's fine.

EDIT: Actually got it working quite quickly, I just need to write the tests.

@simon04 simon04 added good first issue Good for newcomers and removed help wanted Extra attention is needed labels Sep 6, 2020
@carlosal1015
Copy link

Hi @simon04, I do not know if is working how I am expecting, could you check please?

$ aur-out-of-date -pkg alberta
             [UNKNOWN] [alberta][3.0.3-2] No GitLab release found for gitlab.mathematik.uni-stuttgart.de/ians-nmh/alberta on https://gitlab.mathematik.uni-stuttgart.de/api/v4/projects/ians-nmh%2Falberta/repository/tags 

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

No branches or pull requests

3 participants