Skip to content

feat: add Has .gitignore rule#12

Merged
packet-mover merged 1 commit intomainfrom
feat/has-gitignore-rule
Apr 5, 2026
Merged

feat: add Has .gitignore rule#12
packet-mover merged 1 commit intomainfrom
feat/has-gitignore-rule

Conversation

@packet-mover
Copy link
Copy Markdown
Contributor

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

Summary

  • Add Files []string to Repo struct for root-level file/directory names
  • Implement ListFiles on real GitHub client (GET /repos/{owner}/{repo}/contents)
  • Scan() now fetches files per repo before evaluating rules
  • Add HasGitignore rule using hasFile helper (reusable for upcoming file-existence rules)
  • Update mock to support configurable per-repo file lists

Test plan

  • go test ./... passes (3 new rule tests: pass, fail, empty files)
  • go vet ./... clean
  • Manual test against real org

- Add Files field to Repo struct for root-level file/dir names
- Implement ListFiles on real GitHub client (GET /repos contents)
- Scan() now fetches files per repo before evaluating rules
- Add HasGitignore rule with hasFile helper
- Update mock to support configurable per-repo file lists

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@packet-mover packet-mover merged commit e0c45bb into main Apr 5, 2026
2 checks passed
@packet-mover packet-mover deleted the feat/has-gitignore-rule branch April 5, 2026 20:51
packet-mover added a commit that referenced this pull request Apr 6, 2026
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