linear-cli 0.7.7 → 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 +4 -4
- data/CHANGELOG.md +12 -2
- data/Readme.adoc +16 -2
- data/changelog/0.8.0/added_containerfile_to_build_oci_image.yml +4 -0
- data/changelog/0.8.0/tag.yml +1 -0
- data/changelog/0.8.1/fixed_problem_with_setting_verbosity.yml +4 -0
- data/changelog/0.8.1/tag.yml +1 -0
- data/exe/scripts/lcomment.sh +1 -1
- data/lib/linear/cli/caller.rb +2 -0
- data/lib/linear/cli/version.rb +1 -1
- data/lib/linear/cli/what_for.rb +15 -15
- data/lib/linear/models/base_model/class_methods.rb +4 -1
- data/lib/linear.rb +11 -4
- data/oci/Containerfile +32 -0
- metadata +8 -3
- /data/{listings.cinema.gif → cinemas/listings.cinema.gif} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b95ed9950a87c2cf56f05af3403d55d1a13a85ad14d7ac336364d5be83ec94de
|
4
|
+
data.tar.gz: 34fa63ba23ac7ad34be83bbcc65916f4463b85c5aa47747097effdcfd51c76d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 483f8bac18d150ecfc57b906ec5f46e17fe46825632e09964779ac5b19c9b31ac83ae1d75c971bd619c03fe38273d17bf822e62d1b09b32fb3e6ea6eb5e328de
|
7
|
+
data.tar.gz: 3f19d6344f4683fad3eb5b60306941903563fc38879fe1a671930374920dc87b9ee47c188e79604cc587882a354a145a223089cbe8ae1b9ac1466ebaccae32a9
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,14 @@
|
|
2
2
|
|
3
3
|
## [Unreleased]
|
4
4
|
|
5
|
+
## [0.8.1] - 2024-02-06
|
6
|
+
### Fixed
|
7
|
+
- Fixed problem with setting verbosity (@bougyman)
|
8
|
+
|
9
|
+
## [0.8.0] - 2024-02-06
|
10
|
+
### Added
|
11
|
+
- Added Containerfile to build oci image (@bougyman)
|
12
|
+
|
5
13
|
## [0.7.7] - 2024-02-06
|
6
14
|
### Added
|
7
15
|
- Added ability to attach project to command (@bougyman)
|
@@ -51,8 +59,10 @@
|
|
51
59
|
### Added
|
52
60
|
- Added new changelog management system (changelog-rb) (@bougyman)
|
53
61
|
|
54
|
-
[Unreleased]: https://github.com/rubyists/linear-cli/compare/0.
|
55
|
-
[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
|
65
|
+
[0.7.7]: https://github.com/rubyists/linear-cli/compare/v0.7.5...v0.7.7
|
56
66
|
[0.7.5]: https://github.com/rubyists/linear-cli/compare/v0.7.3...v0.7.5
|
57
67
|
[0.7.3]: https://github.com/rubyists/linear-cli/compare/v0.7.2...v0.7.3
|
58
68
|
[0.7.2]: https://github.com/rubyists/linear-cli/compare/v0.7.1...v0.7.2
|
data/Readme.adoc
CHANGED
@@ -11,7 +11,21 @@ A command line interface to https://linear.app.
|
|
11
11
|
|
12
12
|
== Installation
|
13
13
|
|
14
|
-
===
|
14
|
+
=== I don't want to install
|
15
|
+
|
16
|
+
You can use the OCI container image to run the CLI without installing it.
|
17
|
+
|
18
|
+
[source,sh]
|
19
|
+
----
|
20
|
+
$ podman run -it --rm -e LINEAR_API_KEY=your-api-key ghcr.io/rubyists/linear-cli:stable lcls <1>
|
21
|
+
$ docker run -it --rm -e LINEAR_API_KEY=your-api-key ghcr.io/rubyists/linear-cli:stable lcls <2>
|
22
|
+
----
|
23
|
+
<1> Podman Usage
|
24
|
+
<2> Docker Usage
|
25
|
+
|
26
|
+
=== Gem install (Most should use this)
|
27
|
+
|
28
|
+
Requires ruby 3.2 or later
|
15
29
|
|
16
30
|
[source,sh]
|
17
31
|
----
|
@@ -80,7 +94,7 @@ $ lc w --teams
|
|
80
94
|
|
81
95
|
`lcls` is a helper provided to list issues. It's an alias for `lc issues list`.
|
82
96
|
|
83
|
-
image::listings.cinema.gif[]
|
97
|
+
image::cinemas/listings.cinema.gif[]
|
84
98
|
|
85
99
|
[source,sh]
|
86
100
|
----
|
@@ -0,0 +1 @@
|
|
1
|
+
date: 2024-02-06
|
@@ -0,0 +1 @@
|
|
1
|
+
date: 2024-02-06
|
data/exe/scripts/lcomment.sh
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
#!/usr/bin/env bash
|
2
|
-
exec
|
2
|
+
exec lc issue update --comment - "$@"
|
data/lib/linear/cli/caller.rb
CHANGED
@@ -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
|
data/lib/linear/cli/version.rb
CHANGED
data/lib/linear/cli/what_for.rb
CHANGED
@@ -15,12 +15,7 @@ module Rubyists
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def comment_for(issue, comment)
|
18
|
-
|
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
|
-
|
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
|
59
|
-
return
|
48
|
+
def ask_or_edit(thing, question)
|
49
|
+
return thing if thing && thing != '-'
|
60
50
|
|
61
|
-
prompt.
|
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)
|
@@ -52,9 +52,12 @@ module Rubyists
|
|
52
52
|
|
53
53
|
def find(id_val)
|
54
54
|
camel_name = just_name.camelize :lower
|
55
|
+
sym = camel_name.to_sym
|
55
56
|
ff = full_fragment
|
56
57
|
query_data = Api.query(query { __node(camel_name, id: id_val) { ___ ff } })
|
57
|
-
|
58
|
+
raise NotFoundError, "No #{just_name} found with id #{id_val}" if query_data[sym].nil?
|
59
|
+
|
60
|
+
new query_data[sym]
|
58
61
|
end
|
59
62
|
|
60
63
|
def const_added(const)
|
data/lib/linear.rb
CHANGED
@@ -1,9 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'pathname'
|
4
|
-
require 'semantic_logger'
|
5
|
-
SemanticLogger.default_level = :info
|
6
|
-
SemanticLogger.add_appender(io: $stderr, formatter: :color)
|
7
4
|
|
8
5
|
# Add the / operator for path separation
|
9
6
|
class Pathname
|
@@ -15,7 +12,6 @@ end
|
|
15
12
|
module Rubyists
|
16
13
|
# Namespace for Linear classes
|
17
14
|
module Linear
|
18
|
-
include SemanticLogger::Loggable
|
19
15
|
# rubocop:disable Layout/SpaceAroundOperators
|
20
16
|
ROOT = (Pathname(__FILE__)/'../..').expand_path
|
21
17
|
LIBROOT = ROOT/:lib/:linear
|
@@ -46,6 +42,16 @@ module Rubyists
|
|
46
42
|
@verbosity ||= 0
|
47
43
|
end
|
48
44
|
|
45
|
+
def self.logger
|
46
|
+
return @logger if @logger
|
47
|
+
|
48
|
+
require 'semantic_logger'
|
49
|
+
|
50
|
+
SemanticLogger.default_level = :info
|
51
|
+
SemanticLogger.add_appender(io: $stderr, formatter: :color)
|
52
|
+
@logger = SemanticLogger['Rubyists::Linear']
|
53
|
+
end
|
54
|
+
|
49
55
|
def self.verbosity=(debug)
|
50
56
|
return verbosity unless debug
|
51
57
|
|
@@ -53,6 +59,7 @@ module Rubyists
|
|
53
59
|
@verbosity = debug
|
54
60
|
level = @verbosity > (DEBUG_LEVELS.size - 1) ? :trace : DEBUG_LEVELS[@verbosity]
|
55
61
|
SemanticLogger.default_level = level
|
62
|
+
@verbosity
|
56
63
|
end
|
57
64
|
end
|
58
65
|
end
|
data/oci/Containerfile
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
FROM docker.io/ruby:3.3.0-alpine3.19 AS build-env
|
2
|
+
|
3
|
+
|
4
|
+
# Setting env up
|
5
|
+
ARG APP_ROOT=/app
|
6
|
+
ENV LANG C.UTF-8
|
7
|
+
ENV BUNDLE_SILENCE_ROOT_WARNING=1
|
8
|
+
|
9
|
+
#Install dependencies needed for compilation
|
10
|
+
RUN apk --update add bash ruby-dev build-base git sqlite-dev
|
11
|
+
|
12
|
+
WORKDIR $APP_ROOT
|
13
|
+
|
14
|
+
COPY . $APP_ROOT
|
15
|
+
RUN bundle install && bundle exec rake build
|
16
|
+
|
17
|
+
CMD %w[bundle exec lc]
|
18
|
+
|
19
|
+
# Remove folders not needed in resulting image
|
20
|
+
RUN rm -rf node_modules tmp/cache app/assets vendor/assets spec
|
21
|
+
|
22
|
+
############### Build step done ###############
|
23
|
+
FROM docker.io/ruby:3.3.0-alpine3.19
|
24
|
+
ARG PACKAGES="bash sqlite sqlite-dev ruby-dev build-base github-cli"
|
25
|
+
|
26
|
+
# install packages
|
27
|
+
RUN apk --update --no-cache add $PACKAGES
|
28
|
+
COPY --from=build-env /app/pkg /tmp
|
29
|
+
RUN ls /tmp/*.gem && gem install /tmp/*.gem
|
30
|
+
|
31
|
+
CMD %w[bundle exec lc]
|
32
|
+
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: linear-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tj (bougyman) Vanderpoel
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-02-
|
11
|
+
date: 2024-02-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: base64
|
@@ -234,8 +234,13 @@ files:
|
|
234
234
|
- changelog/0.7.7/added_issue_pr_command.yml
|
235
235
|
- changelog/0.7.7/added_lcomment_alias_to_add_comments_to_issues.yml
|
236
236
|
- changelog/0.7.7/tag.yml
|
237
|
+
- changelog/0.8.0/added_containerfile_to_build_oci_image.yml
|
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
|
237
241
|
- changelog/unreleased/.gitkeep
|
238
242
|
- cinemas/listings.cinema
|
243
|
+
- cinemas/listings.cinema.gif
|
239
244
|
- exe/lc
|
240
245
|
- exe/lclose
|
241
246
|
- exe/lcls
|
@@ -280,7 +285,7 @@ files:
|
|
280
285
|
- lib/linear/models/workflow_state.rb
|
281
286
|
- lib/linear/version.rb
|
282
287
|
- linear-cli.gemspec
|
283
|
-
-
|
288
|
+
- oci/Containerfile
|
284
289
|
homepage: https://github.com/rubyists/linear-cli
|
285
290
|
licenses:
|
286
291
|
- MIT
|
File without changes
|