-
Notifications
You must be signed in to change notification settings - Fork 57
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
Add support for workflow runs data #397
base: main
Are you sure you want to change the base?
Conversation
fa1e825
to
757b133
Compare
After this has been merged, I would appreciate a new release. |
28a1ea9
to
e6052e8
Compare
e6052e8
to
24ae398
Compare
@ivanahuckova Sry to bump but it's been a month and I'd greatly appreciate a review. |
24ae398
to
4f51a5a
Compare
4f51a5a
to
b150ab9
Compare
|
||
workflowRuns, err := client.GetWorkflowRuns(ctx, opts.Owner, opts.Repository, opts.Workflow, opts.Branch, timeRange) | ||
if err != nil { | ||
return nil, fmt.Errorf("listing workflows: opts=%+v %w", opts, err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think returning just err
here is sufficient.
currently, the error message is: listing workflows: opts={Owner:grafana Repository:grafana Workflow: Branch:} fetching workflow runs: <github error>
If we return only err, it becomes: fetching workflow runs: <github_error>
which i believe is much clearer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also add this new query to the Query types
section in the documentation.
Fixes #395 and provides an option to filter based on a branch.
Has been tested with github.com but should work with enterprise as well since most of the code is boilerplate/adjusted from WorkflowUsage API.