Skip to content

Commit

Permalink
sorted workflow names for workflow tab
Browse files Browse the repository at this point in the history
Signed-off-by: muhammet.arikan <muhammetarikann@hotmail.com>
  • Loading branch information
marikann committed Mar 2, 2024
1 parent 4589b2d commit 6516e05
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/terminal/handler/ghworkflow/ghworkflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"errors"
"fmt"
"sort"
"strings"

"github.com/charmbracelet/bubbles/help"
Expand Down Expand Up @@ -175,6 +176,10 @@ func (m *ModelGithubWorkflow) syncTriggerableWorkflows(ctx context.Context) {
})
}

sort.SliceStable(tableRowsTriggerableWorkflow, func(i, j int) bool {
return tableRowsTriggerableWorkflow[i][0] < tableRowsTriggerableWorkflow[j][0]
})

m.tableTriggerableWorkflow.SetRows(tableRowsTriggerableWorkflow)

m.tableReady = true
Expand Down

0 comments on commit 6516e05

Please sign in to comment.