(@aws-cdk/aws-codestarnotifications): CodeCommit repository not supported as source for Notification Rule
See original GitHub issueCurrently @aws-cdk/aws-codestarnotifications module does not seem to support using repository as the source. However, this does appear to be supported in Cloudformation. From the CDK api docs: “Currently, Supported sources include pipelines in AWS CodePipeline and build projects in AWS CodeBuild in this L2 constructor.”
and from CloudFormation template reference: “Supported resources include pipelines in AWS CodePipeline, repositories in AWS CodeCommit, and build projects in AWS CodeBuild.”
In the console notification rules can easily be created for repository events and sent to SNS or Chatbot targets. I would like to replicate that with the CDK.
Environment
- CDK CLI Version: 1.109.0
- Module Version: 1.109.0
- Node.js Version: 14.17.0
- OS: Windows 10
- Language (Version): 4.3.4
Other information
According to CloudFormation, an ARN is required, however re-creating an ARN won’t work INotificationRuleSource
won’t accept a string. Ideally it should work something like this:
const repositoryNotification = new NotificationRule(this, 'PullRequestNotificationRule', {
source: repository.repositoryArn,
events: [
'codecommit-repository-pull-request-created',
'codecommit-repository-pull-request-merged'
],
targets: [chatbot],
detailType: DetailType.FULL,
notificationRuleName: 'pull-request-status'
})
repositoryNotification.addTarget(chatbot)
Issue Analytics
- State:
- Created 2 years ago
- Comments:16 (15 by maintainers)
Top GitHub Comments
@luckily Back in business. I followed the blog post you referenced and used WSL2 on WIndows. Got the environment working. Now I can go back to working on the code.
⚠️COMMENT VISIBILITY WARNING⚠️
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.