-
Notifications
You must be signed in to change notification settings - Fork 33
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
[BUG]: DateTimeOffsetConverter doesn't parse null completed_at #595
Comments
👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labeled with |
@itrion do you have a sample payload that I can test with? It looks like
And webhooks.net/src/Octokit.Webhooks/Models/WorkflowJobEvent/WorkflowJobStep.cs Lines 24 to 26 in ecab931
|
Thank you @JamieMagee, after a deeper troubleshooting I realized it was actually failing parsing the {
"action": "in_progress",
"workflow_job": {
"id": 123,
"run_id": 1234,
"workflow_name": "docker in - Update",
"head_branch": "main",
"run_url": "https://api.github.com/repos/example/example/actions/runs/11439205892",
"run_attempt": 1,
"node_id": "CR_123",
"head_sha": "96bd5bd7ac9cbc35a15cea8262abbd385778342b",
"url": "https://api.github.com/repos/example/example/actions/jobs/31822394947",
"html_url": "https://github.com/example/example/actions/runs/11439205892/job/31822394947",
"status": "in_progress",
"conclusion": null,
"created_at": "2024-10-21T11:32:36Z",
"started_at": "2024-10-21T11:32:47Z",
"completed_at": null,
"name": "Dependabot",
"steps": [
{
"name": "Set up job",
"status": "completed",
"conclusion": "success",
"number": 1,
"started_at": "2024-10-21T11:32:47Z",
"completed_at": "2024-10-21T11:32:48Z"
},
{
"name": "Verify actions runner dependencies",
"status": "in_progress",
"conclusion": null,
"number": 2,
"started_at": "2024-10-21T11:32:48Z",
"completed_at": null
},
{
"name": "Create job directory",
"status": "pending",
"conclusion": null,
"number": 3,
"started_at": null,
"completed_at": null
},
{
"name": "Run Dependabot",
"status": "pending",
"conclusion": null,
"number": 4,
"started_at": null,
"completed_at": null
},
{
"name": "Cleanup job directory",
"status": "pending",
"conclusion": null,
"number": 5,
"started_at": null,
"completed_at": null
}
],
"check_run_url": "https://api.github.com/repos/example/example/check-runs/31822394947",
"labels": [
"dependabot"
],
"runner_id": 123,
"runner_name": "dependabot",
"runner_group_id": 25,
"runner_group_name": "1234"
}
} I got to reproduce it with that payload running [Fact]
public async Task ReproduceError()
{
var payload = await File.ReadAllTextAsync($"Fixtures/test-github-webhook-workflow_job-null-issue.json");
var workflowJobEvent = JsonSerializer.Deserialize<WorkflowJobEvent>(payload)!;
workflowJobEvent.Should().NotBeNull();
} |
Thank you! This should be resolved by #596 |
What happened?
Similartly to #140, the DateTimeOffsetConverter is throwing
when parsing a
workflow_job
event with several"completed_at": null
. The completed_at with null values are in.workflow_job.completed_at
.workflow_job.steps[N].completed_at
Versions
Octokit.Webhooks.AspNetCore 2.4.0
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: