def upload_to_gcs()

in webhook/storage.py [0:0]


def upload_to_gcs(bucket: str, name: str, data: str):
    """Upload a string to Google Cloud Storage bucket.

    Args:
      bucket (str): the name of the Storage bucket. Do not include "gs://"
      name (str): the name of the file to create in the bucket
      data (str): the data to store

    """
    client = storage.Client()
    bucket = client.get_bucket(bucket)
    blob = bucket.blob(name)
    blob.upload_from_string(data)