Skip to content

feat: add rules 5-8 and switch to Git Trees API#15

Merged
packet-mover merged 1 commit intomainfrom
feat/rules-5-to-8
Apr 5, 2026
Merged

feat: add rules 5-8 and switch to Git Trees API#15
packet-mover merged 1 commit intomainfrom
feat/rules-5-to-8

Conversation

@packet-mover
Copy link
Copy Markdown
Contributor

@packet-mover packet-mover commented Apr 5, 2026

Summary

  • Add 4 new rules: HasSecurityMd, HasCIWorkflow, HasTestDirectory, HasCodeowners
  • Replace ListFiles (Contents API, root only) with GetTree (Trees API, recursive) - fetches entire repo tree in 1 API call instead of up to 4
  • FileEntry now uses full paths and includes Type for directory detection
  • Add hasDir helper for directory-existence checks

New rules

Rule Check
Has SECURITY.md Root or .github/SECURITY.md
Has CI workflow Any .yml/.yaml in .github/workflows/
Has test directory test, tests, __tests__, spec, or specs at root
Has CODEOWNERS Root, docs/, or .github/

Test plan

  • go test ./... passes (16 new tests for rules 5-8)
  • go vet ./... clean

Add HasSecurityMd, HasCIWorkflow, HasTestDirectory, HasCodeowners rules.

Replace ListFiles (Contents API, root only) with GetTree (Trees API,
recursive). This fetches the entire repo tree in a single API call
instead of multiple calls per directory.

FileEntry now uses full paths (e.g., ".github/workflows/ci.yml")
and includes Type for directory detection.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@packet-mover packet-mover merged commit 263edab into main Apr 5, 2026
2 checks passed
@packet-mover packet-mover deleted the feat/rules-5-to-8 branch April 5, 2026 21:21
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