diff --git a/CHANGELOG.md b/CHANGELOG.md index 95915ff..c24292f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html ## Unreleased ### Compatible changes +* `geordi branch` and `geordi commit` will now order the list of suggested issues by team ### Breaking changes diff --git a/lib/geordi/linear_client.rb b/lib/geordi/linear_client.rb index 16a39f0..006e2cf 100644 --- a/lib/geordi/linear_client.rb +++ b/lib/geordi/linear_client.rb @@ -39,7 +39,8 @@ def choose_issue if issues.empty? Geordi::Interaction.fail('No issues to offer.') end - issues.sort_by! { |i| -i.dig('state', 'position') } + team_ids = settings.linear_team_ids + issues.sort_by! { |i| [team_ids.index(i.dig('team', 'id')), -i.dig('state', 'position')] } highline.choose do |menu| max_label_length = 60