Skip to content

[datadog_sensitive_data_scanner_rule] Handle empty string for excluded_namespaces #2489

[datadog_sensitive_data_scanner_rule] Handle empty string for excluded_namespaces

[datadog_sensitive_data_scanner_rule] Handle empty string for excluded_namespaces #2489

Workflow file for this run

name: "Ensure labels"
on: # yamllint disable-line rule:truthy
pull_request:
types:
- labeled
- unlabeled
- opened
- synchronize
- reopened
- ready_for_review
- edited
jobs:
changelog:
runs-on: ubuntu-latest
steps:
- name: Check changelog label
if: github.event.pull_request.draft == false && false == contains(join(github.event.pull_request.labels.*.name, ','), 'changelog/')
run: |-
echo "::error::Add 'changelog/*' label";
exit 1;
- name: Get GitHub App token
id: get_token
uses: tibdex/github-app-token@v1
with:
app_id: ${{ secrets.PIPELINE_GITHUB_APP_ID }}
private_key: ${{ secrets.PIPELINE_GITHUB_APP_PRIVATE_KEY }}
- name: Check PR title
if: github.event.pull_request.draft == false && false == contains(join(github.event.pull_request.labels.*.name, ','), 'changelog/note') && false == contains(join(github.event.pull_request.labels.*.name, ','), 'changelog/no-changelog')
uses: actions/github-script@v6
with:
github-token: ${{ steps.get_token.outputs.token }}
script: |
const re = new RegExp('\\[\\w+\\] \\w+');
const title = context.payload.pull_request.title;
if (!re.test(title)) {
core.setFailed("Invalid title format: use '[resource_name] Description'");
}