Skip to content

Commit

Permalink
fix: pipeline urls
Browse files Browse the repository at this point in the history
Signed-off-by: Antonio Musolino <[email protected]>
  • Loading branch information
antoniomuso committed May 30, 2022
1 parent 5da733e commit f41e402
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/api/GitlabCIClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ export class GitlabCIClient implements GitlabCIApi {
if (pipelineObjects) {
pipelineObjects.forEach((element: PipelineObject) => {
element.project_name = projectObj?.name;

if (!element.web_url)
element.web_url = `${this.baseUrl}${projectObj.path_with_namespace}/pipelines/${element.id}`;
});
}
return {
Expand Down
4 changes: 2 additions & 2 deletions src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const gitlabPlugin = createPlugin({
factory: ({ configApi, discoveryApi }) =>
new GitlabCIClient({
discoveryApi,
baseUrl: configApi.getOptionalString('gitlab.baseUrl'),
baseUrl: configApi.getOptionalConfigArray("integrations.gitlab")?.[0].getOptionalString('baseUrl'),
}),
}),
],
Expand Down Expand Up @@ -86,4 +86,4 @@ export const EntityGitlabPipelinesTable = gitlabPlugin.provide(
import('./components/widgets/index').then((m) => m.PipelinesTable),
},
})
);
);

0 comments on commit f41e402

Please sign in to comment.