Add "owner" subkey to "organizations" in payload JSON


#1

I think it would be beneficial to add another subkey “owner” to “organization” key in payload JSON of the event of type “Pull Request”.
},
“organization”: {
…,
"owner: “…”
}

}
I would like to be able to associate the organization the event occured on to a specific user in my GitHub App. Right, it is not possible.


#2

@jedrekdomanski An organization can have many owners, so I’m not sure that I see how this would be possible. That said, if you can help me understand your use case, perhaps there’s another way to accomplish what you’re trying to do.


#3

I am writing an application in Ruby on Rails that is supposed to handle webhook POST request to my application. The use case is that a user sets up Webhook URL to my app and subscribes to certain events on Github. When a webhook is triggered, it goes to my application and what I want to do is to associate the organization the event occured on to that specific user in my application which authenticated with Github. For example, I have a user that authenticates with Github, then he subscribes to certain events under oganization settings/webhooks (say, Pull Request event) and when someone opens up a pull request on any of repositories within his organization a webhook is triggered and goes to my app and when reading the JSON I don’t have the ower of the organization therefore I am struggling to associate that event to his organization. I hope I am clearer now.


#4

I still don’t understand. Did you create your app on this page https://github.com/settings/apps/new?


#5

Oh, sorry. I have an OAuth App for authentication which i created here https://github.com/settings/applications/new
I have a separate app on my local computer (soon will deploy it to production) written in Ruby on Rails which receives the webhook. Is there anything else you would like me to clarify?


#6

This is the forum for the GitHub GraphQL API and the GitHub Apps feature—for help with OAuth apps your best bet is to contact GitHub support: support@github.com.

From an API point of view it’s unlikely that we’d add the key that you’re asking for without having a strong/broad use case for it.