Skip to content

Commit c4a9b74

Browse files
authored
fix(aws-ecr): add the addToPipeline method to IRepository. (#1329)
This is required in order to use the `addToPipeline` method on imported Repositories.
1 parent cb1aed9 commit c4a9b74

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

packages/@aws-cdk/aws-ecr/lib/repository-ref.ts

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,18 @@ export interface IRepository {
4040
*/
4141
addToResourcePolicy(statement: iam.PolicyStatement): void;
4242

43+
/**
44+
* Convenience method for creating a new {@link PipelineSourceAction},
45+
* and adding it to the given Stage.
46+
*
47+
* @param stage the Pipeline Stage to add the new Action to
48+
* @param name the name of the newly created Action
49+
* @param props the optional construction properties of the new Action
50+
* @returns the newly created {@link PipelineSourceAction}
51+
*/
52+
addToPipeline(stage: codepipeline.IStage, name: string, props?: CommonPipelineSourceActionProps):
53+
PipelineSourceAction;
54+
4355
/**
4456
* Grant the given principal identity permissions to perform the actions on this repository
4557
*/
@@ -161,15 +173,6 @@ export abstract class RepositoryBase extends cdk.Construct implements IRepositor
161173
};
162174
}
163175

164-
/**
165-
* Convenience method for creating a new {@link PipelineSourceAction},
166-
* and adding it to the given Stage.
167-
*
168-
* @param stage the Pipeline Stage to add the new Action to
169-
* @param name the name of the newly created Action
170-
* @param props the optional construction properties of the new Action
171-
* @returns the newly created {@link PipelineSourceAction}
172-
*/
173176
public addToPipeline(stage: codepipeline.IStage, name: string, props: CommonPipelineSourceActionProps = {}):
174177
PipelineSourceAction {
175178
return new PipelineSourceAction(this, name, {

0 commit comments

Comments
 (0)