Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
protected bound(scope: Construct, stage: codepipeline.IStage, _options: codepipeline.ActionBindOptions):
codepipeline.ActionConfig {
if (!this.props.trigger || this.props.trigger === GitHubTrigger.WEBHOOK) {
new codepipeline.CfnWebhook(scope, 'WebhookResource', {
authentication: 'GITHUB_HMAC',
authenticationConfiguration: {
secretToken: this.props.oauthToken.toString(),
},
filters: [
{
jsonPath: '$.ref',
matchEquals: 'refs/heads/{Branch}',
},
],
targetAction: this.actionProperties.actionName,
targetPipeline: stage.pipeline.pipelineName,
targetPipelineVersion: 1,
registerWithThirdParty: true,
});
}