intello-shipit-cli 1.2.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 61575736646b080306c67d9a543a9603c748faec5c7b5f7c6b5a2dc0154e099e
4
- data.tar.gz: 45a103fd0a48d629a67abfac6a6a4b786f9bf8c9d3221e6eb7a6f1f5c6da4dd7
3
+ metadata.gz: 445aaf9d82b15a6b4da9145c0853d9ddb929a9a04363358a642fcd690082c1bd
4
+ data.tar.gz: 55f6b47b6a9a83b4498ea5b991bf538fac822205969fea17e55419fd3a09fd4f
5
5
  SHA512:
6
- metadata.gz: cb8f3664cbe9f66a9559f8822e19aeb0bb7b9468a54df76258ac3f26908c7d42ded6463e50797e4c794eaf651683e362dc3dd65df05e32f8bac0e45e7b068a14
7
- data.tar.gz: b370aa66d1908b69e7cf37ff6b220668ef55f91bc48290e9147787500d87cf41a22b70d6791175701ac77f5a2f8b8bbcc2eb0a295049da6b3b8302405708f91e
6
+ metadata.gz: '0191c273e1d08a476f326f3b12acc6738a0bda22cb995ee1304b3843088c858e4e9ab337dc72c32243af156948e81c8584032c82c5d07822e6de6faf176f0a7b'
7
+ data.tar.gz: c7a0c21d7ae9a4c899c197bc569dc454afad068ed80dc4ebe4912613af985542abcb02ff443c418d20d8d544ef2b9f7f2f23405d88e683c249f25ea029adc46c
data/Changelog.md CHANGED
@@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  NOTE: the project follows [Semantic Versioning](http://semver.org/).
6
6
 
7
+ ## v1.3.1 - August 31st, 2023
8
+
9
+ - [bug] #5 - Does not like when labels are of form bug1foobar scoped labels
10
+
11
+ ## v1.3.0 - October 12th, 2022
12
+
13
+ - [enhancement] #8 - Add option to skip CICD when shipping
14
+
7
15
  ## v1.2.0 - March 9th, 2022
8
16
 
9
17
  - [bug] #3 - Support when project is located in sub folder
data/exe/shipit CHANGED
@@ -24,6 +24,7 @@ sort_help :manually
24
24
  flag [:c, :config], default_value: File.join(ENV["HOME"], ".shipit.yml"), desc: "Set the saved configuration path"
25
25
  flag [:e, :endpoint], desc: "Set the shipit API endpoint"
26
26
  flag [:p, :private_token], desc: "Set your private token to access the shipit API"
27
+ flag [:ship_skips_ci], default_value: false, desc: "Skip running the CI/CD after running `shipit work #`"
27
28
 
28
29
  # Switches
29
30
  switch :dry_run, default_value: false, desc: "Dry Run mode, no git or POST/PUT commands are run"
@@ -8,9 +8,9 @@ module Shipit
8
8
  #
9
9
  class Configuration
10
10
  # List of all the configuration attributes stored for use within the gem
11
- ATTRIBUTES = [:endpoint, :private_token, :protected_branches]
11
+ ATTRIBUTES = [:endpoint, :private_token, :protected_branches, :ship_skips_ci]
12
12
 
13
- attr_accessor :endpoint, :private_token, :protected_branches
13
+ attr_accessor :endpoint, :private_token, :protected_branches, :ship_skips_ci
14
14
 
15
15
  # Apply a configuration hash to a configuration instance
16
16
  #
@@ -3,7 +3,7 @@ require "yaml"
3
3
  module Shipit
4
4
  module Cli
5
5
  class ConfigurationFile
6
- ATTR_READER = [:endpoint, :private_token, :protected_branches]
6
+ ATTR_READER = [:endpoint, :private_token, :protected_branches, :ship_skips_ci]
7
7
  attr_reader(*ATTR_READER)
8
8
 
9
9
  def initialize(path, configuration = nil)
@@ -9,12 +9,12 @@ module Shipit
9
9
  new: {
10
10
  desc: "create new branch `branch`",
11
11
  commands: [
12
- '"#{GIT} push #{origin} #{current_branch}:refs/heads/#{branch} --no-verify #{VERBOSE}"',
12
+ '"#{GIT} push #{ship_skips_ci}#{origin} #{current_branch}:refs/heads/#{branch} --no-verify #{VERBOSE}"',
13
13
  '"#{GIT} fetch #{origin} #{VERBOSE}"',
14
14
  '"#{GIT} branch --track #{branch} #{origin}/#{branch} #{VERBOSE}"',
15
15
  '"#{GIT} checkout #{branch} #{VERBOSE}"',
16
16
  '"#{GIT} commit --allow-empty -m \"#{message}\" #{VERBOSE}"',
17
- '"#{GIT} push --no-verify #{VERBOSE}"'
17
+ '"#{GIT} push #{ship_skips_ci}--no-verify #{VERBOSE}"'
18
18
  ]
19
19
  }
20
20
  }
@@ -27,6 +27,7 @@ module Shipit
27
27
  origin = ORIGIN
28
28
  message = opt.fetch(:message, "").gsub("`", "'")
29
29
  dry_run = opt.fetch(:dry_run, false)
30
+ ship_skips_ci = "-o ci.skip " if Shipit::Cli.config.ship_skips_ci.to_s.downcase == "true"
30
31
  grepped_protected_branches = Array(Shipit::Cli.config.protected_branches)
31
32
  .push("master")
32
33
  .push("main")
@@ -1,5 +1,5 @@
1
1
  module Shipit
2
2
  module Cli
3
- VERSION = "1.2.0".freeze
3
+ VERSION = "1.3.1".freeze
4
4
  end
5
5
  end
@@ -99,7 +99,7 @@ module Shipit
99
99
  mr_title = "Draft: [#{labels}] ##{issue_id} - #{sane_title}"
100
100
 
101
101
  # 2. Add to issue properties
102
- issue["source_branch"] = [issue["labels"].first.gsub(/\s+/, ""), assignee_initials, issue_id, issue_title].compact.join("-")
102
+ issue["source_branch"] = [issue["labels"].first.gsub(/\s+/, "").gsub(/::/, "-").gsub(/:/, ""), assignee_initials, issue_id, issue_title].compact.join("-")
103
103
  issue["first_commit_message"] = first_commit_message
104
104
  issue["target_branch"] = target_branch
105
105
  issue["merge_request_title"] = mr_title
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: intello-shipit-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Benjamin Thouret
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-03-09 00:00:00.000000000 Z
11
+ date: 2023-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -250,7 +250,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
250
250
  - !ruby/object:Gem::Version
251
251
  version: '0'
252
252
  requirements: []
253
- rubygems_version: 3.2.3
253
+ rubyforge_project:
254
+ rubygems_version: 2.7.3
254
255
  signing_key:
255
256
  specification_version: 4
256
257
  summary: Designed to simplify working with Gitlab, its main purpose is to kickstart