Skip to content

refactor: split coderd/gitauth into two, add cli/gitauth #9479

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 1, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
refactor: split coderd/gitauth into two, add cli/gitauth
Ref: #9380
  • Loading branch information
mafredri committed Sep 1, 2023
commit 055fc2e7e8e6463e7c077a13e668a47273ac378e
5 changes: 2 additions & 3 deletions agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ import (
"github.com/coder/coder/v2/agent/agentssh"
"github.com/coder/coder/v2/agent/reconnectingpty"
"github.com/coder/coder/v2/buildinfo"
"github.com/coder/coder/v2/coderd/database"
"github.com/coder/coder/v2/coderd/gitauth"
"github.com/coder/coder/v2/cli/gitauth"
"github.com/coder/coder/v2/codersdk"
"github.com/coder/coder/v2/codersdk/agentsdk"
"github.com/coder/coder/v2/tailnet"
Expand Down Expand Up @@ -523,7 +522,7 @@ func (a *agent) reportLifecycleLoop(ctx context.Context) {
func (a *agent) setLifecycle(ctx context.Context, state codersdk.WorkspaceAgentLifecycle) {
report := agentsdk.PostLifecycleRequest{
State: state,
ChangedAt: database.Now(),
ChangedAt: time.Now().UTC(), // Like `database.Now()`, but avoid importing coderd/database.
}

a.lifecycleMu.Lock()
Expand Down
2 changes: 1 addition & 1 deletion cli/gitaskpass.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

"github.com/coder/coder/v2/cli/clibase"
"github.com/coder/coder/v2/cli/cliui"
"github.com/coder/coder/v2/coderd/gitauth"
"github.com/coder/coder/v2/cli/gitauth"
"github.com/coder/coder/v2/codersdk"
"github.com/coder/retry"
)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/stretchr/testify/require"

"github.com/coder/coder/v2/coderd/gitauth"
"github.com/coder/coder/v2/cli/gitauth"
)

func TestCheckCommand(t *testing.T) {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/spf13/afero"
"github.com/stretchr/testify/require"

"github.com/coder/coder/v2/coderd/gitauth"
"github.com/coder/coder/v2/cli/gitauth"
)

func TestOverrideVSCodeConfigs(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion cli/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ import (
"github.com/coder/coder/v2/cli/clibase"
"github.com/coder/coder/v2/cli/cliui"
"github.com/coder/coder/v2/cli/config"
"github.com/coder/coder/v2/cli/gitauth"
"github.com/coder/coder/v2/coderd"
"github.com/coder/coder/v2/coderd/gitauth"
"github.com/coder/coder/v2/coderd/telemetry"
"github.com/coder/coder/v2/codersdk"
"github.com/coder/coder/v2/codersdk/agentsdk"
Expand Down