Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fixes typo in method name #35

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions insight.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
)

type Insights interface {
ListSummaryMetricsForWorkflos(ctx context.Context, projectSlug string, options InsightsListSummaryMetricsOptions) (*SummaryMetricsList, error)
ListSummaryMetricsForWorkflows(ctx context.Context, projectSlug string, options InsightsListSummaryMetricsOptions) (*SummaryMetricsList, error)
ListSummaryMetricsForWorkflowJobs(ctx context.Context, projectSlug, workflowName string, options InsightsListSummaryMetricsOptions) (*SummaryMetricsList, error)
GetTestMetricsForWorkflows(ctx context.Context, projectSlug, workflowName string, options InsightsGetTestMetricsOptions) (*TestMetrics, error)
ListWorkflowRuns(ctx context.Context, projectSlug, workflowName string, options InsightsListWorkflowRunsOptions) (*WorkflowRunList, error)
Expand Down Expand Up @@ -75,7 +75,7 @@ func (o InsightsListSummaryMetricsOptions) valid() error {
return nil
}

func (s *insights) ListSummaryMetricsForWorkflos(ctx context.Context, projectSlug string, options InsightsListSummaryMetricsOptions) (*SummaryMetricsList, error) {
func (s *insights) ListSummaryMetricsForWorkflows(ctx context.Context, projectSlug string, options InsightsListSummaryMetricsOptions) (*SummaryMetricsList, error) {
if err := options.valid(); err != nil {
return nil, err
}
Expand Down
6 changes: 3 additions & 3 deletions insight_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ func Test_insights_ListSummaryMetricsForWorkflows(t *testing.T) {
})

ctx := context.Background()
sml, err := client.Insights.ListSummaryMetricsForWorkflos(ctx, projectSlug, InsightsListSummaryMetricsOptions{
sml, err := client.Insights.ListSummaryMetricsForWorkflows(ctx, projectSlug, InsightsListSummaryMetricsOptions{
PageToken: String("1"),
AllBranches: Bool(true),
ReportingWindow: ReportingWindow(Last90Days),
})
if err != nil {
t.Errorf("Insights.ListSummaryMetricsForWorkflos got error: %v", err)
t.Errorf("Insights.ListSummaryMetricsForWorkflows got error: %v", err)
}

want := &SummaryMetricsList{
Expand All @@ -46,7 +46,7 @@ func Test_insights_ListSummaryMetricsForWorkflows(t *testing.T) {
}

if !cmp.Equal(sml, want) {
t.Errorf("Insights.ListSummaryMetricsForWorkflos got %+v, want %+v", sml, want)
t.Errorf("Insights.ListSummaryMetricsForWorkflows got %+v, want %+v", sml, want)
}
}

Expand Down
12 changes: 6 additions & 6 deletions mocks/insight.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.