JSPM

@aws-cdk/aws-codecommit

0.8.0+bb95676
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 28311
  • Score
    100M100P100Q22076F
  • License Apache-2.0

CDK Constructs for AWS CodeCommit

Package Exports

  • @aws-cdk/aws-codecommit

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@aws-cdk/aws-codecommit) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

AWS CodeCommit Construct Library

To add a CodeCommit Repository to your stack:

import codecommit = require('@aws-cdk/aws-codecommit');

const repository = new codecommit.Repository(stack, 'Repository' ,{
    repositoryName: 'MyRepositoryName'
});

To add an SNS trigger to your repository:

import codecommit = require('@aws-cdk/aws-codecommit');

const repository = new codecommit.Repository(stack, 'Repository', {
    repositoryName: 'MyRepositoryName'
});

// trigger is established for all repository actions on all branches by default.
repository.notify('arn:aws:sns:*:123456789012:my_topic');

Events

CodeCommit repositories emit CloudWatch events for certain activity. Use the repo.onXxx methods to define rules that trigger on these events and invoke targets as a result:

// starts a CodeBuild project when a commit is pushed to the "master" branch of the repo
repo.onCommit('CommitToMaster', project, 'master');

// publishes a message to an SNS topic when a comment is made on a pull request
const rule = repo.onCommentOnPullRequest('CommentOnPullRequest');
rule.addTarget(myTopic);