File tree Expand file tree Collapse file tree 5 files changed +8
-6
lines changed
Expand file tree Collapse file tree 5 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 11PATH
22 remote: .
33 specs:
4- linear-cli (0.7.0 )
4+ linear-cli (0.7.1 )
55 base64 (~> 0.2 )
66 dry-cli (~> 1.0 )
77 dry-cli-completion (~> 1.0 )
Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ def make_da_issue!(**options)
6161
6262 def gimme_da_issue! ( issue_id , me : Rubyists ::Linear ::User . me ) # rubocop:disable Naming/MethodParameterName
6363 logger . trace ( 'Looking up issue' , issue_id :, me :)
64+ require 'pry' ; binding . pry
6465 issue = Rubyists ::Linear ::Issue . find ( issue_id )
6566 if issue . assignee && issue . assignee [ :id ] == me . id
6667 prompt . say ( "You are already assigned #{ issue_id } " )
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ class Develop
2222
2323 def call ( issue_id :, **options )
2424 logger . debug ( 'Developing issue' , options :)
25- issue = gimme_da_issue! ( issue_id , Rubyists ::Linear ::User . me )
25+ issue = gimme_da_issue! ( issue_id , me : Rubyists ::Linear ::User . me )
2626 branch_name = issue . branchName
2727 branch = branch_for ( branch_name )
2828 branch . checkout
Original file line number Diff line number Diff line change @@ -34,11 +34,12 @@ def self.included(base) # rubocop:disable Metrics/MethodLength
3434
3535 # Class methods for Linear models.
3636 class << self
37- def has_one ( relation , klass ) # rubocop:disable Naming/PredicateName
37+ def one_to_one ( relation , klass )
3838 define_method relation do
3939 return instance_variable_get ( "@#{ relation } " ) if instance_variable_defined? ( "@#{ relation } " )
40+ return unless ( val = data [ relation ] )
4041
41- instance_variable_set ( "@#{ relation } " , Rubyists ::Linear . const_get ( klass ) . new ( data [ relation ] ) )
42+ instance_variable_set ( "@#{ relation } " , Rubyists ::Linear . const_get ( klass ) . new ( val ) )
4243 end
4344
4445 define_method "#{ relation } =" do |val |
Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ module Linear
1010 # The Issue class represents a Linear issue.
1111 class Issue # rubocop:disable Metrics/ClassLength
1212 include SemanticLogger ::Loggable
13- has_one :assignee , :User
14- has_one :team , :Team
13+ one_to_one :assignee , :User
14+ one_to_one :team , :Team
1515
1616 BASIC_FILTER = { completedAt : { null : true } } . freeze
1717
You can’t perform that action at this time.
0 commit comments