diff --git a/web/src/lib/api/index.ts b/web/src/lib/api/index.ts index b030a89b3..0cb6b6240 100644 --- a/web/src/lib/api/index.ts +++ b/web/src/lib/api/index.ts @@ -71,14 +71,14 @@ export default class WoodpeckerClient extends ApiClient { // Deploy triggers a deployment for an existing pipeline using the // specified target environment. - deployPipeline(owner: string, repo: string, number: number, options: DeploymentOptions): Promise { + deployPipeline(owner: string, repo: string, pipelineNumber: number, options: DeploymentOptions): Promise { const vars = { ...options.variables, event: 'deployment', deploy_to: options.environment, }; const query = encodeQueryString(vars); - return this._post(`/api/repos/${owner}/${repo}/pipelines/${number}?${query}`) as Promise; + return this._post(`/api/repos/${owner}/${repo}/pipelines/${pipelineNumber}?${query}`) as Promise; } getPipelineList(owner: string, repo: string, opts?: Record): Promise { @@ -86,12 +86,12 @@ export default class WoodpeckerClient extends ApiClient { return this._get(`/api/repos/${owner}/${repo}/pipelines?${query}`) as Promise; } - getPipeline(owner: string, repo: string, number: number | 'latest'): Promise { - return this._get(`/api/repos/${owner}/${repo}/pipelines/${number}`) as Promise; + getPipeline(owner: string, repo: string, pipelineNumber: number | 'latest'): Promise { + return this._get(`/api/repos/${owner}/${repo}/pipelines/${pipelineNumber}`) as Promise; } - getPipelineConfig(owner: string, repo: string, number: number): Promise { - return this._get(`/api/repos/${owner}/${repo}/pipelines/${number}/config`) as Promise; + getPipelineConfig(owner: string, repo: string, pipelineNumber: number): Promise { + return this._get(`/api/repos/${owner}/${repo}/pipelines/${pipelineNumber}/config`) as Promise; } getPipelineFeed(opts?: Record): Promise { @@ -99,16 +99,16 @@ export default class WoodpeckerClient extends ApiClient { return this._get(`/api/user/feed?${query}`) as Promise; } - cancelPipeline(owner: string, repo: string, number: number): Promise { - return this._post(`/api/repos/${owner}/${repo}/pipelines/${number}/cancel`); + cancelPipeline(owner: string, repo: string, pipelineNumber: number): Promise { + return this._post(`/api/repos/${owner}/${repo}/pipelines/${pipelineNumber}/cancel`); } - approvePipeline(owner: string, repo: string, pipeline: string): Promise { - return this._post(`/api/repos/${owner}/${repo}/pipelines/${pipeline}/approve`); + approvePipeline(owner: string, repo: string, pipelineNumber: string): Promise { + return this._post(`/api/repos/${owner}/${repo}/pipelines/${pipelineNumber}/approve`); } - declinePipeline(owner: string, repo: string, pipeline: string): Promise { - return this._post(`/api/repos/${owner}/${repo}/pipelines/${pipeline}/decline`); + declinePipeline(owner: string, repo: string, pipelineNumber: string): Promise { + return this._post(`/api/repos/${owner}/${repo}/pipelines/${pipelineNumber}/decline`); } restartPipeline(