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

Add missing workflow_id field from workflow run #1556

Merged
merged 3 commits into from Jun 16, 2020

Conversation

patrickmarabeas
Copy link
Contributor

Adds the missing workflow_id field from workflow runs endpoint.

See docs: https://developer.github.com/v3/actions/workflow-runs

@googlebot googlebot added the cla: yes Indication that the PR author has signed a Google Contributor License Agreement. label Jun 15, 2020
@codecov
Copy link

codecov bot commented Jun 15, 2020

Codecov Report

Merging #1556 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1556   +/-   ##
=======================================
  Coverage   67.92%   67.92%           
=======================================
  Files          94       94           
  Lines        8670     8670           
=======================================
  Hits         5889     5889           
  Misses       1880     1880           
  Partials      901      901           
Impacted Files Coverage Δ
github/actions_workflow_runs.go 57.57% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dbeb049...c880922. Read the comment docs.

Copy link
Collaborator

@gmlewis gmlewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @patrickmarabeas, but one tiny tweak, please, then we will be ready for merging.

@@ -22,6 +22,7 @@ type WorkflowRun struct {
Event *string `json:"event,omitempty"`
Status *string `json:"status,omitempty"`
Conclusion *string `json:"conclusion,omitempty"`
WorkflowID *int `json:"workflow_id,omitempty"`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's please change this to *int64.
Whenever we see GitHub use "ID", we've made them 64-bit ints just in case, so I think we should follow the pattern here as well.

Also, you'll see in line 100 below that workflowID is indeed already an int64:

func (s *ActionsService) ListWorkflowRunsByID(ctx context.Context, owner, repo string, workflowID int64, opts *ListWorkflowRunsOptions) (*WorkflowRuns, *Response, error) {

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

Copy link
Collaborator

@gmlewis gmlewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @patrickmarabeas !
LGTM.
Merging.

@gmlewis gmlewis merged commit f9a2213 into google:master Jun 16, 2020
n1lesh pushed a commit to n1lesh/go-github that referenced this pull request Oct 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Indication that the PR author has signed a Google Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants