GitHub Webhook configuration
a github webhook enables to receive notifications dynamically (as relevant events occur) when specified events occur, github sends an http post payload to the webhook's configured url supports this capability as a necessary complement to github use the procedures in the following sections to create the github webhook necessary to receive these notifications setup instructions for your organization/repository prerequisite requirements administrator access to the github repository a server or service endpoint that can receive webhook payloads https endpoint for secure webhook delivery you must create a secret token use the following procedure to create a secret token navigate to tools configuration switch to bring your own tools in the create new token tab, select token type as webhooks press the create button to generate the token after confirming the prerequiste requirements, decide whether you want to set up events for all repositories in your organization or choose individual repositories create a webhook at the organization level to cover all repositories, or at the repository level for specific repos organization level setup use the following procedure to set up a github webhook for your organization (compare at repository level setup immediately following this procedure) navigate to your repository on github (or organization in the event you prefer to set up an organization level hook) click on settings > webhooks click add webhook configure the following settings payload url the url of your endpoint (must be https for production) the url would the tenant host along with "/dash/api/broker/v1/webhook/collector" content type application/json secret set a secure secret to validate webhook payloads events choose which events should trigger the webhook choose from the following code scanning alerts dependabot alerts deployment statuses issue comments issues meta member organizations (only for org hooks) pull request review comments pull request reviews pull requests pushes workflow jobs workflow runs active check this box to enable the webhook click add webhook to save repository level setup a repository level webhook is required whether you have an organizational level webhook if you have set up an organization webhook, you must still perform the setup procedure for specific repositories that will be in use the procedure is the same for organization level setup with two exceptions in the events options there is no organization option repository setup contains an additional option, collaborator add remove changed to begin repository level setup navigate to the repository for which you set a webhook, and follow the procedure described for organizational setup setup github workflow for retrying failed events all events processed by your endpoint are displayed on the github webhook page if your tenant is temporarily unavailable, those events will not be processed github tracks each event and its status github integration includes support for retrying failed events you can implement this feature at the organizational level or the repository level implementing it at the organizational level enables retries at the repository level for repositories associated with that organization to implement event retrying at the organizational level, create a workflow file using the latest workflow repository file as a guide the workflow file path takes the following form https //github kyndryl net/mcmp devops intelligence/devops reusable workflow the following variables are necessary organization name the name of your github organization repo name the name of your github repository (if you are creating workflow for any repository) hook id the unique identifier for the webhook you want to retry you would get this id in the url when you edit the created hook hostname the base url for your github enterprise or api endpoint webhook token a secret token stored in your repository or organization secrets, used for authentication token of type webhooks can be used only once in a tenant if you have already generated use the existing token troubleshooting if you encounter data synchronizing problems, use the following checklist to troubleshoot the fail point check webhook delivery logs in github ensure your endpoint is accessible from the internet check your server logs for errors processing the payload do not disable or skip any of the required events in the github webhook configuration disabling any required events can lead to data mismatch if a mismatch occurs due to incomplete events, the entire technical service must be deleted and re onboarded