Skip to content

Commit

Permalink
Merge pull request #42 from marikann/muhammet-sort
Browse files Browse the repository at this point in the history
Sort workflow as alphabetical
  • Loading branch information
canack authored Mar 2, 2024
2 parents 4589b2d + 6516e05 commit f641332
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 f641332

Please sign in to comment.