Skip to content
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

Charms #186

Merged
merged 18 commits into from
Mar 4, 2024
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
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ Flags:
Use "overmind [command] --help" for more information about a command.
```

Set the environment variable `ACCESSIBLE` to `'true'` to enable screenreader mode.

## Examples

Upload a terraform plan to overmind for Blast Radius Analysis:
Expand Down
2 changes: 1 addition & 1 deletion cmd/bookmarks_create_bookmark.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func CreateBookmark(ctx context.Context, ready chan bool) int {
return 1
}

ctx, err = ensureToken(ctx, oi, []string{"changes:write"})
ctx, _, err = ensureToken(ctx, oi, []string{"changes:write"})
if err != nil {
log.WithContext(ctx).WithError(err).WithFields(lf).Error("failed to authenticate")
return 1
Expand Down
2 changes: 1 addition & 1 deletion cmd/bookmarks_get_affected_bookmarks.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func GetAffectedBookmarks(ctx context.Context, ready chan bool) int {
return 1
}

ctx, err = ensureToken(ctx, oi, []string{"changes:read"})
ctx, _, err = ensureToken(ctx, oi, []string{"changes:read"})
if err != nil {
log.WithContext(ctx).WithError(err).WithFields(lf).Error("failed to authenticate")
return 1
Expand Down
2 changes: 1 addition & 1 deletion cmd/bookmarks_get_bookmark.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func GetBookmark(ctx context.Context, ready chan bool) int {
return 1
}

ctx, err = ensureToken(ctx, oi, []string{"changes:read"})
ctx, _, err = ensureToken(ctx, oi, []string{"changes:read"})
if err != nil {
log.WithContext(ctx).WithError(err).WithFields(lf).Error("failed to authenticate")
return 1
Expand Down
4 changes: 2 additions & 2 deletions cmd/changes_end_change.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func EndChange(ctx context.Context, ready chan bool) int {
return 1
}

ctx, err = ensureToken(ctx, oi, []string{"changes:write"})
ctx, _, err = ensureToken(ctx, oi, []string{"changes:write"})
if err != nil {
log.WithContext(ctx).WithFields(lf).WithError(err).Error("failed to authenticate")
return 1
Expand All @@ -83,7 +83,7 @@ func EndChange(ctx context.Context, ready chan bool) int {
ctx, cancel := context.WithTimeout(ctx, timeout)
defer cancel()

changeUuid, err := getChangeUuid(ctx, oi, sdp.ChangeStatus_CHANGE_STATUS_HAPPENING, true)
changeUuid, err := getChangeUuid(ctx, oi, sdp.ChangeStatus_CHANGE_STATUS_HAPPENING, viper.GetString("ticket-link"), true)
if err != nil {
log.WithError(err).WithFields(lf).Error("failed to identify change")
return 1
Expand Down
4 changes: 2 additions & 2 deletions cmd/changes_get_change.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func GetChange(ctx context.Context, ready chan bool) int {
return 1
}

ctx, err = ensureToken(ctx, oi, []string{"changes:read"})
ctx, _, err = ensureToken(ctx, oi, []string{"changes:read"})
if err != nil {
log.WithContext(ctx).WithFields(lf).WithError(err).Error("failed to authenticate")
return 1
Expand All @@ -102,7 +102,7 @@ func GetChange(ctx context.Context, ready chan bool) int {
ctx, cancel := context.WithTimeout(ctx, timeout)
defer cancel()

changeUuid, err := getChangeUuid(ctx, oi, sdp.ChangeStatus(sdp.ChangeStatus_value[viper.GetString("status")]), true)
changeUuid, err := getChangeUuid(ctx, oi, sdp.ChangeStatus(sdp.ChangeStatus_value[viper.GetString("status")]), viper.GetString("ticket-link"), true)
if err != nil {
log.WithError(err).WithFields(lf).Error("failed to identify change")
return 1
Expand Down
2 changes: 1 addition & 1 deletion cmd/changes_list_changes.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func ListChanges(ctx context.Context, ready chan bool) int {
return 1
}

ctx, err = ensureToken(ctx, oi, []string{"changes:read"})
ctx, _, err = ensureToken(ctx, oi, []string{"changes:read"})
if err != nil {
log.WithContext(ctx).WithFields(lf).WithError(err).Error("failed to authenticate")
return 1
Expand Down
4 changes: 2 additions & 2 deletions cmd/changes_manual_change.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func ManualChange(ctx context.Context, ready chan bool) int {
return 1
}

ctx, err = ensureToken(ctx, oi, []string{"changes:write"})
ctx, _, err = ensureToken(ctx, oi, []string{"changes:write"})
if err != nil {
log.WithContext(ctx).WithFields(lf).WithError(err).Error("failed to authenticate")
return 1
Expand All @@ -88,7 +88,7 @@ func ManualChange(ctx context.Context, ready chan bool) int {
defer cancel()

client := AuthenticatedChangesClient(ctx, oi)
changeUuid, err := getChangeUuid(ctx, oi, sdp.ChangeStatus_CHANGE_STATUS_DEFINING, false)
changeUuid, err := getChangeUuid(ctx, oi, sdp.ChangeStatus_CHANGE_STATUS_DEFINING, viper.GetString("ticket-link"),false)
if err != nil {
log.WithContext(ctx).WithError(err).WithFields(lf).Error("failed to searching for existing changes")
return 1
Expand Down
4 changes: 2 additions & 2 deletions cmd/changes_start_change.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func StartChange(ctx context.Context, ready chan bool) int {
return 1
}

ctx, err = ensureToken(ctx, oi, []string{"changes:write"})
ctx, _, err = ensureToken(ctx, oi, []string{"changes:write"})
if err != nil {
log.WithContext(ctx).WithFields(lf).WithError(err).Error("failed to authenticate")
return 1
Expand All @@ -83,7 +83,7 @@ func StartChange(ctx context.Context, ready chan bool) int {
ctx, cancel := context.WithTimeout(ctx, timeout)
defer cancel()

changeUuid, err := getChangeUuid(ctx, oi, sdp.ChangeStatus_CHANGE_STATUS_DEFINING, true)
changeUuid, err := getChangeUuid(ctx, oi, sdp.ChangeStatus_CHANGE_STATUS_DEFINING,viper.GetString("ticket-link"), true)
if err != nil {
log.WithError(err).WithFields(lf).Error("failed to identify change")
return 1
Expand Down
Loading