You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* The [check_run](https://docs.github.com/en/rest/reference/checks#get-a-check-run).
*/
check_run: {
/**
* The id of the check.
*/
id: number;
node_id?: string;
/**
* The SHA of the commit that is being checked.
*/
head_sha: string;
external_id: string;
url: string;
html_url: string;
details_url?: string;
/**
* The current status of the check run. Can be `queued`, `in_progress`, or `completed`.
*/
status: "queued"|"in_progress"|"completed";
/**
* The result of the completed check run. Can be one of `success`, `failure`, `neutral`, `cancelled`, `timed_out`, `action_required` or `stale`. This value will be `null` until the check run has completed.
*/
conclusion:
|"success"
|"failure"
|"neutral"
|"cancelled"
|"timed_out"
|"action_required"
|"stale"
|"skipped"
|null;
/**
* The time that the check run began. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.
*/
started_at: string;
/**
* The time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.
*/
completed_at: string|null;
output: {
title?: string|null;
summary: string|null;
text: string|null;
annotations_count: number;
annotations_url: string;
};
/**
* The name of the check run.
*/
name: string;
check_suite: {
/**
* The id of the check suite that this check run is part of.
*/
id: number;
node_id?: string;
head_branch: string|null;
/**
* The SHA of the head commit that is being checked.
*/
head_sha: string;
status: "queued"|"in_progress"|"completed";
conclusion:
|"success"
|"failure"
|"neutral"
|"cancelled"
|"timed_out"
|"action_required"
|"stale"
|null;
url: string;
before: string|null;
after: string|null;
/**
* An array of pull requests that match this check suite. A pull request matches a check suite if they have the same `head_sha` and `head_branch`. When the check suite's `head_branch` is in a forked repository it will be `null` and the `pull_requests` array will be empty.
*/
pull_requests: CheckRunPullRequest[];
deployment?: CheckRunDeployment;
app: App;
created_at: string;
updated_at: string;
};
app: App;
pull_requests: CheckRunPullRequest[];
};
/**
* The action requested by the user.
*/
requested_action?: {
/**
* The integrator reference of the action requested by the user.
*/
identifier?: string;
}|null;
repository: Repository;
sender: User;
installation?: InstallationLite;
organization?: Organization;
}
The example for the check_run.created event has the "sender" key
The sender key is not present e.g. in CheckRunCreatedEvent
It is present for that event, I double checked. If it wouldn't be, the tests wouldn't pass, as the payload contains the sender.
The error from TS is a bit misleading, but it is correct. The sender property is not present in the union of ALL events
Do you know more about this? Happy to inquire with GitHub's Events team
Here is a list of events (schema $ids) which do not have a sender property:
secret_scanning_alert$created (Missing example payload)
security_advisory$performed (Missing example payload)
I got feedback on that: security_advisory does not have a sender key because there is no actor. And there are no plans at this point to a new type of actor for GitHub itself. So we will have to live with the fact that sender will be conditional.
The
sender
key is not present e.g. inCheckRunCreatedEvent
:webhooks/payload-types/schema.d.ts
Lines 813 to 917 in ced7888
The example for the
check_run.created
event has the"sender"
keywebhooks/payload-examples/api.github.com/check_run/created.payload.json
Lines 298 to 317 in ced7888
I'm not sure, but I'd assume a
sender
would always be present? I ran into this as I was working on probot/probot#1559Do you know more about this? Happy to inquire with GitHub's Events team
The text was updated successfully, but these errors were encountered: