linear-cli 0.7.1 → 0.7.3
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.2/fixed_problem_when_trying_to_develop_an_unassigned_issue.yml +4 -0
- data/changelog/0.7.2/tag.yml +1 -0
- data/changelog/0.7.3/fixed_problem_with_issue_relationship_to_user.yml +4 -0
- data/changelog/0.7.3/tag.yml +1 -0
- data/lib/linear/cli/version.rb +1 -1
- data/lib/linear/commands/issue/develop.rb +1 -1
- data/lib/linear/commands/issue.rb +1 -0
- data/lib/linear/models/base_model.rb +3 -2
- data/lib/linear/models/issue.rb +2 -2
- data/lib/linear/models/user.rb +5 -5
- metadata +5 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4b1055ff8955a4c85769720272e75deed3518b1cb9a8f495cbd980f1d40e249d
|
4
|
+
data.tar.gz: 2b5cc596a13c4572e7d7c5a92d5558b5201e48a07a672b16a35ce4998b2f6c5e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf61382e36a9d9df861e268036e806e37d80ef8219218b56c8b4499f9d8a19e1c4af29002990c565df9c19643de244cb988119752dced8229e53d82c3d681daf
|
7
|
+
data.tar.gz: 162c3b2c48ce572ab8428479ed1b4540f5535a836a4fa41795f01e582e9e2d6c512e0de047c28479913cb3f2d2711c94393e08bba01b23ecc4a6b550d23f516a
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,14 @@
|
|
2
2
|
|
3
3
|
## [Unreleased]
|
4
4
|
|
5
|
+
## [0.7.3] - 2024-02-04
|
6
|
+
### Fixed
|
7
|
+
- Fixed problem with issue relationship to user (@bougyman)
|
8
|
+
|
9
|
+
## [0.7.2] - 2024-02-04
|
10
|
+
### Fixed
|
11
|
+
- Fixed problem when trying to develop an unassigned issue (@bougyman)
|
12
|
+
|
5
13
|
## [0.7.1] - 2024-02-04
|
6
14
|
### Fixed
|
7
15
|
- Fixed extra output when commenting on an inssue (@bougyman)
|
@@ -33,8 +41,10 @@
|
|
33
41
|
### Added
|
34
42
|
- Added new changelog management system (changelog-rb) (@bougyman)
|
35
43
|
|
36
|
-
[Unreleased]: https://github.com/rubyists/linear-cli/compare/0.7.
|
37
|
-
[0.7.
|
44
|
+
[Unreleased]: https://github.com/rubyists/linear-cli/compare/0.7.3...HEAD
|
45
|
+
[0.7.3]: https://github.com/rubyists/linear-cli/compare/v0.7.2...0.7.3
|
46
|
+
[0.7.2]: https://github.com/rubyists/linear-cli/compare/v0.7.1...v0.7.2
|
47
|
+
[0.7.1]: https://github.com/rubyists/linear-cli/compare/v0.7.0...v0.7.1
|
38
48
|
[0.7.0]: https://github.com/rubyists/linear-cli/compare/v0.6.1...v0.7.0
|
39
49
|
[0.6.1]: https://github.com/rubyists/linear-cli/compare/v0.6.0...v0.6.1
|
40
50
|
[0.6.0]: https://github.com/rubyists/linear-cli/compare/v0.5.5...v0.6.0
|
@@ -0,0 +1 @@
|
|
1
|
+
date: 2024-02-04
|
@@ -0,0 +1 @@
|
|
1
|
+
date: 2024-02-04
|
data/lib/linear/cli/version.rb
CHANGED
@@ -22,7 +22,7 @@ module Rubyists
|
|
22
22
|
|
23
23
|
def call(issue_id:, **options)
|
24
24
|
logger.debug('Developing issue', options:)
|
25
|
-
issue = gimme_da_issue!(issue_id, Rubyists::Linear::User.me)
|
25
|
+
issue = gimme_da_issue!(issue_id, me: Rubyists::Linear::User.me)
|
26
26
|
branch_name = issue.branchName
|
27
27
|
branch = branch_for(branch_name)
|
28
28
|
branch.checkout
|
@@ -61,6 +61,7 @@ module Rubyists
|
|
61
61
|
|
62
62
|
def gimme_da_issue!(issue_id, me: Rubyists::Linear::User.me) # rubocop:disable Naming/MethodParameterName
|
63
63
|
logger.trace('Looking up issue', issue_id:, me:)
|
64
|
+
require 'pry'; binding.pry
|
64
65
|
issue = Rubyists::Linear::Issue.find(issue_id)
|
65
66
|
if issue.assignee && issue.assignee[:id] == me.id
|
66
67
|
prompt.say("You are already assigned #{issue_id}")
|
@@ -34,11 +34,12 @@ module Rubyists
|
|
34
34
|
|
35
35
|
# Class methods for Linear models.
|
36
36
|
class << self
|
37
|
-
def
|
37
|
+
def one_to_one(relation, klass)
|
38
38
|
define_method relation do
|
39
39
|
return instance_variable_get("@#{relation}") if instance_variable_defined?("@#{relation}")
|
40
|
+
return unless (val = data[relation])
|
40
41
|
|
41
|
-
instance_variable_set("@#{relation}", Rubyists::Linear.const_get(klass).new(
|
42
|
+
instance_variable_set("@#{relation}", Rubyists::Linear.const_get(klass).new(val))
|
42
43
|
end
|
43
44
|
|
44
45
|
define_method "#{relation}=" do |val|
|
data/lib/linear/models/issue.rb
CHANGED
@@ -10,8 +10,8 @@ module Rubyists
|
|
10
10
|
# The Issue class represents a Linear issue.
|
11
11
|
class Issue # rubocop:disable Metrics/ClassLength
|
12
12
|
include SemanticLogger::Loggable
|
13
|
-
|
14
|
-
|
13
|
+
one_to_one :assignee, :User
|
14
|
+
one_to_one :team, :Team
|
15
15
|
|
16
16
|
BASIC_FILTER = { completedAt: { null: true } }.freeze
|
17
17
|
|
data/lib/linear/models/user.rb
CHANGED
@@ -18,17 +18,17 @@ module Rubyists
|
|
18
18
|
email
|
19
19
|
end
|
20
20
|
|
21
|
-
def self.
|
21
|
+
def self.base_fragment
|
22
22
|
@with_teams = fragment('UserWithTeams', 'User') do
|
23
23
|
___ Base
|
24
24
|
teams do
|
25
|
-
nodes { ___ Team
|
25
|
+
nodes { ___ Team.base_fragment }
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
30
|
-
def self.me(
|
31
|
-
fragment =
|
30
|
+
def self.me(**)
|
31
|
+
fragment = base_fragment
|
32
32
|
q = query do
|
33
33
|
viewer do
|
34
34
|
___ fragment
|
@@ -48,7 +48,7 @@ module Rubyists
|
|
48
48
|
query do
|
49
49
|
user(id:) do
|
50
50
|
assignedIssues(first:, filter: { completedAt: { null: true } }) do
|
51
|
-
nodes { ___ Issue
|
51
|
+
nodes { ___ Issue.base_fragment }
|
52
52
|
end
|
53
53
|
end
|
54
54
|
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.7.
|
4
|
+
version: 0.7.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tj (bougyman) Vanderpoel
|
@@ -213,6 +213,10 @@ files:
|
|
213
213
|
- changelog/0.7.0/tag.yml
|
214
214
|
- changelog/0.7.1/fixed_extra_output_when_commenting_on_an_inssue.yml
|
215
215
|
- changelog/0.7.1/tag.yml
|
216
|
+
- changelog/0.7.2/fixed_problem_when_trying_to_develop_an_unassigned_issue.yml
|
217
|
+
- changelog/0.7.2/tag.yml
|
218
|
+
- changelog/0.7.3/fixed_problem_with_issue_relationship_to_user.yml
|
219
|
+
- changelog/0.7.3/tag.yml
|
216
220
|
- changelog/unreleased/.gitkeep
|
217
221
|
- exe/lc
|
218
222
|
- exe/lc.sh
|