From 9a9247ab731d08c1c738702a00e6280b7d3c40d7 Mon Sep 17 00:00:00 2001 From: Austin Burdine Date: Mon, 20 Apr 2020 13:47:21 -0400 Subject: [PATCH] Update ListRepositoryWorkflowRuns to support all query parameters closes #1497 - update the method to use the more specific ListWorkflowRunsOptions struct --- github/actions_workflow_runs.go | 2 +- github/actions_workflow_runs_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/github/actions_workflow_runs.go b/github/actions_workflow_runs.go index b365bb1c75a..8b12944184a 100644 --- a/github/actions_workflow_runs.go +++ b/github/actions_workflow_runs.go @@ -93,7 +93,7 @@ func (s *ActionsService) ListWorkflowRunsByFileName(ctx context.Context, owner, // ListRepositoryWorkflowRuns lists all workflow runs for a repository. // // GitHub API docs: https://developer.github.com/v3/actions/workflow_runs/#list-repository-workflow-runs -func (s *ActionsService) ListRepositoryWorkflowRuns(ctx context.Context, owner, repo string, opts *ListOptions) (*WorkflowRuns, *Response, error) { +func (s *ActionsService) ListRepositoryWorkflowRuns(ctx context.Context, owner, repo string, opts *ListWorkflowRunsOptions) (*WorkflowRuns, *Response, error) { u := fmt.Sprintf("repos/%s/%s/actions/runs", owner, repo) u, err := addOptions(u, opts) if err != nil { diff --git a/github/actions_workflow_runs_test.go b/github/actions_workflow_runs_test.go index 2e7a8260baf..48e5cc30af3 100644 --- a/github/actions_workflow_runs_test.go +++ b/github/actions_workflow_runs_test.go @@ -215,7 +215,7 @@ func TestActionService_ListRepositoryWorkflowRuns(t *testing.T) { }) - opts := &ListOptions{Page: 2, PerPage: 2} + opts := &ListWorkflowRunsOptions{ListOptions: ListOptions{Page: 2, PerPage: 2}} runs, _, err := client.Actions.ListRepositoryWorkflowRuns(context.Background(), "o", "r", opts) if err != nil {