linear-cli 0.8.4 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: be7d89c8525d2e878c4b092b0e648fa2df2fd8e50fe2f9dbf4e8bc8fc485d01c
4
- data.tar.gz: 2aae40e3bb4c38f98cbf96b555fa0168f6e3979edf0cd41e18bfc531880a4c21
3
+ metadata.gz: aa24cd1254fe2c0bc65f7eb7f72af3db8f90a9ad063490a1494212db24acb95e
4
+ data.tar.gz: 18184020027e3d061cb4c0080f16dc0caca227d59a29516071acfb9f33a8c5b2
5
5
  SHA512:
6
- metadata.gz: af51a54a3c17787e21fbe31db483e13553bf0028ff1b518667b37f67f75b2898f42f88746ebf0b15081c21af79c605306307250f4b456f083b90e6e1c351c511
7
- data.tar.gz: b5e99a0c3c2a004cd4ffb8060959ae84c429ed5b5b7f4756067d8af82d576667e8159b55df11c7a7519d8fe21a5c2a7c71b7b50130c11937865b6eda8af3e334
6
+ metadata.gz: f76b2b58a5e16871debfce914992b6cc83267fa75208f828c31fa1639e83e01652e33abad18ebdd2ca6f66ab37170a29066534aaddc6c1a7c25855258556a8ee
7
+ data.tar.gz: fb8c170846765e58120a7a2f43914e039321ba8ff493a7274d8142dfce19351dd111b7072a68abcef297ad05aae7e90cf7ec48e3a1953c819d4834ccf7250316
data/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.9.0] - 2024-02-06
6
+ ### Added
7
+ - Added version. Ready for 0.9.0, now test-test-test-test before 1.0 (@bougyman)
8
+
9
+ ## [0.8.6] - 2024-02-06
10
+ ### Fixed
11
+ - Fixed completion for lc alias (@bougyman)
12
+
5
13
  ## [0.8.4] - 2024-02-06
6
14
  ### Added
7
15
  - Added version command (@bougyman)
@@ -63,8 +71,10 @@
63
71
  ### Added
64
72
  - Added new changelog management system (changelog-rb) (@bougyman)
65
73
 
66
- [Unreleased]: https://github.com/rubyists/linear-cli/compare/0.8.4...HEAD
67
- [0.8.4]: https://github.com/rubyists/linear-cli/compare/v0.8.1...0.8.4
74
+ [Unreleased]: https://github.com/rubyists/linear-cli/compare/0.9.0...HEAD
75
+ [0.9.0]: https://github.com/rubyists/linear-cli/compare/v0.8.6...0.9.0
76
+ [0.8.6]: https://github.com/rubyists/linear-cli/compare/v0.8.4...v0.8.6
77
+ [0.8.4]: https://github.com/rubyists/linear-cli/compare/v0.8.1...v0.8.4
68
78
  [0.8.1]: https://github.com/rubyists/linear-cli/compare/v0.8.0...v0.8.1
69
79
  [0.8.0]: https://github.com/rubyists/linear-cli/compare/v0.7.7...v0.8.0
70
80
  [0.7.7]: https://github.com/rubyists/linear-cli/compare/v0.7.5...v0.7.7
data/Readme.adoc CHANGED
@@ -57,15 +57,21 @@ bash:
57
57
 
58
58
  [source,sh]
59
59
  ----
60
- eval "$(lc completion bash)"
60
+ eval "$(lc completion bash)" <1>
61
+ eval "$(lc completion -a bash)" <2>
61
62
  ----
63
+ <1> This will enable tab completion for the 'lc' command in bash
64
+ <2> This will include the subcommand aliases as well
62
65
 
63
66
  zsh:
64
67
 
65
68
  [source,sh]
66
69
  ----
67
- eval "$(lc completion zsh)"
70
+ eval "$(lc completion zsh)" <1>
71
+ eval "$(lc completion -a zsh)" <2>
68
72
  ----
73
+ <1> This will enable tab completion for the 'lc' command in zsh
74
+ <2> This will include the subcommand aliases as well
69
75
 
70
76
  === Commands
71
77
 
@@ -82,13 +88,16 @@ $ lc [COMMAND] [SUBCOMMAND] --help
82
88
 
83
89
  ==== Who Am I?
84
90
 
85
- You can use the 'w' alias for 'whoami'
91
+ You can use the 'w' alias for 'whoami' (or whodat, for Saints fans)
86
92
 
87
93
  [source,sh]
88
94
  ----
89
95
  $ lc whoami
90
- $ lc w --teams
96
+ $ lc whodat <1>
97
+ $ lc w --teams <2>
91
98
  ----
99
+ <1> Bayou style
100
+ <2> Include the teams you are a member of
92
101
 
93
102
  ==== List Issues
94
103
 
@@ -125,6 +134,8 @@ $ lc i c -t "My new issue" -T CRY -l Improvement,Feature
125
134
 
126
135
  NOTE: If you don't provide a title, team, labels or description, you will be prompted to enter them.
127
136
 
137
+ TIP: When creating an issue, you can use the --dev option to immediately start development on the issue.
138
+
128
139
  ==== Develop an issue
129
140
 
130
141
  This will switch to the branch for the issue, creating the branch if it doesn't exist.
@@ -136,7 +147,14 @@ This will switch to the branch for the issue, creating the branch if it doesn't
136
147
  $ lc i dev CRY-1234
137
148
  ----
138
149
 
139
- TIP: You may pass the --dev option to the create subcommand to immediately develop the created issue.
150
+ ===== Create a Pull Request (Using the Semantic PR Title)
151
+
152
+ Requires the `gh` cli to be installed and configured.
153
+
154
+ [source,sh]
155
+ ----
156
+ $ lc i pr CRY-1234
157
+ ----
140
158
 
141
159
  ==== Update an issue
142
160
 
@@ -148,12 +166,16 @@ at a time. You can also use the 'u' alias for 'update', and as always, the 'i' a
148
166
  [source,sh]
149
167
  ----
150
168
  $ lc issue update --comment "Here is a comment" CRY-1234 <1>
151
- $ lc issue update --comment - CRY-14 CRY-15 <2>
152
- $ lcomment CRY-1234 CRY-3 <3>
153
- ----
154
- <1> This will use the provided comment
155
- <2> This will prompt for a comment (use '-' to prompt)
156
- <3> This will always prompt you for a comment ('lcomment' is an alias for 'lc issue update --comment -')
169
+ $ lc issue u --close --reason "I do not like you" CRY-14 CRY-15 <2>
170
+ $ lc i u --cancel --trash --reason "I have no idea why you are here" CRY-16 CRY-17 <3>
171
+ $ lc i u --comment - CRY-14 CRY-15 <4>
172
+ $ lcomment CRY-1234 CRY-3 <5>
173
+ ----
174
+ <1> This will use the provided comment to comment on the issue
175
+ <2> This will close multiple issues without prompting (reason is added as a comment)
176
+ <3> This will cancel multiple issues without prompting, and move them to the trash (reason is added as a comment)
177
+ <4> This will prompt for a comment (use '-' to prompt)
178
+ <5> This will always prompt you for a comment ('lcomment' is an alias for 'lc issue update --comment -')
157
179
 
158
180
  ===== Close one or many issues
159
181
 
@@ -0,0 +1,4 @@
1
+ type: Fixed
2
+ title: >
3
+ Fixed completion for lc alias
4
+ author: bougyman
@@ -0,0 +1 @@
1
+ date: 2024-02-06
@@ -0,0 +1,4 @@
1
+ type: Added
2
+ title: >
3
+ Added version. Ready for 0.9.0, now test-test-test-test before 1.0
4
+ author: bougyman
@@ -0,0 +1 @@
1
+ date: 2024-02-06
data/exe/scripts/lc.sh CHANGED
@@ -9,13 +9,17 @@ then
9
9
  fi
10
10
  if [[ "$*" =~ --help|-h ]]
11
11
  then
12
- printf "Each subcommand has its own help, use 'lc <subcommand> --help' to see it\n" >&2
12
+ printf "Each subcommand has its own help, use 'lc <subcommand> --help' to see them\n" >&2
13
13
  linear-cli "$@" 2>&1|sed 's/linear-cli/lc/g'
14
14
  exit 0
15
15
  fi
16
16
  linear-cli "$@"
17
17
  result=$?
18
18
  if [ $result -gt 1 ]; then
19
+ if [ $result -eq 130 ]; then
20
+ printf "\n\nlc: linear-cli interrupted\n" >&2
21
+ exit 130
22
+ fi
19
23
  printf "lc: linear-cli failed %s\n" $result >&2
20
24
  lc "$@" --help 2>&1
21
25
  exit 1
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Rubyists
4
4
  module Linear
5
- VERSION = '0.8.4'
5
+ VERSION = '0.9.0'
6
6
  end
7
7
  end
data/lib/linear/cli.rb CHANGED
@@ -7,6 +7,31 @@ require 'semantic_logger'
7
7
  require 'tty-markdown'
8
8
  require 'tty-prompt'
9
9
 
10
+ module Dry
11
+ class CLI
12
+ module Completion
13
+ # Monkeypatching the Generator just to add our 'lc' alias :(
14
+ class Generator
15
+ def call(shell:, include_aliases: false, out: StringIO.new) # rubocop:disable Metrics/MethodLength
16
+ raise ArgumentError, 'Unknown shell' unless SUPPORTED_SHELLS.include?(shell)
17
+
18
+ if shell == ZSH
19
+ out.puts '# enable bash completion support, see https://github.com/dannyben/completely#completions-in-zsh'
20
+ out.puts 'autoload -Uz +X compinit && compinit'
21
+ out.puts 'autoload -Uz +X bashcompinit && bashcompinit'
22
+ end
23
+
24
+ out.puts Completely::Completions.new(
25
+ Input.new(@registry, @program_name).call(include_aliases:)
26
+ ).script
27
+ out.puts 'complete -F _linear-cli_completions lc'
28
+ out.string
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
34
+
10
35
  # The Rubyists module is the top-level namespace for all Rubyists projects
11
36
  module Rubyists
12
37
  module Linear
@@ -54,12 +79,13 @@ module Rubyists
54
79
  end
55
80
  end
56
81
 
57
- Pathname.new(__FILE__).dirname.join('cli').glob('*.rb').each do |file|
82
+ # Load CLI Helpers/libraries
83
+ Pathname.new(__dir__).join('cli').glob('*.rb').each do |file|
58
84
  require file.expand_path
59
85
  end
60
86
 
61
- # Load all our commands
62
- Pathname.new(__FILE__).dirname.join('commands').glob('*.rb').each do |file|
87
+ # Load all our commands and subcommands
88
+ Pathname.new(__dir__).join('commands').glob('*.rb').each do |file|
63
89
  require file.expand_path
64
90
  end
65
91
 
@@ -67,6 +93,7 @@ module Rubyists
67
93
  # Open this back up to register 3rd party/other commands
68
94
  module CLI
69
95
  register 'completion', Dry::CLI::Completion::Command[self]
96
+ # NOTE: We have monkeypatched the Generator to add our 'lc' alias
70
97
  end
71
98
  end
72
99
  end
data/oci/Containerfile CHANGED
@@ -28,5 +28,5 @@ RUN apk --update --no-cache add $PACKAGES
28
28
  COPY --from=build-env /app/pkg /tmp
29
29
  RUN ls /tmp/*.gem && gem install /tmp/*.gem
30
30
 
31
- CMD %w[bundle exec lc]
31
+ CMD ["bundle", "exec", "lc"]
32
32
 
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.4
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tj (bougyman) Vanderpoel
@@ -240,6 +240,10 @@ files:
240
240
  - changelog/0.8.1/tag.yml
241
241
  - changelog/0.8.4/added_version_command.yml
242
242
  - changelog/0.8.4/tag.yml
243
+ - changelog/0.8.6/fixed_completion_for_lc_alias.yml
244
+ - changelog/0.8.6/tag.yml
245
+ - changelog/0.9.0/added_version_ready_for_0_9_0_now_test_test_test_test_before_1_0.yml
246
+ - changelog/0.9.0/tag.yml
243
247
  - changelog/unreleased/.gitkeep
244
248
  - cinemas/listings.cinema
245
249
  - cinemas/listings.cinema.gif