Skip to content

Commit

Permalink
Fixed circleci sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
futugyou committed Jan 11, 2025
1 parent 43d15dd commit 07bd0b8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions circleci_sdk/pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func (s *PipelineService) ContinuePipeline(ctx context.Context, continuationKey
}

func (s *PipelineService) GetPipelinesByProject(ctx context.Context, project_slug string) (*CircleciPipelineResponse, error) {
path := fmt.Sprintf("/pipeline/%s/pipeline", project_slug)
path := fmt.Sprintf("/project/%s/pipeline", project_slug)
result := &CircleciPipelineResponse{}
err := s.client.http.Get(ctx, path, result)

Expand All @@ -79,7 +79,7 @@ func (s *PipelineService) GetPipelinesByProject(ctx context.Context, project_slu
}

func (s *PipelineService) TriggerPipeline(ctx context.Context, project_slug string, branch string, tag string, parameters interface{}) (*TriggerPipelineResponse, error) {
path := fmt.Sprintf("/pipeline/%s/pipeline", project_slug)
path := fmt.Sprintf("/project/%s/pipeline", project_slug)
request := TriggerPipelineRequest{
Branch: branch,
Tag: tag,
Expand All @@ -95,7 +95,7 @@ func (s *PipelineService) TriggerPipeline(ctx context.Context, project_slug stri
}

func (s *PipelineService) GetYourPipelines(ctx context.Context, project_slug string) (*CircleciPipelineResponse, error) {
path := "/rpoject/" + project_slug + "/pipeline/mine"
path := fmt.Sprintf("/project/%s/pipeline/mine", project_slug)
result := &CircleciPipelineResponse{}
err := s.client.http.Get(ctx, path, result)

Expand All @@ -106,7 +106,7 @@ func (s *PipelineService) GetYourPipelines(ctx context.Context, project_slug str
}

func (s *PipelineService) GetPipelineByNumber(ctx context.Context, project_slug string, number string) (*CircleciPipeline, error) {
path := fmt.Sprintf("/pipeline/%s/pipeline/%s", project_slug, number)
path := fmt.Sprintf("/project/%s/pipeline/%s", project_slug, number)
result := &CircleciPipeline{}
err := s.client.http.Get(ctx, path, result)

Expand Down

0 comments on commit 07bd0b8

Please sign in to comment.