Skip to content

Merge pull request #65 from SpillwaveSolutions/feat/noun-ownership-split #155

Merge pull request #65 from SpillwaveSolutions/feat/noun-ownership-split

Merge pull request #65 from SpillwaveSolutions/feat/noun-ownership-split #155

Workflow file for this run

name: worklog-invariants
on: [push, pull_request]
jobs:
invariants:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
# Same script as the local hook: trailing newline, event schema,
# roadmap freshness. A dev can --no-verify past the local hook; not
# this. WORKLOG_SKIP_BRANCH_GUARD: this step runs on whatever ref was
# checked out (including main on push) with no commit in flight --
# the branch guard only makes sense for an actual `git commit`.
- name: log invariants
run: WORKLOG_SKIP_BRANCH_GUARD=1 hooks/pre-commit
# The graph engine is what the plugin exists to do; nothing exercised it
# before v0.3.0. --strict so warnings gate here even though the skills
# (and okf-curate.sh) keep the lenient default.
- name: graph engine tests
run: python3 tests/test_okf_graph.py -q
# The post-edit hook shipped configured-but-never-firing for two
# releases; its test does not get to be ungated too.
- name: curate hook tests
run: bash tests/test_okf_curate.sh
- name: sample bundle stays valid
run: python3 scripts/okf-graph.py validate sample-okf --strict
# commit-msg's own MERGE_HEAD check doesn't exist post-hoc in a CI
# checkout, so re-derive "was this a merge" via --no-merges instead.
- name: commit messages reference a worklog item or ticket
if: github.event_name == 'pull_request'
run: |
base="${{ github.event.pull_request.base.sha }}"
for sha in $(git rev-list --no-merges "$base..HEAD"); do
git log -1 --format=%B "$sha" > /tmp/msg
hooks/commit-msg /tmp/msg || { echo "commit $sha:"; cat /tmp/msg; exit 1; }
done