Duplicating a webhook over multiple repos

I have a Discord server for all of my repos, and would like to duplicate the webhook over every repo that belongs to me.

Is this possible? Thanks! ;D

Hi @thetechrobo o/

Just coming back to this since you never got a response. Did you find the information you were looking for, by chance?

If not, could you expand on what you mean? Which webhook(s) do you mean, and what type of duplicate action are you hoping for?

Some additional information would be helpful :bow:

Nope!

The ones that connect to discord, i.e. the webhook that sends push events to Discord.

i have ~100 public repos

I’d like to put this webhook on every single public repo of mine, and would NOT like to do this manually.

Hey @thetechrobo thanks so much for the followup! I was unclear if you had any issue with a particular webhook, since your ingest endpoint (Discord) is sort of irrelevant. But I better understand now that you aren’t having any difficulty with any specific webhook event (there are many), but that you have created a repository webhook and want to apply the same, across all of your repositories.

So, we do have the ability to do this programmatically via our Webhooks API:

I hope this is helpful, but if you have any difficulty along the way, please let us know!

I suggest adding this feature to the GUI. Also maybe have an option to “auto add this webhook to all future created repos”?

Also, I’m kind of confused about how this code works:

curl \
  -X POST \
  -H "Accept: application/vnd.github.v3+json" \
  https://api.github.com/repos/octocat/hello-world/hooks \
  -d '{"config":{"url":"url","content_type":"content_type","secret":"secret","insecure_ssl":"insecure_ssl"}}'

I understand that this runs curl with a POST request. I don’t really understand the rest of it. Could you elaborate? Thanks! :smiley: