-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Description
When a repository has a transfer of ownership, it will send a repository event webhook. The structure ends up looking like this:
{
"action": "transferred",
"changes": {
"owner": {
"from": {
"user": {
"login": "octocat",
... etc
OR
{
"action": "transferred",
"changes": {
"owner": {
"from": {
"organization": {
"login": "github",
... etc
I'd like to add the missing Owner
field to the EditChange
struct. I was thinking it would look something like this:
type EditChange struct {
Title *EditTitle `json:"title,omitempty"`
Body *EditBody `json:"body,omitempty"`
Base *EditBase `json:"base,omitempty"`
Repo *EditRepo `json:"repository,omitempty"`
Owner *EditOwner `json:"owner,omitempty"`
}
type EditOwner struct {
OwnerInfo *OwnerInfo `json:"from,omitempty"`
}
type OwnerInfo struct {
Actor *User `json:"user,omitempty"`
Org *User `json:"organization,omitempty"`
}
Unfortunately, due to the structure of the payload, OwnerInfo
will have to account for those two different options, even though they both refer to owners.
gmlewis and wass3rw3rkgmlewis and wass3rw3rk
Metadata
Metadata
Assignees
Labels
No labels