pr-with-params 0.2.0 → 1.0.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: eba5280a74bea8222e60654a6798ac5cdf60b659a9e085903e0a74a374a900a8
4
- data.tar.gz: 78acb1fcda0cd7043fd25e51169365ed66c3ce36616209c8856a569bdf6e76cd
3
+ metadata.gz: c94c3c4bcc5b4378c7959037b305211a923762986d00bb1428c138dbfb21fef2
4
+ data.tar.gz: '06238e1b450291ff2b1e2d99e3e49f9f06b81c10e15733782fbaf24adb5c81bf'
5
5
  SHA512:
6
- metadata.gz: efd0f0b2bc418846d6eb9ca8e37b8c15c03feb77be602e65e811432592108eb22841e8509506050f82f8a1deba547c89eae86ca58d375f38ad0b588d894a621d
7
- data.tar.gz: bc35fade6fcf7ddda8ffd4e6ccdaf12e2075060806d326c770b300ccf86a179055a8fe262ad529fc094ae4873156fd72ad7a412877417ded357fa6d7e520d118
6
+ metadata.gz: 0c39afef5c5af877c513abd50f41c86c05bff19976037b23247f89f941252e7114ae54ae6e3af97e7bda41a0de11419e00f227331231bf3c4bed693bd3b38ffa
7
+ data.tar.gz: 0242737b9147102086ec22848cb8027160241ff6c7948d237a22c75522e7b095a425771ccedde1b1fb16e1ccd4c7a8ed9aa79575decc0ca4f16b49833761e90c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pr-with-params (0.2.0)
4
+ pr-with-params (1.0.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
- # PR::With::Params
2
- A lightweight gem that pushes current local branch to remote with upstream to origin/[local-branch-name]. It also opens a new browser window at a URL with customized params, based on specified options, which allows to open pull request with pre-populated fields.
1
+ # PR::With::Params [![Gem Version](https://badge.fury.io/rb/pr-with-params.svg)](https://badge.fury.io/rb/pr-with-params)
2
+ A lightweight gem that pushes current local branch to remote with upstream at origin/[local-branch-name]. It also opens a new pull request browser window at a URL with customized query params, based on specified options, which pre-populates certain fields in the pull request. This is especially useful when supporting multiple PR templates within a code base.
3
+
4
+ Inspired by GitHub's documentation on [using query params to create pull requets](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/using-query-parameters-to-create-a-pull-request)
3
5
 
4
6
  ## Installation
5
7
 
@@ -43,7 +45,8 @@ bug_fix:
43
45
  ```
44
46
 
45
47
  * To run with config file, use `$ pr-with-params --conf='path/to/file.yml' --scope=bug_fix`. If `--scope` option is not specified, only `:default` scope will apply.
46
- * All your defaults go in the `:default` scope
48
+ * If you specify a config file (`--conf`) and also pass options by flag (e.g `--base-branch=develop`), the flag value will override the config value.
49
+ * All your defaults go in the `:default` scope.
47
50
  * Only fields defined in another scope will override the defaults. In the example above, the final list of configs will be:
48
51
 
49
52
  ```ruby
data/exe/pr-with-params CHANGED
@@ -56,7 +56,7 @@ begin
56
56
  parser.parse!
57
57
 
58
58
  config_options = PR::With::Params.parse_config(config_file_path, config_scope)
59
- options.merge!(config_options)
59
+ options = config_options.merge(options)
60
60
 
61
61
  branch_name = `git rev-parse --abbrev-ref HEAD`.chomp
62
62
  base_branch = options.delete(:base_branch) || `git remote show origin | grep "HEAD branch" | sed 's/.*: //'`.chomp
@@ -3,7 +3,7 @@
3
3
  module PR
4
4
  module With
5
5
  module Params
6
- VERSION = "0.2.0"
6
+ VERSION = "1.0.1"
7
7
  end
8
8
  end
9
9
  end
@@ -8,7 +8,7 @@ Gem::Specification.new do |spec|
8
8
  spec.authors = ["2k-joker"]
9
9
  spec.email = ["kum.vanjunior@gmail.com"]
10
10
 
11
- spec.summary = "Pushes current local branch to remote with upstream to origin/[local-branch-name]. It also opens a new browser window at a URL with customized params, based on specified options, which allows to open pull request with pre-populated fields."
11
+ spec.summary = "Pushes current local branch to remote with upstream at origin/[local-branch-name]. It also opens a new pull request browser window at a URL with customized query params, based on specified options, which pre-populates certain fields in the pull request. This is especially useful when supporting multiple PR templates within a code base."
12
12
  spec.homepage = "https://github.com/2k-joker/pr-with-params"
13
13
  spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
14
14
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pr-with-params
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - 2k-joker
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-08-08 00:00:00.000000000 Z
11
+ date: 2022-08-09 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email:
@@ -56,7 +56,8 @@ requirements: []
56
56
  rubygems_version: 3.2.3
57
57
  signing_key:
58
58
  specification_version: 4
59
- summary: Pushes current local branch to remote with upstream to origin/[local-branch-name].
60
- It also opens a new browser window at a URL with customized params, based on specified
61
- options, which allows to open pull request with pre-populated fields.
59
+ summary: Pushes current local branch to remote with upstream at origin/[local-branch-name].
60
+ It also opens a new pull request browser window at a URL with customized query params,
61
+ based on specified options, which pre-populates certain fields in the pull request.
62
+ This is especially useful when supporting multiple PR templates within a code base.
62
63
  test_files: []