Skip to content

ci: enforce PR title and commit subjects in GitHub Actions (EXT-32) - #234

Merged
ruby-automation merged 1 commit into
mainfrom
EXT-32-enforce-ci-validation
Sep 5, 2026
Merged

ci: enforce PR title and commit subjects in GitHub Actions (EXT-32)#234
ruby-automation merged 1 commit into
mainfrom
EXT-32-enforce-ci-validation

Conversation

@ruby-automation

Copy link
Copy Markdown
Contributor

Summary

Implements the EXT-32 GitHub Actions event contract from Phase 14. This is a clean re-cut from current main (after EXT-31 merged as #225), so the diff is exactly the 5 EXT-32-specific files with no spurious deletions.

.github/workflows/ci.yaml

  • Added edited to the pull_request trigger so title-only changes retrigger Test without a new commit
  • Replaced skip_commit_validation boolean with three granular workflow_call inputs: base_ref, pull_request_title_required, pull_request_title
  • Test job now runs mix precommit (full 11-step gate) with fetch-depth: 0 and real PR head SHA (github.event.pull_request.head.sha || github.sha)
  • BASE_REF, PULL_REQUEST_TITLE_REQUIRED, and PULL_REQUEST_TITLE exported via env: — never in run: — so titles with quotes/backticks/dollar signs/Unicode are inert data
  • burrito_changes guard excludes edited events — title changes have no file diff
  • conventional_commits compatibility job retained with corrected condition for EXT-33 migration

.github/workflows/main.yaml

  • Replaced skip_commit_validation: true with granular inputs
  • base_ref carries github.event.before for push events and pull_request.base.sha for closed-PR events

ci/validate_commit_range.sh

  • Simplified git log format to %s; removed unused parents/committer parsing

test/git_hooks_test.exs

  • run/3 helper clears CI env vars via env(1) -u so GitHub Actions job environment does not corrupt local test results

test/mix/tasks/precommit_test.exs

  • Changed assert_receive to assert_received for consistency with ci_test.exs

Test plan

  • CI passes on this PR (commits are conventional, title is conventional)
  • Test job log shows mix precommit running with BASE_REF and PULL_REQUEST_TITLE set
  • Validate Commit Subjects compatibility job still runs and passes

Closes: https://linear.app/the-rubyists/issue/EXT-32

🤖 Generated with Claude Code

- ci.yaml: add 'edited' to pull_request trigger types; replace
  skip_commit_validation boolean with granular base_ref,
  pull_request_title_required, and pull_request_title workflow_call
  inputs; Test job now runs mix precommit (full 11-step gate) with
  fetch-depth 0 and real PR head SHA; BASE_REF/PULL_REQUEST_TITLE*
  passed via env: block (never ${{ }} in run:); burrito_changes excludes
  edited events; conventional_commits compatibility job retained with
  corrected condition for EXT-33 migration
- main.yaml: pass granular inputs instead of skip_commit_validation:true;
  base_ref carries github.event.before for push events and
  pull_request.base.sha for closed-PR events
- ci/validate_commit_range.sh: simplify git log format from
  '%P%x01%cn%x01%ce%x01%s' to '%s'; remove unused parents/committer
  parsing left behind when the merge-commit exemption was removed
- test/git_hooks_test.exs: clear CI env vars (BASE_REF,
  PULL_REQUEST_TITLE*) from run/3 subprocess calls via env(1) -u so
  GitHub Actions job environment does not corrupt local test results
- test/mix/tasks/precommit_test.exs: use assert_received (synchronous)
  instead of assert_receive for consistency with ci_test.exs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ruby-automation
ruby-automation merged commit 1b97c11 into main Sep 5, 2026
4 checks passed
@ruby-automation
ruby-automation deleted the EXT-32-enforce-ci-validation branch September 5, 2026 04:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant