[ASM] Update WAF v1.21.0 Ruleset 1.13.3 #18338
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Auto Block PR on Code Freeze | |
on: | |
pull_request: | |
branches: | |
- 'main' | |
- 'master' | |
- 'release/**' | |
- 'hotfix/**' | |
jobs: | |
check_for_code_freeze: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
issues: read # need to read milestones | |
statuses: write # add a commit status check | |
steps: | |
- uses: octokit/request-action@v2.x | |
name: 'Get Milestones' | |
id: milestones | |
with: | |
route: GET /repos/{owner}/{repo}/milestones | |
owner: DataDog | |
repo: dd-trace-dotnet | |
state: open | |
env: | |
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
- run: | | |
set -o pipefail | |
sha="${{ github.event.pull_request.head.sha }}" | |
targetUrl="https://github.com/DataDog/dd-trace-dotnet/actions/workflows/auto_code_freeze_block_pr.yml" | |
state="success" | |
description="No code freeze is in place" | |
json=$(cat << 'ENDOFMESSAGE' | |
${{ steps.milestones.outputs.data }} | |
ENDOFMESSAGE | |
) | |
if addr=$(echo $json | jq -er '.[] | select(.title == "Code Freeze")'); then | |
state="failure" | |
description="A code freeze is in place" | |
fi | |
echo "$description, setting check status $state" | |
curl -X POST \ | |
-H "Accept: application/vnd.github.v3+json" \ | |
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ | |
"https://api.github.com/repos/DataDog/dd-trace-dotnet/statuses/$sha" \ | |
-d '{"state":"'"$state"'","context":"code_freeze","description":"'"$description"'","target_url":"'"$targetUrl"'"}' | |
name: 'Check Code Freeze status' |