Skip to content

feat(output): add custom output format, test coverage, and release 2.1.0 - #4

Open
dshevtsov wants to merge 4 commits into
mainfrom
develop
Open

dshevtsov wants to merge 4 commits into
mainfrom
develop

Conversation

@dshevtsov

@dshevtsov dshevtsov commented Sep 29, 2026 •

Copy link
Copy Markdown

Purpose

Adds a custom output format backed by Mustache templates, closes out test coverage gaps across the gem, hardens the CI lint workflow, and bumps the version to 2.1.0.

What changed and why

  • Custom output format: Added CustomFormatter, which renders PR rows through a project-supplied Mustache template (templates.custom config key, path validated to stay inside the project directory) and writes to custom_output. Markdown output uses the bundled Mustache template while retaining the existing four-column, headerless layout and whitespace behavior. YAML retains object-based to_yaml serialization. Row#to_h supplies the full row fields for YAML and custom templates; Markdown builds its own four-field template data.
  • Test coverage: Added RSpec specs for Config, Client, EnterpriseClient, Pulls, RowCollector, Row, Runner, CLI, and the output formatters (98 examples), plus SimpleCov and WebMock (network calls disabled in specs).
  • Cucumber scenarios: Added network-free scenarios covering invalid --config paths, all output formats, missing custom_output, and the enterprise SSRF guard. Added VCR-backed scaffolding (tagged @vcr, excluded from the default run) with a recorded cassette for replay-only testing against a real GitHub repository.
  • CI lint hardening: Fixed all super-linter failures surfaced across two CI runs:
    • Scoped workflow permissions per job, bumped actions/checkout to v6 and super-linter to v8, and pinned both to commit SHAs (zizmor).
    • Removed unrecognized RuboCop disable directives and trailing whitespace; deduplicated near-identical spec setup to satisfy JSCPD's 0% duplicate-code threshold.
    • Bumped faraday and json in Gemfile.lock to patched versions (Trivy CVEs).
    • Raised the gemspec's required_ruby_version to >= 3.3 so RuboCop's auto-detected TargetRubyVersion matches the Ruby 3.1+ hash-punning syntax used in specs.
    • Disabled VALIDATE_JSON_PRETTIER (conflicted with Biome's formatting of .markdownlint.json).
    • Symlinked .rubocop.yml to the existing .github/linters/.ruby-lint.yml and added rubocop-github as a development dependency, so CI and local/IDE RuboCop share the same config.
  • Docs: Documented the custom output format and the new test tooling (SimpleCov, WebMock, VCR, cucumber -p vcr) in the README, and added a CHANGELOG entry.
  • Version bump: 2.0.0 -> 2.1.0.
  • Compatibility changes: The minimum supported Ruby version increases from 3.0 to 3.3, dropping support for Ruby 3.0-3.2. Row#date and generated row dates now use ISO 8601 (YYYY-MM-DD) rather than human-readable dates; Row#date_string provides the human-readable form. Consumers that parse the previous date format must adapt.
  • Housekeeping: Ignored local AI-assistant directories (.claude/, .scout/) in .gitignore.

Testing

  • bundle exec rspec — 98 examples, 0 failures
  • bundle exec rubocop lib spec — 0 offenses
  • bundle exec cucumber — 10 scenarios, 10 passed (default, network-free)
  • bundle exec cucumber -p vcr — 1 scenario, replays from cassette with no live network access
  • bundle exec rake test — full suite green
  • CI (super-linter) — green

@dshevtsov dshevtsov self-assigned this Sep 29, 2026
@dshevtsov dshevtsov added the enhancement New feature or request label Sep 29, 2026
@dshevtsov
dshevtsov marked this pull request as ready for review September 29, 2026 22:43
Add Mustache-based custom output with canonical template containment, use ISO 8601 dates, and match version labels precisely. Preserve object-based YAML serialization and compatible Markdown table output.

Update runtime and development dependencies, require Ruby 3.3, and bump the version to 2.1.0.
Cover configuration, clients, pulls, formatters, rows, tables, and CLI behavior. Add network-free Cucumber scenarios and VCR-backed replay tooling, excluding VCR scenarios from the default test task.
Clarify CLI version output, custom templates, and VCR tooling. Record release changes and ignore local AI-assistant directories.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant