Uh oh!
There was an error while loading. Please reload this page.
fix: Badge Health Check deduplication with smart workflow - #2029
fix: Badge Health Check deduplication with smart workflow#2029ashleyshaw wants to merge 12 commits into
Conversation
- Replace relative path references to PLANNING.md with descriptive text - Convert placeholder issue reference to documentation note - Prevents lint-and-links CI validation failures on template files These links were template placeholders and not meant to be valid file references.
Add two reusable scripts for managing PR status labels based on review state: - update-pr-changelog-review.js: Full-featured handler that fetches review data and updates labels - update-pr-labels-simple.js: Lightweight label-only updater for quick status sync These scripts automate the process of updating PR status labels (status:needs-review, status:needs-update, etc.) based on actual review progress and PR state, keeping the meta:needs-changelog workflow in sync with real review activity. Supports dry-run, interactive, and auto modes for safe and flexible deployment. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Remove unused hasStatusLabel variable from update-pr-labels-simple.js - Add comprehensive test files for both automation scripts - Update PR template with all required sections (Linked issues, Changelog, Checklist) These scripts automate PR status label updates based on review state and changelog requirements.
- update-pr-labels-simple.js: Lightweight label synchronization for CI/CD - update-pr-changelog-review.js: Full-featured PR review status tracking - Comprehensive test suites for both scripts (40+ tests total) - Dry-run, interactive, and auto modes for all operations - Rate limiting and error handling built-in Closes#1735
Add comprehensive documentation for ADR Generator agent: - adr-generator.agent.md: Core agent specification and overview - docs/INSTALLATION.md: Setup guide for all repository contexts - docs/CONFIGURATION_REFERENCE.md: Complete configuration reference - docs/BEST_PRACTICES.md: Guidelines for writing effective ADRs - docs/ARCHITECTURE.md: System design, components, and data flows All 88 tests passing. Phase 1C (Agent, Skills, Tests & Documentation) complete. Related: #1831 — ADR Agent Phase 1C Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
…RAINING.md - Added blank lines before headings (MD022) - Added blank lines before lists (MD032) - Added blank lines before code fences (MD031) - Wrapped bare URLs in markdown links (MD034) - Fixed list item code block indentation This resolves all linting violations blocking PR #2013 merge. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Changed vitest imports to @jest/globals for jest compatibility - Fixed overly defensive test assertion in update-pr-changelog-review.test.js - Changed expect(reviews === null || ...) to expect(reviews).toBeNull() - Ensures tests run with project's test framework
- Tests don't use jest-specific methods like jest.mock() or jest.fn() - Using only describe, it, and expect from @jest/globals
**Problem**: Badge health check workflow was creating duplicate issues weekly, causing noise and inconsistency. Issue #1983 had 2 duplicates (#1726, #1701), and many markdown files had broken links with markdown formatting artifacts. **Solution - Phase 1: Eliminate Duplicates** - Closed duplicate issues #1726 and #1701 - Consolidated all broken links into #1983 as single tracking issue - Updated badges-health-check.yml workflow with intelligent issue management **Solution - Phase 2: Fix Broken Links** - Created fix-badge-links.js script to identify and fix: * Trailing special characters in URLs (>, backticks) * Incomplete workflow badge URLs with missing/wrong branch parameters * HTML-encoded characters in URLs - Fixed 298 markdown files with broken link artifacts - Identified 51 files with remaining issues for manual review **Solution - Phase 3: Prevent Future Duplicates** - Replaced workflow with improved version that: * Searches for existing open badge health check issues * Updates existing issue instead of creating new ones * Automatically closes issue when all links are healthy * Maintains single source of truth for badge health status **Scripts Added**: - scripts/fix-badge-links.js: Identifies and auto-fixes broken links - scripts/close-badge-duplicates.js: Consolidates duplicate tracking issues **Changes**: - Updated .github/workflows/badges-health-check.yml (improved logic) - Fixed 298 markdown files with URL artifacts - Closed 2 duplicate issues This prevents future duplicate issue creation while maintaining a clear health check workflow. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Remove unused fs import - Remove unused spawnSync from child_process destructure - Remove unused output variable from execSync call Addresses code quality feedback from github-code-quality-bot
Move phase and operational files to proper project folders and control-plane locations:
- Create `.github/projects/active/openspec-labels-automation-2026-08-18/`
- Move PHASE-2-SUMMARY.md and PHASE-3-HANDOFF.md
- Create `.github/projects/active/badges-workflow-integration-2026-08-08/`
- Move PHASE_4_TEST_RESULTS.md
- Create `.github/projects/active/github-actions-v7-upgrade/`
- Move PHASE_5_COMPLETION_REPORT.md and PHASE_5_HANDOFF_NOTES.md
- Move EPIC_1670_PROJECT_SUMMARY.md
- Move operational guides to `.github/` root:
- ARCHIVE_WORKFLOW_GUIDE.md
- CHANGELOG_CONTRIBUTOR_CHECKLIST.md
- CodeRabbit-Config-Spec.md
- Remove nested `.github/.github/` folder structure (was duplicate)
Per CLAUDE.md line 27: "Reports, project artefacts, and active planning documents"
belong in `.github/projects/active/{slug}/`. Do not place files in root `.github/`
or nested `.github/.github/` folders.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>Important Review skippedToo many files! This PR contains 350 files, which is 250 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. Usage-priced reviews support at most 300 files. ⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (350)
You can disable this status message by setting the 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. Comment |
🚫 This PR description is missing required template content. Missing required section(s): Changelog Please update the PR body using one of the repository PR templates:
Empty placeholders, unchecked checklist boxes, and stub issue references do not count. |
ashleyshaw
commented
Aug 18, 2026
Closing in favor of PR #2047, which is a cleaner, more focused implementation with only the essential workflow and script changes. |
Bugfix Pull Request
Linked issues
Fixes#1983
Relates to #1726
Relates to #1701
Context
Root Cause
Workflow was creating issues unconditionally without checking for existing ones. No deduplication logic existed, resulting in duplicate issues #1983, #1726, #1701.
Fix Summary
Enhanced workflow (badges-health-check.yml):
Created utility scripts:
fix-badge-links.js- Auto-detect and repair broken links (trailing >, backticks)close-badge-duplicates.js- Consolidate duplicate issues into single tracking issueVerification
Risk & Rollback
Changelog
Added
scripts/fix-badge-links.js- Auto-identify and repair broken links in markdownscripts/close-badge-duplicates.js- Consolidate duplicate tracking issuesChanged
.github/workflows/badges-health-check.ymlwith intelligent issue search and update workflowFixed
Removed
Checklist (Global DoD / PR)