Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/aw/schemas/agentic-workflow.json
Original file line number Diff line number Diff line change
Expand Up @@ -3587,6 +3587,13 @@
"type": "string",
"description": "Target repository in format 'owner/repo' for cross-repository agent task creation. Takes precedence over trial target repo settings."
},
"allowed-repos": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of additional repositories in format 'owner/repo' that agent tasks can be created in. When specified, the agent can use a 'repo' field in the output to specify which repository to create the agent task in. The target repository (current or target-repo) is always implicitly allowed."
},
"github-token": {
"$ref": "#/$defs/github_token",
"description": "GitHub token to use for this specific output type. Overrides global github-token if specified."
Expand Down Expand Up @@ -4012,6 +4019,13 @@
"type": "string",
"description": "Target repository in format 'owner/repo' for cross-repository comments. Takes precedence over trial target repo settings."
},
"allowed-repos": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of additional repositories in format 'owner/repo' that comments can be created in. When specified, the agent can use a 'repo' field in the output to specify which repository to create the comment in. The target repository (current or target-repo) is always implicitly allowed."
},
"discussion": {
"type": "boolean",
"const": true,
Expand Down Expand Up @@ -4104,6 +4118,13 @@
"type": "string",
"description": "Target repository in format 'owner/repo' for cross-repository pull request creation. Takes precedence over trial target repo settings."
},
"allowed-repos": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of additional repositories in format 'owner/repo' that pull requests can be created in. When specified, the agent can use a 'repo' field in the output to specify which repository to create the pull request in. The target repository (current or target-repo) is always implicitly allowed."
},
"github-token": {
"$ref": "#/$defs/github_token",
"description": "GitHub token to use for this specific output type. Overrides global github-token if specified."
Expand Down Expand Up @@ -4170,6 +4191,13 @@
"type": "string",
"description": "Target repository in format 'owner/repo' for cross-repository PR review comments. Takes precedence over trial target repo settings."
},
"allowed-repos": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of additional repositories in format 'owner/repo' that PR review comments can be created in. When specified, the agent can use a 'repo' field in the output to specify which repository to create the review comment in. The target repository (current or target-repo) is always implicitly allowed."
},
"github-token": {
"$ref": "#/$defs/github_token",
"description": "GitHub token to use for this specific output type. Overrides global github-token if specified."
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/ci-coach.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions .github/workflows/copilot-session-insights.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/workflows/daily-file-diet.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 10 additions & 9 deletions pkg/cli/run_command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
package cli

import (
"context"
"fmt"
"strings"
"testing"
Expand Down Expand Up @@ -135,10 +136,10 @@ func TestProgressFlagSignature(t *testing.T) {
// This is a compile-time check more than a runtime check

// RunWorkflowOnGitHub should NOT accept progress parameter anymore
_ = RunWorkflowOnGitHub("test", false, "", "", "", false, false, false, []string{}, false)
_ = RunWorkflowOnGitHub(context.Background(), "test", false, "", "", "", false, false, false, []string{}, false)

// RunWorkflowsOnGitHub should NOT accept progress parameter anymore
_ = RunWorkflowsOnGitHub([]string{"test"}, 0, false, "", "", "", false, false, []string{}, false)
_ = RunWorkflowsOnGitHub(context.Background(), []string{"test"}, 0, false, "", "", "", false, false, []string{}, false)

// getLatestWorkflowRunWithRetry should NOT accept progress parameter anymore
_, _ = getLatestWorkflowRunWithRetry("test.lock.yml", "", false)
Expand All @@ -148,22 +149,22 @@ func TestProgressFlagSignature(t *testing.T) {
func TestRefFlagSignature(t *testing.T) {
// Test that RunWorkflowOnGitHub accepts refOverride parameter
// This is a compile-time check that ensures the refOverride parameter exists
_ = RunWorkflowOnGitHub("test", false, "", "", "main", false, false, false, []string{}, false)
_ = RunWorkflowOnGitHub(context.Background(), "test", false, "", "", "main", false, false, false, []string{}, false)

// Test that RunWorkflowsOnGitHub accepts refOverride parameter
_ = RunWorkflowsOnGitHub([]string{"test"}, 0, false, "", "", "main", false, false, []string{}, false)
_ = RunWorkflowsOnGitHub(context.Background(), []string{"test"}, 0, false, "", "", "main", false, false, []string{}, false)
}

// TestRunWorkflowOnGitHubWithRef tests that the ref parameter is handled correctly
func TestRunWorkflowOnGitHubWithRef(t *testing.T) {
// Test with explicit ref override (should still fail for non-existent workflow, but syntax is valid)
err := RunWorkflowOnGitHub("nonexistent-workflow", false, "", "", "main", false, false, false, []string{}, false)
err := RunWorkflowOnGitHub(context.Background(), "nonexistent-workflow", false, "", "", "main", false, false, false, []string{}, false)
if err == nil {
t.Error("RunWorkflowOnGitHub should return error for non-existent workflow even with ref flag")
}

// Test with ref override and repo override
err = RunWorkflowOnGitHub("nonexistent-workflow", false, "", "owner/repo", "feature-branch", false, false, false, []string{}, false)
err = RunWorkflowOnGitHub(context.Background(), "nonexistent-workflow", false, "", "owner/repo", "feature-branch", false, false, false, []string{}, false)
if err == nil {
t.Error("RunWorkflowOnGitHub should return error for non-existent workflow with both ref and repo")
}
Expand All @@ -173,10 +174,10 @@ func TestRunWorkflowOnGitHubWithRef(t *testing.T) {
func TestInputFlagSignature(t *testing.T) {
// Test that RunWorkflowOnGitHub accepts inputs parameter
// This is a compile-time check that ensures the inputs parameter exists
_ = RunWorkflowOnGitHub("test", false, "", "", "", false, false, false, []string{"key=value"}, false)
_ = RunWorkflowOnGitHub(context.Background(), "test", false, "", "", "", false, false, false, []string{"key=value"}, false)

// Test that RunWorkflowsOnGitHub accepts inputs parameter
_ = RunWorkflowsOnGitHub([]string{"test"}, 0, false, "", "", "", false, false, []string{"key=value"}, false)
_ = RunWorkflowsOnGitHub(context.Background(), []string{"test"}, 0, false, "", "", "", false, false, []string{"key=value"}, false)
}

// TestInputValidation tests that input validation works correctly
Expand Down Expand Up @@ -231,7 +232,7 @@ func TestInputValidation(t *testing.T) {
t.Run(tt.name, func(t *testing.T) {
// Since we can't actually run workflows in tests, we'll just test the validation
// by checking if the function would error before attempting to run
err := RunWorkflowOnGitHub("nonexistent-workflow", false, "", "owner/repo", "", false, false, false, tt.inputs, false)
err := RunWorkflowOnGitHub(context.Background(), "nonexistent-workflow", false, "", "owner/repo", "", false, false, false, tt.inputs, false)

if tt.shouldError {
if err == nil {
Expand Down
Loading
Loading