GitLab: Use project-id instead of Project-Name
t-zuehlsdorff opened this issue · comments
Aloha,
i have a project "dashboard" in a group "web-applikationen". When trying to pull new issues from it, it fails with this error in the Message buffer:
Pulling web-applikationen/dashboard...
Pulling web-applikationen/dashboard issues...
error in process filter: ghub--signal-error: HTTP Error: 400, "Bad Request", "/api/v4/projects/web-applikationen%2Fdashboard/issues?per_page=100&order_by=updated_at&updated_after=false", ((error . "updated_after is invalid"))
error in process filter: HTTP Error: 400, "Bad Request", "/api/v4/projects/web-applikationen%2Fdashboard/issues?per_page=100&order_by=updated_at&updated_after=false", ((error . "updated_after is invalid"))
The GitLab Documentation Says, that the request must look like GET /projects/:id/issues
. See here:
https://docs.gitlab.com/ee/api/issues.html#list-project-issues
So instead of /api/v4/projects/web-applikationen%2Fdashboard/issues?per_page=100&order_by=updated_at&updated_after=false
the request should have been in my case /api/v4/projects/2/issues?per_page=100&order_by=updated_at&updated_after=false
I can't find any possibility to configure the project-id or use this as URL and so on. I am not sure if this is a bug because of the usage of Groups. Or if this also happens when using Subgroups. But it looks like it to me.
Best,
Torsten
in my case
/api/v4/projects/2/issues...
No, 2
does not uniquely identify your project across all of gitlab.com. On https://docs.gitlab.com/ee/api/issues.html#list-project-issues it says that :id
has to of type integer/string , so an integer would work, but the correct integer would be much larger than 2
.
The error you quoted, does explicitly say what exactly is wrong, at its end:
((error . "updated_after is invalid"))
so, let's look at the value of that in the request:
&updated_after=false
This has to be a date not a boolean, or be omitted. I've fixed that two years ago, in 0ca0ca8. Maybe you need to update Forge?
Ah, sorry, i forgot to mention that i am using a self hosted GitLab Instance. 2
is actually the correct project-id.
I see your reasoning, this makes totally sense. I am using 0.3.2 release, build by the FreeBSD ports packages:
https://www.freshports.org/devel/forge/
It looks like 0ca0ca8 was pushed after the release of 0.3.2? Yo committed it on 2022-04-24 while the last release was on 2022-03-07, right?
Is there any other official release i can pick up?
As a workaround i could apply your commit as patch, since i am actually a FreeBSD ports committer. :D
Is there any other official release i can pick up?
There's one coming this month.
Awesome! Looking forward to it! :)
There's one coming this month.
Since the month has passed: when will be the next official release? :) Can i help you in anyway?
This month. Stuff came up.
How about June? :) Is there any way i can support you? :)
Thank you. :) If forge will help me as expected, we can talk about a company sponsoring :)