Open PedroHPAlmeida opened 2 years ago
Hey! @PedroHPAlmeida
Is this why issues are not loading into the UI? I noticed in the API request it returns a 404
when trying to fetch issues.
I can take a look at this potentially if I have some time seeing as it has been open for a while.
That's right, @Parsifal-M! By cloning the plugin into my project, and making the changes I suggested, the problem was solved.
Hey @PedroHPAlmeida :wave:
Thanks for the heads up! I've raised a PR for this, hopefully, we can get it fixed.
Cheers!
Hi @PedroHPAlmeida and @Parsifal-M I suggest you to switch to the new official backstage-plugin-gitlab
: https://github.com/immobiliare/backstage-plugin-gitlab ;)
Hi @PedroHPAlmeida and @Parsifal-M I suggest you to switch to the new official
backstage-plugin-gitlab
: https://github.com/immobiliare/backstage-plugin-gitlab ;)
Ah, thanks for the heads up. :+1:
In line 68 of the
IssuesTable.tsx
file a check is made to assign the variableprojectId
the value ofproject_id
(if it was passed as a parameter to the component), otherwise the value of theid
attribute of theprojectDetails
object is passed.The error occurs when the
project_id
parameter is not passed to the component and on line 70 the request is made by passing an undefined value. This happens when thecatalog-info.yaml
file has only thegitlab.com/project-slug
annotation. The solution is simple: just pass the variableprojectId
(notproject_id
) when calling the API, as is done in other components such asPipelinesTable.tsx
.