linear-cli 0.6.1 → 0.7.1
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/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/changelog/0.7.1/fixed_extra_output_when_commenting_on_an_inssue.yml +4 -0
- data/changelog/0.7.1/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.sh +1 -1
- 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 +4 -2
- data/lib/linear/commands/issue.rb +4 -0
- data/lib/linear/commands/team.rb +2 -0
- metadata +9 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df0794178c2a028eeace27132cd5271f6b4e6b3002c36ba15d9b5548c5888cc2
|
4
|
+
data.tar.gz: 62e02c37d7c2b16a364b65fcd7b77f4babc6a1dda0d574441ac77bf27cc90762
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e7fdfd36b6107fe7caa23b4b34d585cdcc2b693affdb7be5c3314b51e9ade3f429ed6175a5eeb55de38be931709204c72da40a1553080fbfccc5e2f145608c05
|
7
|
+
data.tar.gz: af11d48a295fb2fc2cbf4f8ef0c67209d88f582f488fc6145e500a56a8cfc9d562dedc2cbb26e69137fca3be62b3c5ae1311467d06e90ad182bdb77a9dda1e1c
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,14 @@
|
|
2
2
|
|
3
3
|
## [Unreleased]
|
4
4
|
|
5
|
+
## [0.7.1] - 2024-02-04
|
6
|
+
### Fixed
|
7
|
+
- Fixed extra output when commenting on an inssue (@bougyman)
|
8
|
+
|
9
|
+
## [0.7.0] - 2024-02-04
|
10
|
+
### Added
|
11
|
+
- Added better help when using the lc bin and aliases (@bougyman)
|
12
|
+
|
5
13
|
## [0.6.1] - 2024-02-04
|
6
14
|
### Added
|
7
15
|
- Added lcreate alias (@bougyman)
|
@@ -25,8 +33,10 @@
|
|
25
33
|
### Added
|
26
34
|
- Added new changelog management system (changelog-rb) (@bougyman)
|
27
35
|
|
28
|
-
[Unreleased]: https://github.com/rubyists/linear-cli/compare/0.
|
29
|
-
[0.
|
36
|
+
[Unreleased]: https://github.com/rubyists/linear-cli/compare/0.7.1...HEAD
|
37
|
+
[0.7.1]: https://github.com/rubyists/linear-cli/compare/v0.7.0...0.7.1
|
38
|
+
[0.7.0]: https://github.com/rubyists/linear-cli/compare/v0.6.1...v0.7.0
|
39
|
+
[0.6.1]: https://github.com/rubyists/linear-cli/compare/v0.6.0...v0.6.1
|
30
40
|
[0.6.0]: https://github.com/rubyists/linear-cli/compare/v0.5.5...v0.6.0
|
31
41
|
[0.5.5]: https://github.com/rubyists/linear-cli/compare/v0.5.4...v0.5.5
|
32
42
|
[0.5.4]: https://github.com/rubyists/linear-cli/compare/v0.5.3...v0.5.4
|
@@ -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.sh
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
#!/usr/bin/env bash
|
2
|
-
exec
|
2
|
+
exec linear-cli issue create "$@"
|
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,14 @@ 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?
|
29
|
+
|
28
30
|
logger.debug('Updating issues', issue_ids:, options:)
|
29
31
|
Rubyists::Linear::Issue.find_all(issue_ids).each do |issue|
|
30
32
|
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
|
@@ -41,6 +44,7 @@ module Rubyists
|
|
41
44
|
issue_comment(issue, options[:comment]) if options[:comment]
|
42
45
|
return close_issue(issue, **options) if options[:close]
|
43
46
|
return issue_pr(issue) if options[:pr]
|
47
|
+
return if options[:comment]
|
44
48
|
|
45
49
|
prompt.warn('No action taken, no options specified')
|
46
50
|
prompt.ok('Issue was not updated')
|
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.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tj (bougyman) Vanderpoel
|
@@ -183,12 +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
|
190
191
|
- lcreate
|
191
192
|
- lcreate.sh
|
193
|
+
- linear-cli
|
192
194
|
extensions: []
|
193
195
|
extra_rdoc_files: []
|
194
196
|
files:
|
@@ -207,14 +209,20 @@ files:
|
|
207
209
|
- changelog/0.6.0/tag.yml
|
208
210
|
- changelog/0.6.1/added_lcreate_alias.yml
|
209
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
|
214
|
+
- changelog/0.7.1/fixed_extra_output_when_commenting_on_an_inssue.yml
|
215
|
+
- changelog/0.7.1/tag.yml
|
210
216
|
- changelog/unreleased/.gitkeep
|
211
217
|
- exe/lc
|
218
|
+
- exe/lc.sh
|
212
219
|
- exe/lclose
|
213
220
|
- exe/lclose.sh
|
214
221
|
- exe/lcls
|
215
222
|
- exe/lcls.sh
|
216
223
|
- exe/lcreate
|
217
224
|
- exe/lcreate.sh
|
225
|
+
- exe/linear-cli
|
218
226
|
- lib/linear.rb
|
219
227
|
- lib/linear/api.rb
|
220
228
|
- lib/linear/cli.rb
|