Loading src/current_branch_refresher.ts +2 −1 Original line number Diff line number Diff line Loading @@ -38,7 +38,8 @@ const getJobs = async ( ): Promise<RestJob[]> => { if (!pipeline) return []; try { return await getGitLabService(projectInRepository).getJobsForPipeline(pipeline); const projectId = projectInRepository.project.restId; return await getGitLabService(projectInRepository).getJobsForPipeline(pipeline.id, projectId); } catch (e) { log.error(new UserFriendlyError('Failed to fetch jobs for pipeline.', e)); return []; Loading src/gitlab/gitlab_service.ts +2 −2 Original line number Diff line number Diff line Loading @@ -907,9 +907,9 @@ export class GitLabService { } } async getJobsForPipeline(pipeline: RestPipeline): Promise<RestJob[]> { async getJobsForPipeline(pipelineId: number, projectId: number): Promise<RestJob[]> { return this.fetch( `/projects/${pipeline.project_id}/pipelines/${pipeline.id}/jobs`, `/projects/${projectId}/pipelines/${pipelineId}/jobs`, {}, 'jobs for pipeline', ); Loading src/types.d.ts +5 −1 Original line number Diff line number Diff line Loading @@ -72,7 +72,11 @@ interface RestPipeline { | 'preparing'; updated_at: string; id: number; project_id: number; /** * The project_id is only present in GitLab version 13.10 and later. * https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/issues/553#note_882220438 */ project_id?: number; web_url: string; } Loading Loading
src/current_branch_refresher.ts +2 −1 Original line number Diff line number Diff line Loading @@ -38,7 +38,8 @@ const getJobs = async ( ): Promise<RestJob[]> => { if (!pipeline) return []; try { return await getGitLabService(projectInRepository).getJobsForPipeline(pipeline); const projectId = projectInRepository.project.restId; return await getGitLabService(projectInRepository).getJobsForPipeline(pipeline.id, projectId); } catch (e) { log.error(new UserFriendlyError('Failed to fetch jobs for pipeline.', e)); return []; Loading
src/gitlab/gitlab_service.ts +2 −2 Original line number Diff line number Diff line Loading @@ -907,9 +907,9 @@ export class GitLabService { } } async getJobsForPipeline(pipeline: RestPipeline): Promise<RestJob[]> { async getJobsForPipeline(pipelineId: number, projectId: number): Promise<RestJob[]> { return this.fetch( `/projects/${pipeline.project_id}/pipelines/${pipeline.id}/jobs`, `/projects/${projectId}/pipelines/${pipelineId}/jobs`, {}, 'jobs for pipeline', ); Loading
src/types.d.ts +5 −1 Original line number Diff line number Diff line Loading @@ -72,7 +72,11 @@ interface RestPipeline { | 'preparing'; updated_at: string; id: number; project_id: number; /** * The project_id is only present in GitLab version 13.10 and later. * https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/issues/553#note_882220438 */ project_id?: number; web_url: string; } Loading