Skip to content

[function-namer] Go function rename plan: add_interactive_schedule.go, add_interactive_secrets.go, add_interactive_workflow.go #21314

@github-actions

Description

@github-actions

Files Analyzed: pkg/cli/add_interactive_schedule.go, pkg/cli/add_interactive_secrets.go, pkg/cli/add_interactive_workflow.go
Analysis Date: 2026-03-17
Round-Robin Position: files 9–11 of 582 total

Why This Matters

When AI coding agents search for functions to complete a task, they rely on function
names to understand what code does. Clear, descriptive names increase the likelihood
that an agent will find the right function instead of reimplementing existing logic.

Rename Suggestions

pkg/cli/add_interactive_secrets.go

Current Name Suggested Name Reason
getSecretInfo() resolveEngineApiKeyCredential() The current name is vague — an agent searching for "get API key for AI engine" would miss this. The new name describes the specific domain: resolving an engine's API key credential, checking if it already exists in the repository

All functions in this file (for reference):

  • (*AddInteractiveConfig).checkExistingSecrets() — ✅ Clear, no change needed
  • (*AddInteractiveConfig).addRepositorySecret() — ✅ Clear, no change needed
  • parseSecretNames() — ✅ Clear, no change needed
  • (*AddInteractiveConfig).getSecretInfo()⚠️ Rename suggested (see table above)

pkg/cli/add_interactive_workflow.go

Current Name Suggested Name Reason
getWorkflowStatuses() findWorkflowsByFilenamePattern() The current name is misleading — it implies fetching run statuses (active/inactive/completed), but the function actually searches for workflows by filename pattern to check if they are registered in GitHub. An agent looking for "find if a workflow file is registered" would overlook this function.

All functions in this file (for reference):

  • (*AddInteractiveConfig).checkStatusAndOfferRun() — ✅ Clear, no change needed
  • getWorkflowStatuses()⚠️ Rename suggested (see table above)

pkg/cli/add_interactive_schedule.go

All functions have clear, descriptive names — no changes needed.

All functions in this file (for reference):

  • detectWorkflowScheduleInfo() — ✅ Clear, no change needed
  • classifyScheduleFrequency() — ✅ Clear, no change needed
  • (*AddInteractiveConfig).selectScheduleFrequency() — ✅ Clear, no change needed
  • buildScheduleOptions() — ✅ Clear, no change needed

🤖 Agentic Implementation Plan

Agentic Implementation Plan

This issue is designed to be assigned to a coding agent. The agent should implement
all rename suggestions below in a single pull request.

Prerequisites

  • Read each rename suggestion and verify it is accurate by reviewing the function body
  • Check for any Go interface constraints that prevent renaming (e.g., must match interface method name)

Implementation Steps

Rename 1: getSecretInforesolveEngineApiKeyCredential in pkg/cli/add_interactive_secrets.go

// Old
func (c *AddInteractiveConfig) getSecretInfo() (name string, value string, err error) {

// New
func (c *AddInteractiveConfig) resolveEngineApiKeyCredential() (name string, value string, err error) {

Update all call sites:

grep -rn "getSecretInfo" pkg/ --include="*.go"
grep -rn "getSecretInfo" pkg/ --include="*_test.go"

Known call sites:

  • pkg/cli/add_interactive_orchestrator.go:137secretName, secretValue, err = config.getSecretInfo()
  • pkg/cli/add_interactive_secrets_test.go:81name, value, err := config.getSecretInfo()

Rename 2: getWorkflowStatusesfindWorkflowsByFilenamePattern in pkg/cli/add_interactive_workflow.go

// Old
func getWorkflowStatuses(pattern, repoOverride string, verbose bool) ([]WorkflowStatus, error) {

// New
func findWorkflowsByFilenamePattern(pattern, repoOverride string, verbose bool) ([]WorkflowStatus, error) {

Update all call sites:

grep -rn "getWorkflowStatuses" pkg/ --include="*.go"
grep -rn "getWorkflowStatuses" pkg/ --include="*_test.go"

Known call sites:

  • pkg/cli/add_interactive_workflow.go:51statuses, err := getWorkflowStatuses(parsed.WorkflowName, c.RepoOverride, c.Verbose)
  • pkg/cli/add_interactive_workflow_test.go:44statuses, err := getWorkflowStatuses(tt.pattern, tt.repoOverride, tt.verbose)

Also update the test function name TestGetWorkflowStatusesTestFindWorkflowsByFilenamePattern in pkg/cli/add_interactive_workflow_test.go.

Verify compilation after each rename

make build

Run tests after all renames are complete

make test-unit
make lint
```

### Commit Convention

Each rename should be a focused commit:

```
refactor: rename getSecretInfo to resolveEngineApiKeyCredential for clarity
refactor: rename getWorkflowStatuses to findWorkflowsByFilenamePattern for clarity

Validation Checklist

  • All renames implemented
  • All call sites updated (Go files and test files)
  • make build passes with no errors
  • make test-unit passes
  • make lint passes
  • PR description explains the agent-discoverability rationale

Notes for the Agent

  • This is a pure rename refactor — behavior must not change, only names
  • If a rename causes unexpected complexity (e.g., name conflicts, interface constraints),
    skip it and leave a comment in the PR explaining why
  • Follow existing naming conventions documented in AGENTS.md

Generated by the Daily Go Function Namer workflow
Run: §23173108339

Generated by Daily Go Function Namer ·

  • expires on Mar 24, 2026, 12:55 AM UTC

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions