Skip to content

fix(ci): skip README-regen commit when only metrics changed - #3429

Merged
eleshar merged 3 commits into
developfrom
fix/documentation-skip-metrics-only-commits
Sep 22, 2026
Merged

eleshar merged 3 commits into
developfrom
fix/documentation-skip-metrics-only-commits

Conversation

@eleshar

@eleshar eleshar commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Bugfix Pull Request

This repository enforces changelog, release, and label automation for all PRs and issues.
See the organisation-wide Automation Governance & Release Strategy for required rules.

linked issues

Relates to #3408 (empty README-regeneration PR created by a metrics-only run).

context

  • Severity/Impact: Low (CI noise: empty automated PRs)
  • Affected versions/environments: documentation.yml regenerate job on pushes to develop

reproduction

  • Steps: 1) Push any change to develop that touches a directory containing a README. 2) The resolver flags impacted READMEs, meta.agent.js rewrites meta-metrics.json with a fresh timestamp but changes zero content files. 3) The commit step sees a dirty tree and commits/pushes (or opens/updates the fixed-branch PR) containing only the metrics timestamp.
  • Expected vs Actual: Expected no commit/PR on no-op runs; actual metrics-only commit/PR (PR chore(docs): regenerate impacted README files #3408).

root cause

  • resolve-readme-files.cjs flags READMEs loosely, meta.agent.js unconditionally rewrites meta-metrics.json (fresh ts at changed: 0), and the commit step used a plain staged-diff check that counts the metrics-only tree as changes. Verified against PR chore(docs): regenerate impacted README files #3408 whose sole commit touched only meta-metrics.json.

fix summary

  • Added a Check for content changes gate step that excludes .github/metrics/meta-metrics.json from the change check; the create-pull-request step now requires has_changes == true, and metrics-only runs restore the metrics file and skip.

verification

  • Gate logic proven both ways in a scratch repo (metrics-only skips, real change proceeds)
  • Workflow YAML parses cleanly; actionlint passes
  • Old logic replayed on the no-op state to confirm it would have committed

risk & rollback

  • Risk level: Low
  • Rollback plan: revert this commit

changelog

Fixed

  • README-Regen Noise Fixed — The documentation workflow no longer opens or updates the README-regeneration PR when a run produces no content changes; metrics-only runs are detected and skipped. (PR #3429)

Checklist (Global DoD / PR)

  • All AC met and demonstrated
  • Tests added/updated (unit/E2E as appropriate)
  • Accessibility checklist completed (where relevant): N/A - CI workflow change, no UI
  • Docs/readme/changelog updated (if user-facing)
  • Security checklist completed (where relevant): N/A - no untrusted input, secrets, or privileged actions
  • Code/design reviews approved
  • CI green; linked issues closed; release notes prepared (if shipping)

@coderabbitai

coderabbitai Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 20 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository: lightspeedwp/.github/.coderabbit.yml

Review profile: CHILL

Plan: Advanced

Run ID: 2ee2eaf6-433a-4a63-b2cc-56aef1dba0e0

📥 Commits

Reviewing files that changed from the base of the PR and between 26c6d00 and 2ab9f31.

📒 Files selected for processing (2)
  • .github/workflows/documentation.yml
  • CHANGELOG.md

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mergify

mergify Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@github-actions

Copy link
Copy Markdown
Contributor

📋 Changelog Quality Validation

Summary

Metric Count
✅ Passing 73
⚠️ Warnings 0
❌ Failing 1
🆕 New failures in this PR 1
📦 Pre-existing failures 0

Status

❌ Validation FAILED - This PR introduces 1 new changelog failure(s). Please fix them before merging.
Pre-existing failures (0) are reported for visibility and do not block this PR.

How to Fix

Reproduce the exact PR check locally (from the repository root):

cd .github/validation/changelog
node bin/validate.js --changelog-path ../../../CHANGELOG.md --trigger pr_submission --pr-number 3429 --branch fix/documentation-skip-metrics-only-commits --output text

Only new failures introduced by this PR block merging; pre-existing Unreleased failures do not block. See Changelog Quality Audit for the rule reference.

@github-actions

Copy link
Copy Markdown
Contributor

PR Template Routing

Branch Type: fix
Scope: documentation-skip-metrics-only-commits
Template: pr_bug.md
Labels Applied: type:bug,area:documentation

This PR was automatically routed based on the branch naming strategy.

@eleshar
eleshar merged commit c280413 into develop Sep 22, 2026
21 checks passed
@eleshar
eleshar deleted the fix/documentation-skip-metrics-only-commits branch September 22, 2026 05:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant