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

[GitLab] CRITICAL - No release was found #132

Closed
kovmir opened this issue Dec 16, 2023 · 8 comments
Closed

[GitLab] CRITICAL - No release was found #132

kovmir opened this issue Dec 16, 2023 · 8 comments
Labels
bug Something isn't working

Comments

@kovmir
Copy link

kovmir commented Dec 16, 2023

Project with incorrect version

https://gitlab.com/librewolf-community/browser/appimage/-/releases

To Reproduce

GITLAB_PA_TOKEN='mytoken' lastversion https://gitlab.com/librewolf-community/browser/appimage --verbose

Expected behavior

Latest release number, e.g. currently 120.0.1-1.

Program output

lastversion.lastversion - INFO - Verbose 1 level output.
lastversion.ProjectHolder - INFO - Using cache directory: /home/uninstance/.cache/lastversion.
lastversion.ProjectHolder - INFO - Created instance of GitLabRepoSession
lastversion.GitLabRepoSession - INFO - Using Personal Access token.
lastversion.lastversion - CRITICAL - No release was found
@kovmir kovmir added the bug Something isn't working label Dec 16, 2023
@dvershinin
Copy link
Owner

Fixed in just-released lastversion v3.4.4

@kovmir
Copy link
Author

kovmir commented Dec 16, 2023

Am I doing it wrong?

$ lastversion --version
lastversion 3.4.4, up to date
$ GITLAB_PA_TOKEN='mytoken' lastversion https://gitlab.com/librewolf-community/browser/appimage --verbose
lastversion.lastversion - INFO - Verbose 1 level output.
lastversion.ProjectHolder - INFO - Using cache directory: /home/uninstance/.cache/lastversion.
lastversion.ProjectHolder - INFO - Created instance of GitLabRepoSession
lastversion.GitLabRepoSession - INFO - Using Personal Access token.
lastversion.GitLabRepoSession - DEBUG - Checking if https://gitlab.com/api/v4/projects/librewolf-community%2Fbrowser%2Fappimage is repo
lastversion.GitLabRepoSession - DEBUG - Checking if https://gitlab.com/api/v4/projects/librewolf-community%2Fbrowser is repo
Traceback (most recent call last):
  File "/home/uninstance/.local/bin/lastversion", line 8, in <module>
    sys.exit(main())
  File "/home/uninstance/.local/lib/python3.9/site-packages/lastversion/lastversion.py", line 842, in main
    res = latest(
  File "/home/uninstance/.local/lib/python3.9/site-packages/lastversion/lastversion.py", line 232, in latest
    release = project.get_latest(pre_ok=pre_ok, major=repo_data.get("major", major))
  File "/home/uninstance/.local/lib/python3.9/site-packages/lastversion/GitLabRepoSession.py", line 103, in get_latest
    r = self.repo_query("/repository/tags")
  File "/home/uninstance/.local/lib/python3.9/site-packages/lastversion/GitLabRepoSession.py", line 40, in repo_query
    repo_enc = self.repo.replace("/", "%2F")
AttributeError: 'NoneType' object has no attribute 'replace'

@dvershinin
Copy link
Owner

@kovmir do you see a different output if you don't prefix your command with GITLAB_PA_TOKEN='mytoken' ?

@kovmir
Copy link
Author

kovmir commented Dec 16, 2023

I do, it works.

$ lastversion https://gitlab.com/librewolf-community/browser/appimage
120.0.1

@dvershinin
Copy link
Owner

Probably your GITLAB_PA_TOKEN value is incorrect. Expired perhaps.

@kovmir
Copy link
Author

kovmir commented Dec 16, 2023

I have created one today with all permissions.

@dvershinin
Copy link
Owner

@kovmir I tried to follow your steps and the problem was unnecessary quoting of the token. It should be GITLAB_PA_TOKEN=TOKEN and not GITLAB_PA_TOKEN='TOKEN'

@kovmir
Copy link
Author

kovmir commented Dec 16, 2023

Everything is fine, works even quoted (the quotes are for the shell).

I had a typo in my token string, I am sorry.

@kovmir kovmir closed this as completed Dec 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants