Skip to content

Latest commit

 

History

History
70 lines (52 loc) · 3.02 KB

File metadata and controls

70 lines (52 loc) · 3.02 KB

Sample GCP Cloud Function Webhook Receiver

Table of Contents
  1. About The Project
  2. Deployment
  3. License

About The Project

This repo contains a sample Google Cloud Function written for Python 3.8 that catches Github Organization webhook events. This sample looks for 'Repository Created" events specifically and automates creating a first issue and enabling branch protection for the default branch. The main.py file exposes a single python function which is configured to receive JSON formatted webhook data as a built-in Flask request object.

(back to top)

Built With

(back to top)

Deployment

The easiest way to deploy is to use the gcloud CLI. Install and configure the gcloud CLI for your OS: GCloud install. Then run the following from within the project root directory:

gcloud functions deploy github_weboook \
--runtime python38 --trigger-http --allow-unauthenticated

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)