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.
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", ... etcOR
{ "action": "transferred", "changes": { "owner": { "from": { "organization": { "login": "github", ... etcI'd like to add the missing
Ownerfield to theEditChangestruct. I was thinking it would look something like this:Unfortunately, due to the structure of the payload,
OwnerInfowill have to account for those two different options, even though they both refer to owners.