Skip to content

Conversation

@leggetter
Copy link
Collaborator

@leggetter leggetter commented Nov 21, 2025

A number of PRs have been merged directly into main, but we need to change that. So we merge into next from now on.

leggetter and others added 10 commits November 14, 2025 10:17
Add support for pinning Hookdeck project configuration to the current
directory using the --local flag. This enables per-repository project
configuration for better developer experience in multi-project workflows.
Implementation:
- Added --local flag to 'project use' command
- Implemented UseProjectLocal() method to create/update local config
- Added smart default: auto-updates local config when it exists
- Validates --local and --config are mutually exclusive
- Displays security warning when creating local config
- Refactored config writing to reduce code duplication
Testing:
- Created comprehensive acceptance test suite
- Added helper functions for temp directory management
- Tests validate flag behavior, config creation, and security warnings
- 2 tests passing in CI, 4 tests ready for CLI key testing
Documentation:
- Updated README with complete --local flag documentation
- Explained configuration file precedence (--config > local > global)
- Added security guidance for credential management
- Included examples for all use cases
Related: Previous PRs #102, #103 that removed --local flag
Add semi-automated testing workflow for project use tests that require
human browser-based authentication. These tests ensure the --local flag
works correctly with CLI key authentication.

Implementation:
- Created project_use_manual_test.go with 4 manual tests (build tag: manual)
- Added RequireCLIAuthentication() helper that forces fresh login
- Helper clears existing auth, runs 'hookdeck login', waits for user
- Existing automated tests remain in project_use_test.go (run in CI)
- Manual tests only run with: go test -tags=manual

Testing workflow:
- Tests clear authentication and require fresh CLI login
- User completes browser authentication when prompted
- Tests verify local config creation with project selection
- Validates security warnings and smart default behavior

Documentation:
- Updated test/acceptance/README.md with manual test instructions
- Explained difference between automated (CI) and manual tests
- Provided examples of running manual tests locally
- Documented which tests require human authentication

Feature implementation:
- Added security warning output in project_use.go for new local configs
- Fixed config writing logic in config.go to properly handle new files
- Refactored project_use_test.go to separate automated vs manual tests
- Updated test comments to clarify CI vs local execution requirements

Related: Completes semi-automated testing for --local flag feature
- Add type display in brackets [TYPE] for connection list view
- Add 'Type:' field to connection get detailed view
- Update tests to verify type fields are displayed correctly
… get

- Add support for passing connection name to 'connection get' command
- Implement resolveConnectionID() to accept both ID and name
- Improve 404 error handling with user-friendly messages
- Add tests for name-based lookup and error cases
- Update command usage and help text to reflect name support
- Added destinationURL and destinationCliPath to hasAnyDestinationFlag() check
- Added destinationURL and destinationCliPath to hasDestinationConfigOnly check
- Added destinationURL and destinationCliPath to hasDestinationConfigUpdate check
- Added destinationCliPath handling in buildDestinationInputForUpdate()
- Added comprehensive test suite for partial updates (TestConnectionUpsertPartialUpdates)

This fixes the 422 error when running:
  hookdeck connection upsert <name> --destination-url <URL>

Previously, the CLI wasn't detecting that destination config flags were provided,
so it didn't fetch the existing connection to preserve source/destination references.
The API requires both source and destination in every PUT request, so the CLI now
automatically handles this by fetching the existing connection and merging changes.
fix: connection upsert with only destination config flags now works
Project Use --local Flag & Connection Management Improvements
@leggetter leggetter merged commit 09f261c into next Nov 21, 2025
5 checks passed
@leggetter leggetter deleted the main branch November 21, 2025 20:36
@leggetter leggetter changed the title Main update next from main Nov 21, 2025
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.

2 participants