Added optional EnableSQLValidationForIsValid property for isValid() to allow users to enable server-side SQL validation #13
Workflow file for this run
This file contains hidden or 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: Enforce Release Freeze | |
| on: | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| freeze-check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Set up jq | |
| run: sudo apt-get update && sudo apt-get install -y jq | |
| - name: Enforce branch freeze logic | |
| shell: bash | |
| env: | |
| # GITHUB_HEAD_REF: Source branch name for PRs | |
| PR_BRANCH: ${{ github.head_ref }} | |
| run: | | |
| CONFIG_FILE="development/.release-config.json" | |
| if [[ ! -f "$CONFIG_FILE" ]]; then | |
| echo "✅ No release config file - passing check." | |
| exit 0 | |
| fi | |
| FREEZE=$(jq '.freeze' "$CONFIG_FILE") | |
| if [[ "$FREEZE" != "true" ]]; then | |
| echo "✅ Freeze is off - passing check." | |
| exit 0 | |
| fi | |
| ALLOW_LIST=( $(jq -r '.allow_list[]' "$CONFIG_FILE") ) | |
| BRANCH="$PR_BRANCH" | |
| ALLOWED=0 | |
| # Check for exact branch name in allow_list | |
| for ENTRY in $(jq -r '.allow_list[]' "$CONFIG_FILE"); do | |
| if [[ "$BRANCH" == "$ENTRY" ]]; then | |
| ALLOWED=1 | |
| break | |
| fi | |
| done | |
| if [[ "$ALLOWED" == "1" ]]; then | |
| echo "✅ Branch '$BRANCH' is in allow_list. Passing check." | |
| exit 0 | |
| else | |
| echo "❌ Release freeze is ACTIVE!" | |
| REASON=$(jq -r '.reason' "$CONFIG_FILE") | |
| echo "Reason: $REASON" | |
| echo "Branch '$BRANCH' is NOT permitted to merge under current freeze rules." | |
| exit 1 | |
| fi |