diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 39fb10d..9fa9522 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -28,6 +28,9 @@ jobs: run: python3 scripts/session_handover_check.py --strict - name: Validate governance assets + env: + GOVERNANCE_PR_TITLE: ${{ github.event.pull_request.title }} + GOVERNANCE_PR_BODY: ${{ github.event.pull_request.body }} run: | RANGE="" if [ "${{ github.event_name }}" = "pull_request" ] && [ -n "${{ github.event.pull_request.base.sha }}" ]; then diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6560a1c..da84fc7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,11 +29,13 @@ jobs: GOVERNANCE_PR_TITLE: ${{ github.event.pull_request.title }} GOVERNANCE_PR_BODY: ${{ github.event.pull_request.body }} run: | + RANGE="" if [ "${{ github.event_name }}" = "pull_request" ]; then RANGE="${{ github.event.pull_request.base.sha }}...${{ github.sha }}" - python3 scripts/validate_governance_assets.py "$RANGE" - elif [ "${{ github.event_name }}" = "push" ]; then + elif [ "${{ github.event_name }}" = "push" ] && [ "${{ github.event.before }}" != "0000000000000000000000000000000000000000" ]; then RANGE="${{ github.event.before }}...${{ github.sha }}" + fi + if [ -n "$RANGE" ]; then python3 scripts/validate_governance_assets.py "$RANGE" else python3 scripts/validate_governance_assets.py