Skip to content

Commit ca50bb2

Browse files
committed
Add deprecated label
1 parent 8ed867d commit ca50bb2

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

internal/metadata/metadata.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -368,10 +368,10 @@ func (m *Metadata) migrateAuthSettings(ctx context.Context, tx types.Transaction
368368
return fmt.Errorf("error getting app metadata and settings: %w", err)
369369
}
370370
for _, app := range allApps {
371-
app.metadata.AuthnType = app.settings.AuthnType
372-
app.settings.AuthnType = ""
373-
app.metadata.GitAuthName = app.settings.GitAuthName
374-
app.settings.GitAuthName = ""
371+
app.metadata.AuthnType = app.settings.AuthnType //nolint:staticcheck // deprecated
372+
app.settings.AuthnType = "" //nolint:staticcheck // deprecated
373+
app.metadata.GitAuthName = app.settings.GitAuthName // nolint:staticcheck // deprecated
374+
app.settings.GitAuthName = "" //nolint:staticcheck // deprecated
375375
err := m.updateAppMetadata(ctx, tx, app.path, app.domain, app.metadata)
376376
if err != nil {
377377
return fmt.Errorf("error updating app metadata: %w", err)

internal/types/types.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,9 @@ type AppMetadata struct {
423423

424424
// AppSettings contains the settings for an app. Settings are not version controlled.
425425
type AppSettings struct {
426-
AuthnType AppAuthnType `json:"authn_type"`
426+
//Deprecated: use AppMetadata.AuthnType instead
427+
AuthnType AppAuthnType `json:"authn_type"`
428+
//Deprecated: use AppMetadata.GitAuthName instead
427429
GitAuthName string `json:"git_auth_name"`
428430
StageWriteAccess bool `json:"stage_write_access"`
429431
PreviewWriteAccess bool `json:"preview_write_access"`

0 commit comments

Comments
 (0)