diff --git a/internal/checker/service.go b/internal/checker/service.go index 0bbad88..62926cd 100644 --- a/internal/checker/service.go +++ b/internal/checker/service.go @@ -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 diff --git a/internal/gateway/github_client.go b/internal/gateway/github_client.go index aade3a5..ea94a75 100644 --- a/internal/gateway/github_client.go +++ b/internal/gateway/github_client.go @@ -3,7 +3,6 @@ package gateway import ( "context" "fmt" - "strconv" "strings" "github.com/google/go-github/v61/github" @@ -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(), }