Skip to content

Add no-topic search mode for testing diverse repositories#144

Draft
Copilot wants to merge 4 commits intomainfrom
copilot/add-no-topic-search-feature
Draft

Add no-topic search mode for testing diverse repositories#144
Copilot wants to merge 4 commits intomainfrom
copilot/add-no-topic-search-feature

Conversation

Copy link
Contributor

Copilot AI commented Jan 17, 2026

Adds optional no-topic search to index automation files without requiring the hadiscover topic, enabling testing with diverse repositories and controlled result sets for performance validation.

Changes

GitHubService (backend/app/services/github_service.py):

  • Added enable_no_topic_search and max_repositories constructor parameters
  • Dual search modes: topic-based (default) vs. file path search (automations.yaml in:path)
  • Repository limit enforcement with early pagination termination

Configuration propagation:

  • Environment variables: ENABLE_NO_TOPIC_SEARCH (default: false), MAX_REPOSITORIES (optional)
  • Updated IndexingService, CLI, API routes, and Scheduler to thread parameters through
  • Dev docker-compose exposes variables; production docker-compose unchanged

Testing:

  • 11 new tests covering both search modes, limit enforcement, environment parsing
  • All 86 tests passing

Example usage

# Testing with limited no-topic search
ENABLE_NO_TOPIC_SEARCH=true MAX_REPOSITORIES=10 python -m app.cli index-now

# Production remains unchanged (topic search only)
python -m app.cli index-now

Production behavior unchanged - feature defaults to OFF.

Original prompt

This section details on the original issue you should resolve

<issue_title>Add a feature for no-topic search</issue_title>
<issue_description>Add a feature that allows hadiscover to search GitHub for automation files without a topic search. This is useful for testing scenarios to see how many automations can be imported before a certain performance hit on the backend. It also opens up the opportunity to find more bugs as it can search a more diverse repository set in test environments. There should also be a max search limit defined so it's easy with tests to test an X amount of repositories. Tests must be added. It must also be available as an environment variable on the Docker image. On production, we should keep the existing topic search functionality.</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits January 17, 2026 07:55
Co-authored-by: DevSecNinja <14926452+DevSecNinja@users.noreply.github.com>
Co-authored-by: DevSecNinja <14926452+DevSecNinja@users.noreply.github.com>
Co-authored-by: DevSecNinja <14926452+DevSecNinja@users.noreply.github.com>
Copilot AI changed the title [WIP] Add feature for no-topic search in hadiscover Add no-topic search mode for testing diverse repositories Jan 17, 2026
Copilot AI requested a review from DevSecNinja January 17, 2026 07:59
@github-actions
Copy link

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@github-actions github-actions bot added documentation Improvements or additions to documentation backend docker tests labels Jan 18, 2026
@codecov
Copy link

codecov bot commented Jan 18, 2026

Codecov Report

❌ Patch coverage is 73.21429% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.66%. Comparing base (d8f791f) to head (d1c4907).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #144      +/-   ##
==========================================
+ Coverage   71.50%   71.66%   +0.16%     
==========================================
  Files          11       11              
  Lines         793      840      +47     
  Branches      124      132       +8     
==========================================
+ Hits          567      602      +35     
- Misses        163      173      +10     
- Partials       63       65       +2     
Flag Coverage Δ
backend 71.66% <73.21%> (+0.16%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend docker documentation Improvements or additions to documentation tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a feature for no-topic search

2 participants