cdk-pipelines-github
cdk-pipelines-github copied to clipboard
diffProtection can't be disabled with `--context` option
AFAIK it is not possible to pass typed context values using --context
. See also https://github.com/aws/aws-cdk/issues/2204.
This makes it impossible to get past the check at https://github.com/cdklabs/cdk-pipelines-github/blob/main/src/pipeline.ts#L300-L301:
const diffProtection = this.node.tryGetContext('cdk-pipelines-github:diffProtection') ?? true;
if (diffProtection && process.env.GITHUB_WORKFLOW === this.workflowName) {
I suggest to also allow string values ("false"
) to disable the check.