Skip to content

Clarify the sender property of the CodeScanningEvent webhook #3906

Closed
@wolfy1339

Description

@wolfy1339

What article on docs.github.com is affected?

https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads#code_scanning_alert

What part(s) of the article would you like to see updated?

The description of the sender property.

In the docs it says that the sender property is github for the created, fixed, reopened, appeared_in_branch actions.
But, what are the values for the sender property?
Currently the example uses the values from the GET /orgs/github REST endpoint while the other webhooks use similar values to the GET /user/github REST endpoint

Additional information

I'm a contributor to octokit/webhooks, and a staffer sent a PR (octokit/webhooks#366) with some updates to the CodeScanningAlert event that were currently in progress.
The other day, we have another staffer send us a PR that doesn't match the sender field in the example payload in the docs and that uses values pulled from the GET /users/github enpoint.

My understanding of the docs right now is that the sender property is the user that triggered the event.
And for the actions reopened, fixed, created, appeared_in_branch, the user that triggered the event is github

ref: octokit/webhooks#379; octokit/webhooks#371

Metadata

Metadata

Assignees

No one assigned

    Labels

    webhooksContent related to webhooks

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions