Skip to content

Implemented democratic voting process for project decisions #3

Implemented democratic voting process for project decisions

Implemented democratic voting process for project decisions #3

name: Validate Decision Records
on:
pull_request:
paths:
- "decisions/**.md"
permissions:
contents: read
pull-requests: write
jobs:
validate:
name: Validate decision record format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Find changed decision records
id: changed
run: |
files=$(git diff --name-only origin/${{ github.base_ref }}...HEAD -- 'decisions/*.md' | tr '\n' ' ')
echo "files=$files" >> $GITHUB_OUTPUT
- name: Validate records
if: steps.changed.outputs.files != ''
run: python .github/scripts/validate_decision.py ${{ steps.changed.outputs.files }}
- name: Post validation failure comment
if: failure()
uses: actions/github-script@v7
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: "❌ **Decision record validation failed.**\n\nPlease check the workflow logs and ensure your `decisions/*.md` file follows the required template. See `VOTING.md` for the template."
})