Skip to content

Conversation

@brianf
Copy link

@brianf brianf commented Jan 22, 2026

Summary

This PR adds the ability for users to configure the OSS Index URL, enabling support for private OSS Index instances or alternative endpoints.

Changes

  • ✅ Added --url flag to allow CLI-based URL configuration
  • ✅ Added ossi.URL support in config file (~/.ossindex/.oss-index-config)
  • ✅ Integrated URL configuration through Viper following existing credential patterns
  • ✅ Updated all existing tests to use Viper for URL configuration
  • ✅ Added new test TestChaseCommandWithURLFlag for URL flag functionality
  • ✅ Added new test TestInitConfigWithURL for config file URL support
  • ✅ Updated README with comprehensive URL configuration documentation

Configuration Options

Users can now configure the OSS Index URL in three ways:

  1. CLI Flag:

    ahab chase --url https://custom.ossindex.com/api/v3/component-report
  2. Config File (~/.ossindex/.oss-index-config):

    ossi:
      Username: your-username
      Token: your-token
      URL: https://custom.ossindex.com/api/v3/component-report
  3. Interactive Config: Via ahab config command

Test Plan

  • All existing tests pass
  • New test for URL flag functionality passes
  • New test for URL config file support passes
  • Manual testing with custom URL works correctly
  • Default behavior (no URL specified) unchanged

Files Changed

  • cmd/root.go: Added URL flag to persistent flags
  • cmd/chase.go: Added URL support with viper integration
  • cmd/chase_test.go: Updated tests and added URL flag test
  • cmd/root_test.go: Added URL config file test
  • README.md: Added URL configuration documentation

Testing Output

=== RUN   TestChaseCommandWithURLFlag
--- PASS: TestChaseCommandWithURLFlag (0.00s)
=== RUN   TestInitConfigWithURL
--- PASS: TestInitConfigWithURL (0.00s)
PASS
ok      github.com/sonatype-nexus-community/ahab/cmd    0.458s

🤖 Generated with Claude Code

This commit adds the ability for users to override the default OSS Index
URL, enabling support for private OSS Index instances or alternative
endpoints.

Changes:
- Added --url flag to allow CLI-based URL configuration
- Added ossi.URL support in config file (~/.ossindex/.oss-index-config)
- Integrated URL configuration through Viper following existing patterns
- Updated all tests to use Viper for URL configuration
- Added new tests for URL flag and config file functionality
- Updated README with comprehensive URL configuration documentation

Users can now configure the OSS Index URL via:
1. CLI flag: --url https://custom.ossindex.com/api/v3/component-report
2. Config file: Add URL field to ~/.ossindex/.oss-index-config
3. Interactive config command (existing ahab config)

All tests pass successfully.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@paul-botsco-2-0 paul-botsco-2-0 bot added the 😧 commits missing verification Some commits are not signed - this must be resolved label Jan 22, 2026
@paul-botsco-2-0
Copy link

Thanks for the contribution. Unfortunately some of your commits don't meet our standards. All commits must be signed and have author information set.

The commits to review are:

See Signed Commits.

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

Labels

😧 commits missing verification Some commits are not signed - this must be resolved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants