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
22 changes: 12 additions & 10 deletions internal/forge/github/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func AgentAppConfig(org, role string) AppConfig {

base.Name = fmt.Sprintf("fullsend-%s", role)

switch role {
switch role{
case "fullsend":
base.Description = fmt.Sprintf("Fullsend orchestrator for %s", org)
base.Permissions = AppPermissions{
Expand Down Expand Up @@ -113,15 +113,6 @@ func AgentAppConfig(org, role string) AppConfig {
}
base.Events = []string{"issues", "issue_comment", "pull_request"}

case "retro":
base.Description = fmt.Sprintf("Fullsend retro agent for %s", org)
base.Permissions = AppPermissions{
Contents: "read",
PullRequests: "read",
Issues: "write",
}
base.Events = []string{"issues", "pull_request"}

case "prioritize":
base.Description = fmt.Sprintf("Fullsend prioritize agent for %s", org)
base.Permissions = AppPermissions{
Expand All @@ -135,6 +126,17 @@ func AgentAppConfig(org, role string) AppConfig {
// No webhook events — this agent runs on a cron schedule, not events.
base.Events = []string{}

case "retro":
base.Description = fmt.Sprintf("Fullsend retro agent for %s", org)
base.Permissions = AppPermissions{
Actions: "read",
Contents: "read",
PullRequests: "read",
Issues: "write",
}
// No webhook events — triggered via workflow_dispatch from other agents.
base.Events = []string{}

default:
base.Description = fmt.Sprintf("Fullsend %s agent for %s", role, org)
base.Permissions = AppPermissions{
Expand Down
14 changes: 14 additions & 0 deletions internal/forge/github/types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,20 @@ func TestAgentAppConfig_Prioritize(t *testing.T) {
assert.Empty(t, cfg.Events)
}

func TestAgentAppConfig_Retro(t *testing.T) {
cfg := AgentAppConfig("myorg", "retro")

assert.Equal(t, "fullsend-retro", cfg.Name)
assert.Equal(t, "read", cfg.Permissions.Actions)
assert.Equal(t, "read", cfg.Permissions.Contents)
assert.Equal(t, "read", cfg.Permissions.PullRequests)
assert.Equal(t, "write", cfg.Permissions.Issues)
assert.Empty(t, cfg.Permissions.OrganizationProjects)

// Retro is triggered via workflow_dispatch, no webhook events.
assert.Empty(t, cfg.Events)
}

func TestAgentAppConfig_UnknownRole(t *testing.T) {
cfg := AgentAppConfig("myorg", "custom-bot")

Expand Down
Loading