linear-cli 0.9.11 → 0.9.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/linear/cli/version.rb +1 -1
- data/lib/linear/cli/what_for.rb +19 -2
- data/lib/linear/commands/issue.rb +2 -1
- data/linear-cli.gemspec +3 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd77c94912af23400218c7b8efd3260ee4dac4c4e96eb2095a353ac08831f70e
|
4
|
+
data.tar.gz: 7a4e9adf0fd3e694030c0bc032cbf276adce393e2990bbe89733f18477983541
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a29310a7526761c3c8e04336345ad2a5c0693e3f6b3ae48dda51e5df7ac1fe78b3c458ce1c61075b60f41f939df68dc16307ae0306c1c53470c666e7d84a8bb
|
7
|
+
data.tar.gz: 16fed8d02909f6699bbe12a52e3bdd376fc7c7b1374ef088d7f76108e5d7ed15b4c7cadecadc66d650459f597f2cbe72b66d4ef2fa901125f56bda1387093e5c
|
data/lib/linear/cli/version.rb
CHANGED
data/lib/linear/cli/what_for.rb
CHANGED
@@ -6,7 +6,24 @@ module Rubyists
|
|
6
6
|
# Module for the _for methods
|
7
7
|
module WhatFor # rubocop:disable Metrics/ModuleLength
|
8
8
|
# TODO: Make this configurable
|
9
|
-
|
9
|
+
PR_TYPES = {
|
10
|
+
fix: 'Bug fixes',
|
11
|
+
feat: 'New feature work',
|
12
|
+
chore: 'Chores and maintenance',
|
13
|
+
eyes: 'Observability, metrics',
|
14
|
+
test: 'Testing code',
|
15
|
+
perf: 'Performance related work',
|
16
|
+
refactor: 'Code refactoring',
|
17
|
+
docs: 'Documentation Updates',
|
18
|
+
sec: 'Security-related, including dependency updates',
|
19
|
+
style: 'Style updates',
|
20
|
+
ci: 'Continuous integration related',
|
21
|
+
db: 'Database-Related (migrations, models, etc)'
|
22
|
+
}.freeze
|
23
|
+
|
24
|
+
PR_TYPE_SELECTIONS = PR_TYPES.invert
|
25
|
+
|
26
|
+
ALLOWED_PR_TYPES = /#{PR_TYPES.keys.join("|")}/
|
10
27
|
|
11
28
|
def editor_for(prefix)
|
12
29
|
file = Tempfile.open(prefix, Rubyists::Linear.tmpdir)
|
@@ -122,7 +139,7 @@ module Rubyists
|
|
122
139
|
proposed_type = issue.title.match(/^(#{ALLOWED_PR_TYPES})/i)
|
123
140
|
return proposed_type[1].downcase if proposed_type
|
124
141
|
|
125
|
-
prompt.select('What type of PR is this?',
|
142
|
+
prompt.select('What type of PR is this?', PR_TYPE_SELECTIONS)
|
126
143
|
end
|
127
144
|
|
128
145
|
def pr_scope_for(title)
|
@@ -53,6 +53,7 @@ module Rubyists
|
|
53
53
|
end
|
54
54
|
|
55
55
|
def create_pr!(title:, body:)
|
56
|
+
require 'pry-byebug'; binding.pry
|
56
57
|
return `gh pr create -a @me --title "#{title}" --body-file "#{body.path}"` if body.respond_to?(:path)
|
57
58
|
|
58
59
|
`gh pr create -a @me --title "#{title}" --body "#{body}"`
|
@@ -61,7 +62,7 @@ module Rubyists
|
|
61
62
|
def issue_pr(issue, **options)
|
62
63
|
title = options[:title] || pr_title_for(issue)
|
63
64
|
body = options[:description] || pr_description_for(issue)
|
64
|
-
create_pr!(title:, body:)
|
65
|
+
prompt.warn create_pr!(title:, body:)
|
65
66
|
end
|
66
67
|
|
67
68
|
def attach_project(issue, project_search)
|
data/linear-cli.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_relative 'lib/linear'
|
3
|
+
require_relative 'lib/linear/version'
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = 'linear-cli'
|
@@ -25,7 +25,8 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.files = Dir.chdir(__dir__) do
|
26
26
|
`git ls-files -z`.split("\x0").reject do |f|
|
27
27
|
(File.expand_path(f) == __FILE__) ||
|
28
|
-
f.start_with?(*%w[changelog/ pkg/ bin/ test/ spec/ features/ .git .github appveyor .rspec .rubocop cucumber.yml
|
28
|
+
f.start_with?(*%w[changelog/ pkg/ bin/ test/ spec/ features/ .git .github appveyor .rspec .rubocop cucumber.yml
|
29
|
+
Gemfile])
|
29
30
|
end
|
30
31
|
end
|
31
32
|
spec.bindir = 'exe'
|
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.9.
|
4
|
+
version: 0.9.14
|
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-
|
11
|
+
date: 2024-04-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: base64
|