crooked-pillow-11944
10/04/2021, 1:03 AM# Export GitHub Token to provision the Webhook
secrets = pulumi.StackReference('mystack')
github_token_secret = secrets.get_output("github_token")
github_provider = github.Provider(resource_name='github_provider', token=github_token_secret)
# Register webhook
webhook = github.RepositoryWebhook('my-webhook',
repository='my-repo',
configuration=github.RepositoryWebhookConfigurationArgs(
url=apigw.api_endpoint,
content_type="json",
insecure_ssl=False,
),
active=True,
events=["pull_request"],
opts=pulumi.ResourceOptions(provider=github_provider))