add status in workflow runs#446
Conversation
|
|
itsmylife
left a comment
There was a problem hiding this comment.
@summerguo-protectai Thanks for the contribution. Could you please resolve the conflicts?
- Status field must be defined in here
github-datasource/src/types/query.ts
Lines 75 to 78 in ceb91ee
itsmylife
left a comment
There was a problem hiding this comment.
There are some issues in the code.
I commented one of them and the other is in models/client.go
GetWorkflowRuns's signature must be
GetWorkflowRuns(ctx context.Context, owner, repo, workflow string, branch string, status string, timeRange backend.TimeRange) ([]*googlegithub.WorkflowRun, error)
| var workflowRuns []*googlegithub.WorkflowRun | ||
| var err error | ||
| workflowRuns, page, err = client.getWorkflowRuns(ctx, owner, repo, workflow, "", timeRange, page) | ||
| workflowRuns, page, err = client.getWorkflowRuns(ctx, owner, repo, workflow, "", timeRange, page, runStatusCompleted) |
There was a problem hiding this comment.
| workflowRuns, page, err = client.getWorkflowRuns(ctx, owner, repo, workflow, "", timeRange, page, runStatusCompleted) | |
| workflowRuns, page, err = client.getWorkflowRuns(ctx, owner, repo, workflow, "", runStatusCompleted, timeRange, page) |
|
This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 2 weeks if no further activity occurs. Please feel free to give a status update or ping for review. Thank you for your contributions! |
Implement the ability to add status into the filter for get workflow runs. The purpose is to be able to alert on github action failures through Grafana.
This change is NOT tested.