linear-cli 0.8.0 → 0.8.1

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: f3115a9533c74319bbb8bafd878f9e60c60a26c557909b35cf4fff8b16870a14
4
- data.tar.gz: a98d826dcfe32a3c569a73ec3df15e639d38511a8107b7e86b6c25238e6f3bb8
3
+ metadata.gz: b95ed9950a87c2cf56f05af3403d55d1a13a85ad14d7ac336364d5be83ec94de
4
+ data.tar.gz: 34fa63ba23ac7ad34be83bbcc65916f4463b85c5aa47747097effdcfd51c76d2
5
5
  SHA512:
6
- metadata.gz: 2b632968d2cfcfa38f9e54097c215043d7576529fe6417f44e6acbc741305ec5e8e822d59cf460f92257c556d5042b68559dbc41875a8faf5110b4d88e153c08
7
- data.tar.gz: 3c853989005ac06d6e6899da1b763a6615ca8924e893e2de2dd0d9632e1397a30a2a8d535af80f8e6c4ed42ffe8260476241cd732afb14924069d753b5336827
6
+ metadata.gz: 483f8bac18d150ecfc57b906ec5f46e17fe46825632e09964779ac5b19c9b31ac83ae1d75c971bd619c03fe38273d17bf822e62d1b09b32fb3e6ea6eb5e328de
7
+ data.tar.gz: 3f19d6344f4683fad3eb5b60306941903563fc38879fe1a671930374920dc87b9ee47c188e79604cc587882a354a145a223089cbe8ae1b9ac1466ebaccae32a9
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.8.1] - 2024-02-06
6
+ ### Fixed
7
+ - Fixed problem with setting verbosity (@bougyman)
8
+
5
9
  ## [0.8.0] - 2024-02-06
6
10
  ### Added
7
11
  - Added Containerfile to build oci image (@bougyman)
@@ -55,8 +59,9 @@
55
59
  ### Added
56
60
  - Added new changelog management system (changelog-rb) (@bougyman)
57
61
 
58
- [Unreleased]: https://github.com/rubyists/linear-cli/compare/0.8.0...HEAD
59
- [0.8.0]: https://github.com/rubyists/linear-cli/compare/v0.7.7...0.8.0
62
+ [Unreleased]: https://github.com/rubyists/linear-cli/compare/0.8.1...HEAD
63
+ [0.8.1]: https://github.com/rubyists/linear-cli/compare/v0.8.0...0.8.1
64
+ [0.8.0]: https://github.com/rubyists/linear-cli/compare/v0.7.7...v0.8.0
60
65
  [0.7.7]: https://github.com/rubyists/linear-cli/compare/v0.7.5...v0.7.7
61
66
  [0.7.5]: https://github.com/rubyists/linear-cli/compare/v0.7.3...v0.7.5
62
67
  [0.7.3]: https://github.com/rubyists/linear-cli/compare/v0.7.2...v0.7.3
@@ -0,0 +1,4 @@
1
+ type: Fixed
2
+ title: >
3
+ Fixed problem with setting verbosity
4
+ author: bougyman
@@ -0,0 +1 @@
1
+ date: 2024-02-06
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env bash
2
- exec linear-cli issue update --comment - "$@"
2
+ exec lc issue update --comment - "$@"
@@ -5,6 +5,7 @@ module Rubyists
5
5
  module CLI
6
6
  # This module is prepended to all commands to log their calls
7
7
  module Caller
8
+ include SemanticLogger::Loggable
8
9
  def self.prepended(mod) # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
9
10
  # Global options for all commands
10
11
  mod.instance_eval do
@@ -25,6 +26,7 @@ module Rubyists
25
26
  logger.trace "Calling #{self.class} with #{method_args}"
26
27
  super(**method_args)
27
28
  rescue SmellsBad => e
29
+ require 'pry'; binding.pry
28
30
  logger.error e.message
29
31
  exit 1
30
32
  rescue NotFoundError => e
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Rubyists
4
4
  module Linear
5
- VERSION = '0.8.0'
5
+ VERSION = '0.8.1'
6
6
  end
7
7
  end
@@ -15,12 +15,7 @@ module Rubyists
15
15
  end
16
16
 
17
17
  def comment_for(issue, comment)
18
- return comment unless comment.nil? || comment == '-'
19
-
20
- comment = prompt.ask("Comment for #{issue.identifier} - #{issue.title} (- to open an editor)", default: '-')
21
- return comment unless comment == '-'
22
-
23
- editor_for %w[comment .md]
18
+ ask_or_edit comment, "Comment for #{issue.identifier} - #{issue.title}"
24
19
  end
25
20
 
26
21
  def team_for(key = nil)
@@ -30,13 +25,8 @@ module Rubyists
30
25
  end
31
26
 
32
27
  def reason_for(reason = nil, four: nil)
33
- return reason if reason && reason != '-'
34
-
35
28
  question = four ? "Reason for #{TTY::Markdown.parse(four)}" : 'Reason'
36
- answer = prompt.ask("#{question} (- to open an editor):", default: '-')
37
- return answer unless answer == '-'
38
-
39
- editor_for %w[reason .md]
29
+ ask_or_edit reason, question
40
30
  end
41
31
 
42
32
  def cancelled_state_for(thingy)
@@ -55,10 +45,20 @@ module Rubyists
55
45
  Rubyists::Linear::WorkflowState.find selection
56
46
  end
57
47
 
58
- def description_for(description = nil)
59
- return description if description
48
+ def ask_or_edit(thing, question)
49
+ return thing if thing && thing != '-'
60
50
 
61
- prompt.multiline('Description:').map(&:chomp).join('\\n')
51
+ answer = prompt.ask("#{question}: ('-' to open an editor)", default: '-')
52
+ return answer unless answer == '-'
53
+
54
+ answer = editor_for [thing, '.md']
55
+ raise SmellsBad, "No content provided for #{question}" if answer.empty?
56
+
57
+ answer
58
+ end
59
+
60
+ def description_for(description = nil)
61
+ ask_or_edit description, 'Description'
62
62
  end
63
63
 
64
64
  def title_for(title = nil)
data/lib/linear.rb CHANGED
@@ -59,6 +59,7 @@ module Rubyists
59
59
  @verbosity = debug
60
60
  level = @verbosity > (DEBUG_LEVELS.size - 1) ? :trace : DEBUG_LEVELS[@verbosity]
61
61
  SemanticLogger.default_level = level
62
+ @verbosity
62
63
  end
63
64
  end
64
65
  end
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.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tj (bougyman) Vanderpoel
@@ -236,6 +236,8 @@ files:
236
236
  - changelog/0.7.7/tag.yml
237
237
  - changelog/0.8.0/added_containerfile_to_build_oci_image.yml
238
238
  - changelog/0.8.0/tag.yml
239
+ - changelog/0.8.1/fixed_problem_with_setting_verbosity.yml
240
+ - changelog/0.8.1/tag.yml
239
241
  - changelog/unreleased/.gitkeep
240
242
  - cinemas/listings.cinema
241
243
  - cinemas/listings.cinema.gif