Skip to content

Commit 9c3ce7f

Browse files
authored
feat(aws-codepipeline, aws-codecommit, aws-s3): change the convention for naming the source Actions to XxxSourceAction. (#753)
BREAKING CHANGE: change the names of the source Actions from XxxSource to XxxSourceAction. This is to align them with the other Actions, like Build. Also, CodeBuild has the concept of Sources, so it makes sense to strongly differentiate between the two.
1 parent 0b28886 commit 9c3ce7f

21 files changed

+51
-51
lines changed

packages/@aws-cdk/aws-codebuild/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ const pipeline = new codepipeline.Pipeline(this, 'MyPipeline');
5353
const sourceStage = new codepipeline.Stage(this, 'Source', {
5454
pipeline,
5555
});
56-
const sourceAction = new codecommit.PipelineSource(this, 'CodeCommit', {
56+
const sourceAction = new codecommit.PipelineSourceAction(this, 'CodeCommit', {
5757
stage: sourceStage,
5858
artifactName: 'SourceOutput',
5959
repository,

packages/@aws-cdk/aws-codebuild/lib/project.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export abstract class ProjectRef extends cdk.Construct implements events.IEventR
8787
* @param stage the Pipeline Stage to add the new Action to
8888
* @param name the name of the newly created Action
8989
* @param props the properties of the new Action
90-
* @returns the newly created {@link PipelineSource} Action
90+
* @returns the newly created {@link PipelineBuildAction} build Action
9191
*/
9292
public addBuildToPipeline(stage: codepipeline.IStage, name: string, props: CommonPipelineBuildActionProps): PipelineBuildAction {
9393
return new PipelineBuildAction(this.parent!, name, {

packages/@aws-cdk/aws-codecommit/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const pipeline = new codepipeline.Pipeline(this, 'MyPipeline', {
4141
const sourceStage = new codepipeline.Stage(this, 'Source', {
4242
pipeline,
4343
}));
44-
const sourceAction = new codecommit.PipelineSource(this, 'CodeCommit', {
44+
const sourceAction = new codecommit.PipelineSourceAction(this, 'CodeCommit', {
4545
stage: sourceStage,
4646
artifactName: 'SourceOutput', // name can be arbitrary
4747
repository,

packages/@aws-cdk/aws-codecommit/lib/pipeline-action.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import cdk = require('@aws-cdk/cdk');
33
import { RepositoryRef } from './repository';
44

55
/**
6-
* Common properties for creating {@link PipelineSource} -
6+
* Common properties for creating {@link PipelineSourceAction} -
77
* either directly, through its constructor,
88
* or through {@link RepositoryRef#addToPipeline}.
99
*/
10-
export interface CommonPipelineSourceProps {
10+
export interface CommonPipelineSourceActionProps {
1111
/**
1212
* The name of the source's output artifact.
1313
* Output artifacts are used by CodePipeline as inputs into other actions.
@@ -29,9 +29,9 @@ export interface CommonPipelineSourceProps {
2929
}
3030

3131
/**
32-
* Construction properties of the {@link PipelineSource CodeCommit source CodePipeline Action}.
32+
* Construction properties of the {@link PipelineSourceAction CodeCommit source CodePipeline Action}.
3333
*/
34-
export interface PipelineSourceProps extends CommonPipelineSourceProps, codepipeline.CommonActionProps {
34+
export interface PipelineSourceActionProps extends CommonPipelineSourceActionProps, codepipeline.CommonActionProps {
3535
/**
3636
* The CodeCommit repository.
3737
*/
@@ -41,8 +41,8 @@ export interface PipelineSourceProps extends CommonPipelineSourceProps, codepipe
4141
/**
4242
* CodePipeline Source that is provided by an AWS CodeCommit repository.
4343
*/
44-
export class PipelineSource extends codepipeline.SourceAction {
45-
constructor(parent: cdk.Construct, name: string, props: PipelineSourceProps) {
44+
export class PipelineSourceAction extends codepipeline.SourceAction {
45+
constructor(parent: cdk.Construct, name: string, props: PipelineSourceActionProps) {
4646
super(parent, name, {
4747
stage: props.stage,
4848
provider: 'CodeCommit',

packages/@aws-cdk/aws-codecommit/lib/repository.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import actions = require('@aws-cdk/aws-codepipeline-api');
22
import events = require('@aws-cdk/aws-events');
33
import cdk = require('@aws-cdk/cdk');
44
import { cloudformation } from './codecommit.generated';
5-
import { CommonPipelineSourceProps, PipelineSource } from './pipeline-action';
5+
import { CommonPipelineSourceActionProps, PipelineSourceAction } from './pipeline-action';
66

77
/**
88
* Properties for the {@link RepositoryRef.import} method.
@@ -56,16 +56,16 @@ export abstract class RepositoryRef extends cdk.Construct {
5656
}
5757

5858
/**
59-
* Convenience method for creating a new {@link PipelineSource} Action,
59+
* Convenience method for creating a new {@link PipelineSourceAction},
6060
* and adding it to the given Stage.
6161
*
6262
* @param stage the Pipeline Stage to add the new Action to
6363
* @param name the name of the newly created Action
6464
* @param props the properties of the new Action
65-
* @returns the newly created {@link PipelineSource} Action
65+
* @returns the newly created {@link PipelineSourceAction}
6666
*/
67-
public addToPipeline(stage: actions.IStage, name: string, props: CommonPipelineSourceProps): PipelineSource {
68-
return new PipelineSource(this.parent!, name, {
67+
public addToPipeline(stage: actions.IStage, name: string, props: CommonPipelineSourceActionProps): PipelineSourceAction {
68+
return new PipelineSourceAction(this.parent!, name, {
6969
stage,
7070
repository: this,
7171
...props,

packages/@aws-cdk/aws-codepipeline-api/lib/action.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export interface ActionProps extends CommonActionProps {
9797

9898
/**
9999
* Low-level class for generic CodePipeline Actions.
100-
* It is recommended that concrete types are used instead, such as {@link codecommit.PipelineSource} or
100+
* It is recommended that concrete types are used instead, such as {@link codecommit.PipelineSourceAction} or
101101
* {@link codebuild.PipelineBuildAction}.
102102
*/
103103
export abstract class Action extends cdk.Construct {

packages/@aws-cdk/aws-codepipeline-api/lib/source-action.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ export interface SourceActionProps extends CommonActionProps {
4444
/**
4545
* Low-level class for source actions.
4646
* It is recommended that concrete types are used instead,
47-
* such as {@link s3.PipelineSource} or
48-
* {@link codecommit.PipelineSource}.
47+
* such as {@link s3.PipelineSourceAction} or
48+
* {@link codecommit.PipelineSourceAction}.
4949
*/
5050
export abstract class SourceAction extends Action {
5151
public readonly artifact: Artifact;

packages/@aws-cdk/aws-codepipeline/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const sourceStage = pipeline.addStage('Source', {
3434
Add an Action to a Stage:
3535

3636
```ts
37-
new codecommit.PipelineSource(this, 'Source', {
37+
new codecommit.PipelineSourceAction(this, 'Source', {
3838
stage: sourceStage,
3939
artifactName: 'MyPackageSourceArtifact',
4040
repository: codecommit.RepositoryRef.import(this, 'MyExistingRepository', {

packages/@aws-cdk/aws-codepipeline/lib/github-source-action.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import actions = require('@aws-cdk/aws-codepipeline-api');
22
import cdk = require('@aws-cdk/cdk');
33

44
/**
5-
* Construction properties of the {@link GitHubSource GitHub source action}.
5+
* Construction properties of the {@link GitHubSourceAction GitHub source action}.
66
*/
7-
export interface GitHubSourceProps extends actions.CommonActionProps {
7+
export interface GitHubSourceActionProps extends actions.CommonActionProps {
88
/**
99
* The name of the source's output artifact. Output artifacts are used by CodePipeline as
1010
* inputs into other actions.
@@ -51,8 +51,8 @@ export interface GitHubSourceProps extends actions.CommonActionProps {
5151
/**
5252
* Source that is provided by a GitHub repository.
5353
*/
54-
export class GitHubSource extends actions.SourceAction {
55-
constructor(parent: cdk.Construct, name: string, props: GitHubSourceProps) {
54+
export class GitHubSourceAction extends actions.SourceAction {
55+
constructor(parent: cdk.Construct, name: string, props: GitHubSourceActionProps) {
5656
super(parent, name, {
5757
stage: props.stage,
5858
owner: 'ThirdParty',

packages/@aws-cdk/aws-codepipeline/lib/pipeline.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export interface PipelineProps {
3737
* const sourceStage = new Stage(pipeline, 'Source');
3838
*
3939
* // add a source action to the stage
40-
* new codecommit.PipelineSource(sourceStage, 'Source', {
40+
* new codecommit.PipelineSourceAction(sourceStage, 'Source', {
4141
* artifactName: 'SourceArtifact',
4242
* repository: repo,
4343
* });

0 commit comments

Comments
 (0)