Fix import alias for shared package in agent-task list

Renames the import of the shared package to 'prShared' and updates its usage in list.go to avoid naming conflicts and improve code clarity.
This commit is contained in:
Kynan Ware 2025-08-29 08:19:37 -06:00
parent dd424d85fd
commit 0de5cf24f0

View file

@ -9,7 +9,7 @@ import (
"github.com/cli/cli/v2/internal/gh"
"github.com/cli/cli/v2/internal/tableprinter"
"github.com/cli/cli/v2/pkg/cmd/agent-task/capi"
"github.com/cli/cli/v2/pkg/cmd/pr/shared"
prShared "github.com/cli/cli/v2/pkg/cmd/pr/shared"
"github.com/cli/cli/v2/pkg/cmdutil"
"github.com/cli/cli/v2/pkg/iostreams"
"github.com/spf13/cobra"
@ -104,7 +104,7 @@ func listRun(opts *ListOptions) error {
// ID
tp.AddField(s.ID)
if tp.IsTTY() {
tp.AddField(pr, tableprinter.WithColor(cs.ColorFromString(shared.ColorForPRState(*s.PullRequest))))
tp.AddField(pr, tableprinter.WithColor(cs.ColorFromString(prShared.ColorForPRState(*s.PullRequest))))
} else {
tp.AddField(pr)
}