linear-cli 0.7.0 → 0.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c16946d45cad9729159c78931d6200a4573df9acaff1994b86e2f542adc11427
4
- data.tar.gz: d2c8befedabc5771412f707e43edd375bd24ae48f6d6bb3acc658010ec168c91
3
+ metadata.gz: c38ce0d4479af4333da0e0a1e509fe29e9b3e317405362d3d11fda4bdfa0e5bd
4
+ data.tar.gz: f0c2933ac355c454bceaba5060727ebf403278b70a3b995d6f5051ca8ee13656
5
5
  SHA512:
6
- metadata.gz: '081e4dd2dac54ec954c83b88f47a4734351a782eff189fed6ed482df2cbb626cce9a6da7365a06239b58418259857c04fd2cc929f678ae37e1425952955b1dd5'
7
- data.tar.gz: 0a5d7b545b2d69f5b8cddaed3aee0e57d1adef50a58f0234ff03b09ab7f39a0edb72765cde3ce7be66968c38a2df98828e1746731f86a7284207cc29af26574d
6
+ metadata.gz: 726602148e3a8456f6b7dbdf90f39d3511bb1349ccb2701ff52449dfc9258df2843360e4d5643d67cca9b99a991671a92b76a8d93920c0976fe699a29e3bdfdc
7
+ data.tar.gz: 06a4a410223951ab0b65ce304b9433fc6400fe9d592f3c76d52cce611cf87b00c7020588cdd42c84d05adce01760f8a4a06d8b22f5765fbe5e4d0b16a468f1fa
data/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.7.2] - 2024-02-04
6
+ ### Fixed
7
+ - Fixed problem when trying to develop an unassigned issue (@bougyman)
8
+
9
+ ## [0.7.1] - 2024-02-04
10
+ ### Fixed
11
+ - Fixed extra output when commenting on an inssue (@bougyman)
12
+
5
13
  ## [0.7.0] - 2024-02-04
6
14
  ### Added
7
15
  - Added better help when using the lc bin and aliases (@bougyman)
@@ -29,8 +37,10 @@
29
37
  ### Added
30
38
  - Added new changelog management system (changelog-rb) (@bougyman)
31
39
 
32
- [Unreleased]: https://github.com/rubyists/linear-cli/compare/0.7.0...HEAD
33
- [0.7.0]: https://github.com/rubyists/linear-cli/compare/v0.6.1...0.7.0
40
+ [Unreleased]: https://github.com/rubyists/linear-cli/compare/0.7.2...HEAD
41
+ [0.7.2]: https://github.com/rubyists/linear-cli/compare/v0.7.1...0.7.2
42
+ [0.7.1]: https://github.com/rubyists/linear-cli/compare/v0.7.0...v0.7.1
43
+ [0.7.0]: https://github.com/rubyists/linear-cli/compare/v0.6.1...v0.7.0
34
44
  [0.6.1]: https://github.com/rubyists/linear-cli/compare/v0.6.0...v0.6.1
35
45
  [0.6.0]: https://github.com/rubyists/linear-cli/compare/v0.5.5...v0.6.0
36
46
  [0.5.5]: https://github.com/rubyists/linear-cli/compare/v0.5.4...v0.5.5
@@ -0,0 +1,4 @@
1
+ type: Fixed
2
+ title: >
3
+ Fixed extra output when commenting on an inssue
4
+ author: bougyman
@@ -0,0 +1 @@
1
+ date: 2024-02-04
@@ -0,0 +1,4 @@
1
+ type: Fixed
2
+ title: >
3
+ Fixed problem when trying to develop an unassigned issue
4
+ author: bougyman
@@ -0,0 +1 @@
1
+ date: 2024-02-04
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Rubyists
4
4
  module Linear
5
- VERSION = '0.7.0'
5
+ VERSION = '0.7.2'
6
6
  end
7
7
  end
@@ -22,7 +22,7 @@ module Rubyists
22
22
 
23
23
  def call(issue_id:, **options)
24
24
  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)
26
26
  branch_name = issue.branchName
27
27
  branch = branch_for(branch_name)
28
28
  branch.checkout
@@ -26,6 +26,7 @@ module Rubyists
26
26
 
27
27
  def call(issue_ids:, **options)
28
28
  prompt.error('You should provide at least one issue ID') && raise(SmellsBad) if issue_ids.empty?
29
+
29
30
  logger.debug('Updating issues', issue_ids:, options:)
30
31
  Rubyists::Linear::Issue.find_all(issue_ids).each do |issue|
31
32
  update_issue(issue, **options)
@@ -22,7 +22,6 @@ module Rubyists
22
22
  issue: %w[i issues] # aliases for the main issue command itself
23
23
  }.freeze
24
24
 
25
-
26
25
  def issue_comment(issue, comment)
27
26
  issue.add_comment(comment)
28
27
  prompt.ok("Comment added to #{issue.identifier}")
@@ -45,6 +44,7 @@ module Rubyists
45
44
  issue_comment(issue, options[:comment]) if options[:comment]
46
45
  return close_issue(issue, **options) if options[:close]
47
46
  return issue_pr(issue) if options[:pr]
47
+ return if options[:comment]
48
48
 
49
49
  prompt.warn('No action taken, no options specified')
50
50
  prompt.ok('Issue was not updated')
@@ -61,6 +61,7 @@ module Rubyists
61
61
 
62
62
  def gimme_da_issue!(issue_id, me: Rubyists::Linear::User.me) # rubocop:disable Naming/MethodParameterName
63
63
  logger.trace('Looking up issue', issue_id:, me:)
64
+ require 'pry'; binding.pry
64
65
  issue = Rubyists::Linear::Issue.find(issue_id)
65
66
  if issue.assignee && issue.assignee[:id] == me.id
66
67
  prompt.say("You are already assigned #{issue_id}")
@@ -34,11 +34,12 @@ module Rubyists
34
34
 
35
35
  # Class methods for Linear models.
36
36
  class << self
37
- def has_one(relation, klass) # rubocop:disable Naming/PredicateName
37
+ def one_to_one(relation, klass)
38
38
  define_method relation do
39
39
  return instance_variable_get("@#{relation}") if instance_variable_defined?("@#{relation}")
40
+ return unless (val = data[relation])
40
41
 
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))
42
43
  end
43
44
 
44
45
  define_method "#{relation}=" do |val|
@@ -10,8 +10,8 @@ module Rubyists
10
10
  # The Issue class represents a Linear issue.
11
11
  class Issue # rubocop:disable Metrics/ClassLength
12
12
  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
15
15
 
16
16
  BASIC_FILTER = { completedAt: { null: true } }.freeze
17
17
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: linear-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tj (bougyman) Vanderpoel
@@ -211,6 +211,10 @@ files:
211
211
  - changelog/0.6.1/tag.yml
212
212
  - changelog/0.7.0/added_better_help_when_using_the_lc_bin_and_aliases.yml
213
213
  - changelog/0.7.0/tag.yml
214
+ - changelog/0.7.1/fixed_extra_output_when_commenting_on_an_inssue.yml
215
+ - changelog/0.7.1/tag.yml
216
+ - changelog/0.7.2/fixed_problem_when_trying_to_develop_an_unassigned_issue.yml
217
+ - changelog/0.7.2/tag.yml
214
218
  - changelog/unreleased/.gitkeep
215
219
  - exe/lc
216
220
  - exe/lc.sh