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 Waiting to WorkflowJobStatus #2732

Merged
merged 2 commits into from
Jun 30, 2023
Merged

Add Waiting to WorkflowJobStatus #2732

merged 2 commits into from
Jun 30, 2023

Conversation

vuryleo
Copy link
Contributor

@vuryleo vuryleo commented Jun 28, 2023

Resolves #2730


Behavior

Before the change?

After the change?

Other information


Additional info

Pull request checklist

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • Added the appropriate label for the given change

Does this introduce a breaking change?

Please see our docs on breaking changes to help!

  • Yes (Please add the Type: Breaking change label)
  • No

If Yes, what's the impact:

  • N/A

Pull request type

Please add the corresponding label for change this PR introduces:

  • Bugfix: Type: Bug
  • Feature/model/API additions: Type: Feature
  • Updates to docs or samples: Type: Documentation
  • Dependencies/code cleanup: Type: Maintenance

@kfcampbell
Copy link
Member

Can you share a request that produces the error this PR fixes? Have you tested this with a request that returns a WorkflowJobStatus and validated serialization/deserialization works?

@vuryleo
Copy link
Contributor Author

vuryleo commented Jun 29, 2023

$ curl -H "Authorization: Bearer GITHUB_ACCESS_TOKEN" 'https://[redacted]/api/v3/repos/[redacted]/[redacted]/actions/jobs/[redacted]'  | jq .
{
  "id": [redacted],
  "run_id": [redacted],
  "run_url": "https://[redacted]/api/v3/repos/[redacted]/[redacted]/actions/runs/[redacted]",
  "run_attempt": 1,
  "node_id": "[redacted]",
  "head_sha": "[redacted]",
  "url": "https://[redacted]/api/v3/repos/[redacted]/[redacted]/actions/jobs/[redacted]",
  "html_url": "https://[redacted]/[redacted]/[redacted]/runs/[redacted]?check_suite_focus=true",
  "status": "waiting",
  "conclusion": null,
  "started_at": "2023-06-28T23:03:53Z",
  "completed_at": null,
  "name": "[redacted]",
  "steps": [],
  "check_run_url": "https://[redacted]/api/v3/repos/[redacted]/[redacted]/check-runs/[redacted]",
  "labels": [
    "[redacted]"
  ],
  "runner_id": null,
  "runner_name": null,
  "runner_group_id": null,
  "runner_group_name": null
}

@vuryleo
Copy link
Contributor Author

vuryleo commented Jun 29, 2023

new GitHubClient(new ProductHeaderValue("ph")).Actions.Workflows.Jobs.Get(OrganizationName, RepositoryName, Id)

throws

Newtonsoft.Json.JsonSerializationException

Copy link
Member

@kfcampbell kfcampbell left a comment

Choose a reason for hiding this comment

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

I'm unable to find a reproducible case for this. Please report back if this solves your issue or additional work is needed!

@kfcampbell kfcampbell merged commit cada8d1 into octokit:main Jun 30, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[BUG]: There's no WorkflowJobStatus.Waiting
2 participants