Skip to content

Commit

Permalink
Fix incorrect passing of GitHub workflow run ID; Make svc errors not …
Browse files Browse the repository at this point in the history
…mention git provider
  • Loading branch information
gregfurman committed Apr 27, 2024
1 parent fae783d commit ff4e6ea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion internal/checker/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func (s *Service) GetPipeline() (*gateway.Pipeline, error) {
func (s *Service) GetPipelineStatusByID(id string, pid int) (string, error) {
pipeline, err := s.gatewayClient.GetPipeline(id, pid)
if err != nil {
return "", fmt.Errorf("failed to get project from GitLab: %w", err)
return "", fmt.Errorf("failed to get project: %w", err)
}

return pipeline.Status, nil
Expand Down
5 changes: 2 additions & 3 deletions internal/gateway/github_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package gateway
import (
"context"
"fmt"
"strconv"
"strings"

"github.com/google/go-github/v61/github"
Expand Down Expand Up @@ -78,8 +77,8 @@ func workflowToPipeline(wf *github.WorkflowRun) *Pipeline {

return &Pipeline{
Status: status,
ID: int(wf.GetWorkflowID()),
ProjectID: strconv.FormatInt(wf.GetID(), 10),
ID: int(wf.GetID()),
ProjectID: wf.GetRepository().GetFullName(),
URL: wf.GetHTMLURL(),
CommitSha: wf.GetHeadCommit().GetSHA(),
}
Expand Down

0 comments on commit ff4e6ea

Please sign in to comment.