good morning
I’m looking to add a webhook generated via a discord bot directly to the creation of a repo on a team. Is this possible because I haven’t seen an example in the github doc.
here is my code:
const request = await fetch(newUrl, {
headers: {
"Accept": "application/vnd.github+json",
'authorization': 'Bearer ' + getStringEnv("GITHUB_TOKEN"),
'content-type': 'application/json',
'X-GitHub-Api-Version': '2022-11-28'
},
method: "POST",
body: JSON.stringify({
name: name,
description: description,
private: true
})
})
console.log(await request.json())
}catch (e){
console.log(e)
}
I tried to read the documentation at this url as well as all that can be said about webhooks:
https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads