Skip to content

Commit 2df6837

Browse files
authored
Update Sender Field For Code Scanning
1 parent 7586a53 commit 2df6837

2 files changed

Lines changed: 33 additions & 2 deletions

File tree

content/developers/webhooks-and-events/webhook-events-and-payloads.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ Also, the `User-Agent` for the requests will have the prefix `GitHub-Hookshot/`.
162162
{% data reusables.webhooks.repo_desc %}
163163
{% data reusables.webhooks.org_desc %}
164164
{% data reusables.webhooks.app_desc %}
165-
`sender` | `object` | If the `action` is `reopened_by_user` or `closed_by_user`, the `sender` object will be the user that triggered the event. The `sender` object is empty for all other actions.
165+
`sender` | `object` | If the `action` is `reopened_by_user` or `closed_by_user`, the `sender` object will be the user that triggered the event. The `sender` object is {% if currentVersion == "free-pro-team@latest" %}`github` {% elsif currentVersion ver_gt "enterprise-server@3.0" %}`github-enterprise` {% else %}empty {% endif %}for all other actions.
166166
167167
#### Webhook payload example
168168

lib/webhooks/static/dotcom/code_scanning_alert.reopened.payload.json

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,5 +136,36 @@
136136
"public_members_url": "https://api.github.com/orgs/Octocoders/public_members{/member}",
137137
"avatar_url": "https://avatars0.githubusercontent.com/u/6?",
138138
"description": ""
139-
}
139+
},
140+
"sender": {
141+
"login": "github",
142+
"id": 9919,
143+
"node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=",
144+
"url": "https://api.github.com/orgs/github",
145+
"repos_url": "https://api.github.com/orgs/github/repos",
146+
"events_url": "https://api.github.com/orgs/github/events",
147+
"hooks_url": "https://api.github.com/orgs/github/hooks",
148+
"issues_url": "https://api.github.com/orgs/github/issues",
149+
"members_url": "https://api.github.com/orgs/github/members{/member}",
150+
"public_members_url": "https://api.github.com/orgs/github/public_members{/member}",
151+
"avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4",
152+
"description": "How people build software.",
153+
"name": "GitHub",
154+
"company": null,
155+
"blog": "https://github.com/about",
156+
"location": "San Francisco, CA",
157+
"email": null,
158+
"twitter_username": null,
159+
"is_verified": true,
160+
"has_organization_projects": true,
161+
"has_repository_projects": true,
162+
"public_repos": 371,
163+
"public_gists": 0,
164+
"followers": 0,
165+
"following": 0,
166+
"html_url": "https://github.com/github",
167+
"created_at": "2008-05-11T04:37:31Z",
168+
"updated_at": "2020-09-28T06:15:10Z",
169+
"type": "Organization"
170+
}
140171
}

0 commit comments

Comments
 (0)