Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ignore built gems #5

Merged
merged 10 commits into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Ruby

on:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@

# dotenv
.envrc

# built gems
*.gem
86 changes: 44 additions & 42 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
linear-cli (0.9.11)
linear-cli (0.9.12)
base64 (~> 0.2)
dry-cli (~> 1.0)
dry-cli-completion (~> 1.0)
Expand All @@ -19,7 +19,7 @@ PATH
GEM
remote: https://rubygems.org/
specs:
activesupport (7.1.3)
activesupport (7.1.3.2)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
Expand All @@ -39,7 +39,7 @@ GEM
thor (~> 1.0)
ast (2.4.2)
base64 (0.2.0)
bigdecimal (3.1.6)
bigdecimal (3.1.7)
builder (3.2.4)
byebug (11.1.3)
changelog-rb (0.3.0)
Expand All @@ -54,41 +54,41 @@ GEM
concurrent-ruby (1.2.3)
connection_pool (2.4.1)
contracts (0.17)
cucumber (9.1.2)
builder (~> 3.2, >= 3.2.4)
cucumber-ci-environment (~> 9.2, >= 9.2.0)
cucumber-core (~> 12.0)
cucumber (9.2.0)
builder (~> 3.2)
cucumber-ci-environment (> 9, < 11)
cucumber-core (> 13, < 14)
cucumber-cucumber-expressions (~> 17.0)
cucumber-gherkin (> 24, < 27)
cucumber-gherkin (> 24, < 28)
cucumber-html-formatter (> 20.3, < 22)
cucumber-messages (> 19, < 25)
diff-lcs (~> 1.5)
mini_mime (~> 1.1, >= 1.1.5)
multi_test (~> 1.1, >= 1.1.0)
sys-uname (~> 1.2, >= 1.2.3)
cucumber-ci-environment (9.2.0)
cucumber-core (12.0.0)
cucumber-gherkin (>= 25, < 27)
mini_mime (~> 1.1)
multi_test (~> 1.1)
sys-uname (~> 1.2)
cucumber-ci-environment (10.0.1)
cucumber-core (13.0.2)
cucumber-gherkin (>= 27, < 28)
cucumber-messages (>= 20, < 23)
cucumber-tag-expressions (~> 5.0, >= 5.0.4)
cucumber-cucumber-expressions (17.0.1)
cucumber-gherkin (26.2.0)
cucumber-messages (>= 19.1.4, < 22.1)
cucumber-html-formatter (21.2.0)
cucumber-tag-expressions (> 5, < 7)
cucumber-cucumber-expressions (17.1.0)
bigdecimal
cucumber-gherkin (27.0.0)
cucumber-messages (>= 19.1.4, < 23)
cucumber-html-formatter (21.3.1)
cucumber-messages (> 19, < 25)
cucumber-messages (22.0.0)
cucumber-tag-expressions (5.0.6)
cucumber-tag-expressions (6.1.0)
diff-lcs (1.5.1)
docopt_ng (0.7.1)
domain_name (0.6.20240107)
drb (2.2.0)
ruby2_keywords
drb (2.2.1)
dry-cli (1.0.0)
dry-cli-completion (1.0.0)
completely (~> 0.5)
ffi (1.16.3)
ffi-compiler (1.0.1)
ffi (>= 1.0.0)
ffi-compiler (1.3.2)
ffi (>= 1.15.5)
rake
gem-release (2.2.2)
git (1.19.1)
Expand All @@ -109,11 +109,11 @@ GEM
http-cookie (1.0.5)
domain_name (~> 0.5)
http-form_data (2.3.0)
httpx (1.2.2)
httpx (1.2.4)
http-2-next (>= 1.0.3)
i18n (1.14.1)
i18n (1.14.4)
concurrent-ruby (~> 1.0)
json (2.7.1)
json (2.7.2)
kramdown (2.4.0)
rexml
language_server-protocol (3.17.0.3)
Expand All @@ -123,7 +123,7 @@ GEM
method_source (1.0.0)
mini_mime (1.1.5)
mini_portile2 (2.8.5)
minitest (5.21.2)
minitest (5.22.3)
mister_bin (0.7.6)
colsole (>= 0.8.1, < 2)
docopt_ng (~> 0.7, >= 0.7.1)
Expand All @@ -142,14 +142,14 @@ GEM
pry-byebug (3.10.1)
byebug (~> 11.0)
pry (>= 0.13, < 0.15)
public_suffix (5.0.4)
public_suffix (5.0.5)
racc (1.7.3)
rainbow (3.1.1)
rake (13.1.0)
rake (13.2.0)
rchardet (1.8.0)
regexp_parser (2.9.0)
rexml (3.2.6)
rouge (4.2.0)
rouge (4.2.1)
rspec (3.13.0)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
Expand All @@ -162,48 +162,50 @@ GEM
rspec-mocks (3.13.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-support (3.13.0)
rubocop (1.60.2)
rspec-support (3.13.1)
rubocop (1.62.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.30.0, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.30.0)
parser (>= 3.2.1.0)
rubocop-ast (1.31.2)
parser (>= 3.3.0.4)
rubocop-capybara (2.20.0)
rubocop (~> 1.41)
rubocop-factory_bot (2.25.1)
rubocop (~> 1.41)
rubocop-rake (0.6.0)
rubocop (~> 1.0)
rubocop-rspec (2.26.1)
rubocop-rspec (2.29.1)
rubocop (~> 1.40)
rubocop-capybara (~> 2.17)
rubocop-factory_bot (~> 2.22)
rubocop-rspec_rails (~> 2.28)
rubocop-rspec_rails (2.28.2)
rubocop (~> 1.40)
ruby-progressbar (1.13.0)
ruby2_keywords (0.0.5)
semantic (1.6.1)
semantic_logger (4.15.0)
concurrent-ruby (~> 1.0)
sequel (5.77.0)
sequel (5.79.0)
bigdecimal
sqlite3 (1.7.2)
sqlite3 (1.7.3)
mini_portile2 (~> 2.8.0)
sqlite3 (1.7.2-x86_64-linux)
sqlite3 (1.7.3-x86_64-linux)
strings (0.2.1)
strings-ansi (~> 0.2)
unicode-display_width (>= 1.5, < 3.0)
unicode_utils (~> 1.4)
strings-ansi (0.2.0)
sys-uname (1.2.3)
ffi (~> 1.1)
thor (1.3.0)
thor (1.3.1)
tty-color (0.6.0)
tty-cursor (0.7.1)
tty-editor (0.7.0)
Expand Down
2 changes: 1 addition & 1 deletion lib/linear/cli/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

module Rubyists
module Linear
VERSION = '0.9.11'
VERSION = '0.9.12'
end
end
21 changes: 19 additions & 2 deletions lib/linear/cli/what_for.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,24 @@ module CLI
# Module for the _for methods
module WhatFor # rubocop:disable Metrics/ModuleLength
# TODO: Make this configurable
ALLOWED_PR_TYPES = 'bug|fix|sec(urity)|feat(ure)|chore|refactor|test|docs|style|ci|perf'
PR_TYPES = {
fix: 'Bug fixes',
feat: 'New feature work',
chore: 'Chores and maintenance',
eyes: 'Observability, metrics',
test: 'Testing code',
perf: 'Performance related work',
refactor: 'Code refactoring',
docs: 'Documentation Updates',
sec: 'Security-related, including dependency updates',
style: 'Style updates',
ci: 'Continuous integration related',
db: 'Database-Related (migrations, models, etc)'
}.freeze

PR_TYPE_SELECTIONS = PR_TYPES.invert

ALLOWED_PR_TYPES = /#{PR_TYPES.keys.join("|")}/

def editor_for(prefix)
file = Tempfile.open(prefix, Rubyists::Linear.tmpdir)
Expand Down Expand Up @@ -122,7 +139,7 @@ def pr_type_for(issue)
proposed_type = issue.title.match(/^(#{ALLOWED_PR_TYPES})/i)
return proposed_type[1].downcase if proposed_type

prompt.select('What type of PR is this?', %w[fix feature chore refactor test docs style ci perf security])
prompt.select('What type of PR is this?', PR_TYPE_SELECTIONS)
end

def pr_scope_for(title)
Expand Down
2 changes: 1 addition & 1 deletion lib/linear/commands/issue.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def create_pr!(title:, body:)
def issue_pr(issue, **options)
title = options[:title] || pr_title_for(issue)
body = options[:description] || pr_description_for(issue)
create_pr!(title:, body:)
prompt.warn create_pr!(title:, body:)
end

def attach_project(issue, project_search)
Expand Down
5 changes: 3 additions & 2 deletions linear-cli.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

require_relative 'lib/linear'
require_relative 'lib/linear/version'

Gem::Specification.new do |spec|
spec.name = 'linear-cli'
Expand All @@ -25,7 +25,8 @@ Gem::Specification.new do |spec|
spec.files = Dir.chdir(__dir__) do
`git ls-files -z`.split("\x0").reject do |f|
(File.expand_path(f) == __FILE__) ||
f.start_with?(*%w[changelog/ pkg/ bin/ test/ spec/ features/ .git .github appveyor .rspec .rubocop cucumber.yml Gemfile])
f.start_with?(*%w[changelog/ pkg/ bin/ test/ spec/ features/ .git .github appveyor .rspec .rubocop cucumber.yml
Gemfile])
end
end
spec.bindir = 'exe'
Expand Down