Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds --repo flag support to the enable, disable, and logs commands, allowing users to manage workflows in repositories other than the current working directory. The changes include updating function signatures to accept a repoOverride parameter and passing it to the underlying gh CLI commands.
Key changes:
- Added
--repoflag to enable, disable, and logs commands for repository specification - Updated function signatures (
EnableWorkflowsByNames,DisableWorkflowsByNames,DownloadWorkflowLogs,listWorkflowRunsWithPagination) to acceptrepoOverrideparameter - Modified command construction to append
--repoflag when repository override is specified
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
cmd/gh-aw/main.go |
Adds --repo flag registration and retrieval for enable/disable commands with usage examples |
pkg/cli/enable.go |
Updates function signatures and command construction to support repository override |
pkg/cli/logs.go |
Adds --repo flag to logs command with function signature updates and example usage |
pkg/cli/logs_test.go |
Updates test calls to match new function signatures with additional repoOverride parameter |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if err := cancelWorkflowRunsByLockFile(t.LockFileBase); err != nil { | ||
| fmt.Fprintf(os.Stderr, "Warning: Failed to cancel runs for workflow %s: %v\n", t.Name, err) |
There was a problem hiding this comment.
The cancelWorkflowRunsByLockFile function does not support the repoOverride parameter. When disabling workflows in a specific repository using --repo, this call will cancel workflow runs in the current repository context instead of the repository specified by --repo.
Recommendation: Update cancelWorkflowRunsByLockFile function signature to accept repoOverride parameter and pass --repo flag to the gh run list and gh run cancel commands when a repository override is specified.
This commit updates the documentation based on features merged in the last 24 hours. ## Features Documented ### 1. Cross-repository --repo flag (PR #4007) - Added --repo option to enable, disable, and logs commands - Enables workflow management operations across different repositories - Updated CLI reference with examples and option descriptions ### 2. Workflow description extraction (PR #4008) - Documents that add and trial commands now display workflow descriptions - Descriptions are extracted from frontmatter description field - Provides better context about workflow purpose when adding or testing ### 3. Import cache for offline compilation (PR #3981) - Remote imports are automatically cached in .github/aw/imports/ - Cache stores imports by commit SHA for efficient reuse - Enables offline compilation once imports have been downloaded - Updated CLI, imports reference, and packaging guides ### 4. "Did You Mean" schema validation suggestions (PR #3999) - Compiler suggests correct field names for typos using fuzzy matching - Based on Levenshtein distance algorithm - Added tip callout and new error documentation section - Includes examples of common typos detected ## Files Modified - docs/src/content/docs/setup/cli.md - docs/src/content/docs/reference/imports.md - docs/src/content/docs/guides/packaging-imports.md - docs/src/content/docs/troubleshooting/errors.md ## Related PRs - #4007 - Add --repo options to more commands - #4008 - Add workflow description extraction feature - #3981 - Add import cache for offline workflow compilation - #3999 - Implement 'Did You Mean' suggestions for schema validation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Summary
--repoflag to enable, disable, and logs commandsChanges
enableanddisablecommands to support repository overridelogscommand to accept--repoflag for repository-specific log retrieval--repooption