Skip to content

Commit 6e0e176

Browse files
committed
fix linebreaks
1 parent 8a0f705 commit 6e0e176

File tree

2 files changed

+28
-6
lines changed

2 files changed

+28
-6
lines changed

.github/workflows/bootstrap-template-protection.yml

Lines changed: 14 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

projenrc/bootstrap-template-protection.ts

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,16 +115,27 @@ export class BootstrapTemplateProtection extends Component {
115115
'',
116116
'### Requirements:',
117117
'',
118-
`\${{ (steps.version-check.outputs.version-incremented == 'true' || steps.label-check.outputs.has-version-exempt-label == 'true') && (steps.version-check.outputs.version-incremented == 'true' && format('✅ **Version Incremented**: CdkBootstrapVersion updated from {0} to {1}', steps.version-check.outputs.previous-version, steps.version-check.outputs.current-version) || steps.label-check.outputs.has-version-exempt-label == 'true' && '✅ **Version Increment Exempted**: PR has the \`${VERSION_EXEMPT_LABEL}\` label') || format('❌ **Version Increment Required**: The \`CdkBootstrapVersion\` must be incremented when the template changes.\\n - Current version: {0}\\n - Previous version: {1}\\n - Please increment the version in the \`CdkBootstrapVersion\` parameter value.\\n - Or add the \`${VERSION_EXEMPT_LABEL}\` label if version increment is not needed.', steps.version-check.outputs.current-version, steps.version-check.outputs.previous-version) }}`,
118+
'**Version Increment:**',
119+
'${{ steps.version-check.outputs.version-incremented == \'true\' && format(\'✅ Version incremented from {0} to {1}\', steps.version-check.outputs.previous-version, steps.version-check.outputs.current-version) || \'\' }}',
120+
`\${{ steps.label-check.outputs.has-version-exempt-label == 'true' && format('✅ Version increment exempted (\`{0}\` label)', '${VERSION_EXEMPT_LABEL}') || '' }}`,
121+
'${{ steps.version-check.outputs.version-incremented != \'true\' && steps.label-check.outputs.has-version-exempt-label != \'true\' && \'❌ Version increment required:\' || \'\' }}',
122+
'${{ steps.version-check.outputs.version-incremented != \'true\' && steps.label-check.outputs.has-version-exempt-label != \'true\' && format(\' - Current version: {0}\', steps.version-check.outputs.current-version) || \'\' }}',
123+
'${{ steps.version-check.outputs.version-incremented != \'true\' && steps.label-check.outputs.has-version-exempt-label != \'true\' && format(\' - Previous version: {0}\', steps.version-check.outputs.previous-version) || \'\' }}',
124+
'${{ steps.version-check.outputs.version-incremented != \'true\' && steps.label-check.outputs.has-version-exempt-label != \'true\' && \' - Please increment the version in `CdkBootstrapVersion`\' || \'\' }}',
125+
`\${{ steps.version-check.outputs.version-incremented != 'true' && steps.label-check.outputs.has-version-exempt-label != 'true' && format(' - Or add the \`{0}\` label if not needed', '${VERSION_EXEMPT_LABEL}') || '' }}`,
119126
'',
120-
`\${{ steps.label-check.outputs.has-security-label == 'true' && '✅ **Security Review Complete**: PR has the required \`${SECURITY_REVIEWED_LABEL}\` label' || '❌ **Security Review Required**: This PR must have the \`${SECURITY_REVIEWED_LABEL}\` label.\\n - A maintainer will conduct a security review\\n - Once reviewed, they will add the \`${SECURITY_REVIEWED_LABEL}\` label' }}`,
127+
'**Security Review:**',
128+
`\${{ steps.label-check.outputs.has-security-label == 'true' && format('✅ Security review complete (\`{0}\` label)', '${SECURITY_REVIEWED_LABEL}') || '' }}`,
129+
'${{ steps.label-check.outputs.has-security-label != \'true\' && \'❌ Security review required:\' || \'\' }}',
130+
'${{ steps.label-check.outputs.has-security-label != \'true\' && \' - A maintainer will conduct a security review\' || \'\' }}',
131+
`\${{ steps.label-check.outputs.has-security-label != 'true' && format(' - Once reviewed, they will add the \`{0}\` label', '${SECURITY_REVIEWED_LABEL}') || '' }}`,
121132
'',
122133
'### Why these protections exist:',
123134
'- The bootstrap template contains critical infrastructure',
124135
'- Changes can affect IAM roles, policies, and resource access across all CDK deployments',
125136
'- Version increments ensure proper deployment coordination',
126137
'',
127-
'${{ ((steps.version-check.outputs.version-incremented == \'true\' || steps.label-check.outputs.has-version-exempt-label == \'true\') && steps.label-check.outputs.has-security-label == \'true\') && \'**All requirements met! This PR can proceed with normal review process.**\' || \'**This PR cannot be merged until all requirements are met.**\' }}',
138+
'${{ ((steps.version-check.outputs.version-incremented == \'true\' || steps.label-check.outputs.has-version-exempt-label == \'true\') && steps.label-check.outputs.has-security-label == \'true\') && \'**All requirements met! This PR can proceed with normal review process.**\' || \'**This PR cannot be merged until all requirements are met.**\' }}',
128139
].join('\n'),
129140
},
130141
},

0 commit comments

Comments
 (0)