pr-with-params 0.2.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +6 -3
- data/exe/pr-with-params +1 -1
- data/lib/pr/with/params/version.rb +1 -1
- data/pr-with-params.gemspec +1 -1
- metadata +6 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c94c3c4bcc5b4378c7959037b305211a923762986d00bb1428c138dbfb21fef2
|
|
4
|
+
data.tar.gz: '06238e1b450291ff2b1e2d99e3e49f9f06b81c10e15733782fbaf24adb5c81bf'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0c39afef5c5af877c513abd50f41c86c05bff19976037b23247f89f941252e7114ae54ae6e3af97e7bda41a0de11419e00f227331231bf3c4bed693bd3b38ffa
|
|
7
|
+
data.tar.gz: 0242737b9147102086ec22848cb8027160241ff6c7948d237a22c75522e7b095a425771ccedde1b1fb16e1ccd4c7a8ed9aa79575decc0ca4f16b49833761e90c
|
data/Gemfile.lock
CHANGED
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
|
|
1
|
+
# PR::With::Params [](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
|
-
*
|
|
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
|
|
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
|
data/pr-with-params.gemspec
CHANGED
|
@@ -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
|
|
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.
|
|
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-
|
|
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
|
|
60
|
-
It also opens a new browser window at a URL with customized params,
|
|
61
|
-
options, which
|
|
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: []
|