linear-cli 0.6.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -2
- data/Readme.adoc +10 -0
- data/changelog/0.6.1/added_lcreate_alias.yml +4 -0
- data/changelog/0.6.1/tag.yml +1 -0
- data/changelog/0.7.0/added_better_help_when_using_the_lc_bin_and_aliases.yml +4 -0
- data/changelog/0.7.0/tag.yml +1 -0
- data/exe/lc +1 -3
- data/exe/lc.sh +17 -0
- data/exe/lclose.sh +2 -2
- data/exe/lcls.sh +1 -1
- data/exe/lcreate +4 -0
- data/exe/lcreate.sh +2 -0
- data/exe/linear-cli +6 -0
- data/lib/linear/cli/caller.rb +1 -0
- data/lib/linear/cli/version.rb +1 -1
- data/lib/linear/cli.rb +0 -1
- data/lib/linear/commands/issue/update.rb +3 -2
- data/lib/linear/commands/issue.rb +4 -0
- data/lib/linear/commands/team.rb +2 -0
- metadata +13 -2
- data/sig/linear/cli.rbs +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c16946d45cad9729159c78931d6200a4573df9acaff1994b86e2f542adc11427
|
4
|
+
data.tar.gz: d2c8befedabc5771412f707e43edd375bd24ae48f6d6bb3acc658010ec168c91
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '081e4dd2dac54ec954c83b88f47a4734351a782eff189fed6ed482df2cbb626cce9a6da7365a06239b58418259857c04fd2cc929f678ae37e1425952955b1dd5'
|
7
|
+
data.tar.gz: 0a5d7b545b2d69f5b8cddaed3aee0e57d1adef50a58f0234ff03b09ab7f39a0edb72765cde3ce7be66968c38a2df98828e1746731f86a7284207cc29af26574d
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,14 @@
|
|
2
2
|
|
3
3
|
## [Unreleased]
|
4
4
|
|
5
|
+
## [0.7.0] - 2024-02-04
|
6
|
+
### Added
|
7
|
+
- Added better help when using the lc bin and aliases (@bougyman)
|
8
|
+
|
9
|
+
## [0.6.1] - 2024-02-04
|
10
|
+
### Added
|
11
|
+
- Added lcreate alias (@bougyman)
|
12
|
+
|
5
13
|
## [0.6.0] - 2024-02-04
|
6
14
|
|
7
15
|
## [0.5.5] - 2024-02-04
|
@@ -21,8 +29,10 @@
|
|
21
29
|
### Added
|
22
30
|
- Added new changelog management system (changelog-rb) (@bougyman)
|
23
31
|
|
24
|
-
[Unreleased]: https://github.com/rubyists/linear-cli/compare/0.
|
25
|
-
[0.
|
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
|
34
|
+
[0.6.1]: https://github.com/rubyists/linear-cli/compare/v0.6.0...v0.6.1
|
35
|
+
[0.6.0]: https://github.com/rubyists/linear-cli/compare/v0.5.5...v0.6.0
|
26
36
|
[0.5.5]: https://github.com/rubyists/linear-cli/compare/v0.5.4...v0.5.5
|
27
37
|
[0.5.4]: https://github.com/rubyists/linear-cli/compare/v0.5.3...v0.5.4
|
28
38
|
[0.5.3]: https://github.com/rubyists/linear-cli/compare/v0.5.2...v0.5.3
|
data/Readme.adoc
CHANGED
@@ -139,3 +139,13 @@ $ lc issue update --comment "Here is a comment" CRY-1234
|
|
139
139
|
$ lc i u --close --reason "These were closable" CRY-1234 CRY-2
|
140
140
|
----
|
141
141
|
|
142
|
+
=== Aliases
|
143
|
+
|
144
|
+
Some command aliases are available to make things easier to type.
|
145
|
+
|
146
|
+
[source,sh]
|
147
|
+
----
|
148
|
+
$ lcls
|
149
|
+
$ lcreate --description "This is a new issue" --labels Bug,Feature --team CRY
|
150
|
+
$ lclose --reason "This issues suck" CRY-1234 CRY-456
|
151
|
+
----
|
@@ -0,0 +1 @@
|
|
1
|
+
date: 2024-02-04
|
@@ -0,0 +1 @@
|
|
1
|
+
date: 2024-02-04
|
data/exe/lc
CHANGED
data/exe/lc.sh
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
if [ "$#" -eq 0 ]; then
|
3
|
+
printf "No subcommand provided, defaulting to 'lc issue list'\nlc --help to see subcommands\n" >&2
|
4
|
+
exec linear-cli issue list
|
5
|
+
fi
|
6
|
+
if [[ "$*" =~ --help|-h ]]
|
7
|
+
then
|
8
|
+
printf "Each subcommand has its own help, use 'lc <subcommand> --help' to see it\n" >&2
|
9
|
+
linear-cli "$@" 2>&1|sed 's/linear-cli/lc/g'
|
10
|
+
exit 0
|
11
|
+
fi
|
12
|
+
if ! linear-cli "$@"
|
13
|
+
then
|
14
|
+
printf "lc: linear-cli failed\n" >&2
|
15
|
+
lc "$@" --help 2>&1
|
16
|
+
exit 1
|
17
|
+
fi
|
data/exe/lclose.sh
CHANGED
@@ -4,6 +4,6 @@ then
|
|
4
4
|
printf "This wrapper adds the --close option to the 'issue update' command.\n" >&2
|
5
5
|
printf "It is used to close one or many issues. The issues are specified by their ID/slugs.\n" >&2
|
6
6
|
printf "For closing multiple issues, you really want to pass --reason so you do not get prompted for each issue.\n\n" >&2
|
7
|
-
exec
|
7
|
+
exec linear-cli issue update --help
|
8
8
|
fi
|
9
|
-
exec
|
9
|
+
exec linear-cli issue update --close "$@"
|
data/exe/lcls.sh
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
#!/usr/bin/env bash
|
2
|
-
exec
|
2
|
+
exec linear-cli issue list "$@"
|
data/exe/lcreate
ADDED
data/exe/lcreate.sh
ADDED
data/exe/linear-cli
ADDED
data/lib/linear/cli/caller.rb
CHANGED
data/lib/linear/cli/version.rb
CHANGED
data/lib/linear/cli.rb
CHANGED
@@ -38,7 +38,6 @@ module Rubyists
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def self.load_and_register!(command)
|
41
|
-
logger.debug "Registering #{command}"
|
42
41
|
name = command.name.split('::').last.downcase
|
43
42
|
command_aliases = command::ALIASES[name.to_sym] || []
|
44
43
|
register name, aliases: Array(command_aliases) do |cmd|
|
@@ -19,12 +19,13 @@ module Rubyists
|
|
19
19
|
include Rubyists::Linear::CLI::Issue # for #gimme_da_issue! and other Issue methods
|
20
20
|
desc 'Update an issue'
|
21
21
|
argument :issue_ids, type: :array, required: true, desc: 'Issue IDs (i.e. ISS-1)'
|
22
|
-
option :comment, type: :string, aliases: ['
|
22
|
+
option :comment, type: :string, aliases: ['-m'], desc: 'Comment to add to the issue'
|
23
23
|
option :pr, type: :boolean, aliases: ['--pull-request'], default: false, desc: 'Create a pull request'
|
24
24
|
option :close, type: :boolean, default: false, desc: 'Close the issue'
|
25
|
-
option :reason, type: :string, aliases: ['--
|
25
|
+
option :reason, type: :string, aliases: ['--butwhy'], desc: 'Reason for closing the issue'
|
26
26
|
|
27
27
|
def call(issue_ids:, **options)
|
28
|
+
prompt.error('You should provide at least one issue ID') && raise(SmellsBad) if issue_ids.empty?
|
28
29
|
logger.debug('Updating issues', issue_ids:, options:)
|
29
30
|
Rubyists::Linear::Issue.find_all(issue_ids).each do |issue|
|
30
31
|
update_issue(issue, **options)
|
@@ -10,6 +10,9 @@ module Rubyists
|
|
10
10
|
# should be included in any command that deals with issues
|
11
11
|
module Issue
|
12
12
|
include CLI::SubCommands
|
13
|
+
|
14
|
+
DESCRIPTION = 'Manage issues'
|
15
|
+
|
13
16
|
# Aliases for Issue commands
|
14
17
|
ALIASES = {
|
15
18
|
create: %w[c new add], # aliases for the create command
|
@@ -19,6 +22,7 @@ module Rubyists
|
|
19
22
|
issue: %w[i issues] # aliases for the main issue command itself
|
20
23
|
}.freeze
|
21
24
|
|
25
|
+
|
22
26
|
def issue_comment(issue, comment)
|
23
27
|
issue.add_comment(comment)
|
24
28
|
prompt.ok("Comment added to #{issue.identifier}")
|
data/lib/linear/commands/team.rb
CHANGED
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.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tj (bougyman) Vanderpoel
|
@@ -183,10 +183,14 @@ email:
|
|
183
183
|
- tj@rubyists.com
|
184
184
|
executables:
|
185
185
|
- lc
|
186
|
+
- lc.sh
|
186
187
|
- lclose
|
187
188
|
- lclose.sh
|
188
189
|
- lcls
|
189
190
|
- lcls.sh
|
191
|
+
- lcreate
|
192
|
+
- lcreate.sh
|
193
|
+
- linear-cli
|
190
194
|
extensions: []
|
191
195
|
extra_rdoc_files: []
|
192
196
|
files:
|
@@ -203,12 +207,20 @@ files:
|
|
203
207
|
- changelog/0.5.5/added_lclose_alias_and_issue_update_subcommand.yml
|
204
208
|
- changelog/0.5.5/tag.yml
|
205
209
|
- changelog/0.6.0/tag.yml
|
210
|
+
- changelog/0.6.1/added_lcreate_alias.yml
|
211
|
+
- changelog/0.6.1/tag.yml
|
212
|
+
- changelog/0.7.0/added_better_help_when_using_the_lc_bin_and_aliases.yml
|
213
|
+
- changelog/0.7.0/tag.yml
|
206
214
|
- changelog/unreleased/.gitkeep
|
207
215
|
- exe/lc
|
216
|
+
- exe/lc.sh
|
208
217
|
- exe/lclose
|
209
218
|
- exe/lclose.sh
|
210
219
|
- exe/lcls
|
211
220
|
- exe/lcls.sh
|
221
|
+
- exe/lcreate
|
222
|
+
- exe/lcreate.sh
|
223
|
+
- exe/linear-cli
|
212
224
|
- lib/linear.rb
|
213
225
|
- lib/linear/api.rb
|
214
226
|
- lib/linear/cli.rb
|
@@ -236,7 +248,6 @@ files:
|
|
236
248
|
- lib/linear/models/workflow_state.rb
|
237
249
|
- lib/linear/version.rb
|
238
250
|
- linear-cli.gemspec
|
239
|
-
- sig/linear/cli.rbs
|
240
251
|
homepage: https://github.com/rubyists/linear-cli
|
241
252
|
licenses:
|
242
253
|
- MIT
|