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
4 changes: 0 additions & 4 deletions pkg/cli/doctor_assign_to_agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,10 +312,6 @@ func diagnoseDoctorAssignmentsWithEnvironment(ctx context.Context, repo, host st
return checks
}

func doctorAssignmentCredential(token string, secrets map[string]struct{}, lookupErr error) (string, string, string) {
return doctorAssignmentCredentialWithEnvironment(token, secrets, lookupErr, nil, nil)
}

func doctorAssignmentCredentialWithEnvironment(token string, secrets map[string]struct{}, lookupErr error, environmentSecrets map[string]struct{}, environmentErr error) (string, string, string) {
names, ok := doctorAssignmentSecretNames(strings.TrimSpace(token))
if !ok {
Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/doctor_assign_to_agent_parsing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func TestDoctorAssignmentCredentialFlattenedFallbacks(t *testing.T) {
for _, tc := range tests {
t.Run(tc.name, func(t *testing.T) {
t.Parallel()
status, secret, _ := doctorAssignmentCredential(tc.token, tc.secrets, tc.lookupErr)
status, secret, _ := doctorAssignmentCredentialWithEnvironment(tc.token, tc.secrets, tc.lookupErr, nil, nil)
assert.Equal(t, tc.status, status)
assert.Equal(t, tc.secret, secret)
})
Expand Down
4 changes: 2 additions & 2 deletions pkg/cli/doctor_assign_to_agent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func TestDoctorAssignmentCredential(t *testing.T) {
for _, tc := range tests {
t.Run(tc.name, func(t *testing.T) {
t.Parallel()
status, secret, message := doctorAssignmentCredential(tc.token, tc.secrets, tc.lookupErr)
status, secret, message := doctorAssignmentCredentialWithEnvironment(tc.token, tc.secrets, tc.lookupErr, nil, nil)
assert.Equal(t, tc.status, status)
assert.Equal(t, tc.secret, secret)
assert.NotContains(t, message, "never-echo-this-value")
Expand Down Expand Up @@ -255,7 +255,7 @@ esac
}
}
if tc.name == "personal repository missing secret" {
status, _, _ := doctorAssignmentCredential("${{ secrets.REPO_PAT }}", secrets, err)
status, _, _ := doctorAssignmentCredentialWithEnvironment("${{ secrets.REPO_PAT }}", secrets, err, nil, nil)
assert.Equal(t, "missing", status)
}
if tc.name == "repository and inherited secrets" {
Expand Down
Loading