I'm trying to trigger a CodePipeline Build when someone makes a commit to an AWS Codecommit branch. This works if I target the master branch with a pattern like this:
{
"detail": {
"referenceName": ["master"],
"referenceType": ["branch"]
},
"detail-type": ["CodeCommit Repository State Change"],
"resources": ["arn:aws:codecommit:region:1234:repo-name"],
"source": ["aws.codecommit"]
}
But it does not work when I try to match any branch that starts with the "release" string, as per documentation from here:
{
"detail": {
"referenceName": [{
"prefix": "release/"
}],
"referenceType": ["branch"]
},
"detail-type": ["CodeCommit Repository State Change"],
"resources": ["arn:aws:codecommit:region:1234:repo-name"],
"source": ["aws.codecommit"]
}
Is there another way I can match a branch with a pattern name?