Skip to content

🚀 Add --repo option to workflow management commands#4007

Merged
dsyme merged 1 commit into
mainfrom
qpej
Nov 15, 2025
Merged

🚀 Add --repo option to workflow management commands#4007
dsyme merged 1 commit into
mainfrom
qpej

Conversation

@dsyme
Copy link
Copy Markdown
Collaborator

@dsyme dsyme commented Nov 15, 2025

Summary

  • Added --repo flag to enable, disable, and logs commands
  • Allows specifying a specific repository for workflow operations
  • Enhances flexibility of workflow management across different repositories

Changes

  • Updated enable and disable commands to support repository override
  • Modified logs command to accept --repo flag for repository-specific log retrieval
  • Updated related function signatures to include repository override parameter
  • Added example usage in command documentation demonstrating the new --repo option

Copilot AI review requested due to automatic review settings November 15, 2025 01:04
@dsyme dsyme merged commit eb11524 into main Nov 15, 2025
45 checks passed
@dsyme dsyme deleted the qpej branch November 15, 2025 01:06
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 --repo flag to enable, disable, and logs commands for repository specification
  • Updated function signatures (EnableWorkflowsByNames, DisableWorkflowsByNames, DownloadWorkflowLogs, listWorkflowRunsWithPagination) to accept repoOverride parameter
  • Modified command construction to append --repo flag 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.

Comment thread pkg/cli/enable.go
Comment on lines 230 to 231
if err := cancelWorkflowRunsByLockFile(t.LockFileBase); err != nil {
fmt.Fprintf(os.Stderr, "Warning: Failed to cancel runs for workflow %s: %v\n", t.Name, err)
Copy link

Copilot AI Nov 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
github-actions Bot added a commit that referenced this pull request Nov 15, 2025
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>
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