Skip to content
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
Prev Previous commit
Next Next commit
Fix linting errors
  • Loading branch information
kylecarbs committed Feb 26, 2023
commit 7cbf1907dd36cc2a1cc53288dc10cef45c7b513d
6 changes: 2 additions & 4 deletions cli/create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -700,8 +700,7 @@ func createTestParseResponseWithDefault(defaultValue string) []*proto.Parse_Resp
}}
}

type oauth2Config struct {
}
type oauth2Config struct{}

func (*oauth2Config) AuthCodeURL(state string, _ ...oauth2.AuthCodeOption) string {
return "/?state=" + url.QueryEscape(state)
Expand All @@ -719,8 +718,7 @@ func (*oauth2Config) TokenSource(context.Context, *oauth2.Token) oauth2.TokenSou
return &oauth2TokenSource{}
}

type oauth2TokenSource struct {
}
type oauth2TokenSource struct{}

func (*oauth2TokenSource) Token() (*oauth2.Token, error) {
return &oauth2.Token{
Expand Down
19 changes: 10 additions & 9 deletions enterprise/audit/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,16 @@ var AuditableResources = auditMap(map[any]map[string]Action{
"allow_user_cancel_workspace_jobs": ActionTrack,
},
&database.TemplateVersion{}: {
"id": ActionTrack,
"template_id": ActionTrack,
"organization_id": ActionIgnore, // Never changes.
"created_at": ActionIgnore, // Never changes, but is implicit and not helpful in a diff.
"updated_at": ActionIgnore, // Changes, but is implicit and not helpful in a diff.
"name": ActionTrack,
"readme": ActionTrack,
"job_id": ActionIgnore, // Not helpful in a diff because jobs aren't tracked in audit logs.
"created_by": ActionTrack,
"id": ActionTrack,
"template_id": ActionTrack,
"organization_id": ActionIgnore, // Never changes.
"created_at": ActionIgnore, // Never changes, but is implicit and not helpful in a diff.
"updated_at": ActionIgnore, // Changes, but is implicit and not helpful in a diff.
"name": ActionTrack,
"readme": ActionTrack,
"job_id": ActionIgnore, // Not helpful in a diff because jobs aren't tracked in audit logs.
"created_by": ActionTrack,
"git_auth_providers": ActionIgnore, // Not helpful because this can only change when new versions are added.
},
&database.User{}: {
"id": ActionTrack,
Expand Down
2 changes: 1 addition & 1 deletion site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,6 @@
"chrome 66",
"firefox 63",
"edge 79",
"safari 15.5"
"safari 15.4"
]
}
1 change: 1 addition & 0 deletions site/src/pages/GitAuthPage/GitAuthPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const GitAuthPage: FC = () => {
useEffect(() => {
// This is used to notify the parent window that the Git auth token has been refreshed.
// It's critical in the create workspace flow!
// eslint-disable-next-line compat/compat -- It actually is supported... not sure why it's complaining.
const bc = new BroadcastChannel(REFRESH_GITAUTH_BROADCAST_CHANNEL)
// The message doesn't matter, any message refreshes the page!
bc.postMessage("noop")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ export const createWorkspaceMachine =
invoke: {
id: "listenForRefreshGitAuth",
src: () => (callback) => {
// eslint-disable-next-line compat/compat -- It actually is supported... not sure why eslint is complaining.
const bc = new BroadcastChannel(REFRESH_GITAUTH_BROADCAST_CHANNEL)
bc.addEventListener("message", () => {
callback("REFRESH_GITAUTH")
Expand Down