pull-request 0.6.2 → 0.6.3
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/README.md +18 -0
- data/exe/pr +14 -5
- data/pullrequest.gemspec +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 01ed19f44671d055a29145c6f6c5b240c2dcb84e4cba73b5994e43c7927089aa
|
4
|
+
data.tar.gz: cb019b9929a65728475f17e0621ac5fd9ad5f942144738cacf5d3c145423e632
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 076fd4a8d39afd3ed4b2d57c485710099f3b078888e9e0051cf6f0dce03c51ebbef91a50be76479beffef94d4517e8804705476745fe81b69bc61bd4f76cc2be
|
7
|
+
data.tar.gz: b0635de9ac9e82b53f3802849ad0a6eb5fe483ba87eacccb5915915c1f0786d8ebd167415feb6ede90121b8f4fc898c40096762c61fc17e2b8097dbd051d1173
|
data/README.md
CHANGED
@@ -59,6 +59,24 @@ Creates a branch named `feature/create_clients_endpoint` and open a pull-request
|
|
59
59
|
The quotes are optional, but allow `:` and other characters to be a part of the name (otherwise interpreted by the
|
60
60
|
shell).
|
61
61
|
|
62
|
+
### Additional options
|
63
|
+
|
64
|
+
#### Skip PR creation
|
65
|
+
|
66
|
+
Use the `--no-pr` (or `-n`) option to create the branch and push it without creating a pull request:
|
67
|
+
|
68
|
+
```bash
|
69
|
+
pr -n "Create clients endpoint"
|
70
|
+
```
|
71
|
+
|
72
|
+
#### Specify remote
|
73
|
+
|
74
|
+
Use the `--remote` (or `-r`) option to specify a different git remote (defaults to 'origin'):
|
75
|
+
|
76
|
+
```bash
|
77
|
+
pr -r upstream "Create clients endpoint"
|
78
|
+
```
|
79
|
+
|
62
80
|
## Development
|
63
81
|
|
64
82
|
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
data/exe/pr
CHANGED
@@ -6,6 +6,8 @@ require "shellwords"
|
|
6
6
|
|
7
7
|
@simulate = false
|
8
8
|
@issue_number = nil
|
9
|
+
@skip_pr = false
|
10
|
+
@remote = "origin"
|
9
11
|
|
10
12
|
def error(title)
|
11
13
|
STDERR.puts title
|
@@ -50,6 +52,12 @@ OptionParser.new do |opts|
|
|
50
52
|
opts.on("-i", "--issue ISSUE_NUMBER", Integer, "Create a pull-request fixing an issue with the provided number.") do |i|
|
51
53
|
@issue_number = i
|
52
54
|
end
|
55
|
+
opts.on("-n", "--no-pr", "Skip creating the pull request on GitHub") do
|
56
|
+
@skip_pr = true
|
57
|
+
end
|
58
|
+
opts.on("-r", "--remote REMOTE_NAME", "Specify the git remote name (default: origin)") do |remote|
|
59
|
+
@remote = remote
|
60
|
+
end
|
53
61
|
end.parse!
|
54
62
|
|
55
63
|
name = @issue_number ? issue_json["title"] : ARGV.join(" ")
|
@@ -79,9 +87,10 @@ commit_message = "initial commit for #{title}"
|
|
79
87
|
commit_message += ", fixes ##{@issue_number}" if @issue_number
|
80
88
|
sh "git commit -m #{Shellwords.escape(commit_message)} --allow-empty"
|
81
89
|
|
82
|
-
puts "Pushing to
|
83
|
-
sh "git push -u
|
90
|
+
puts "Pushing to #{@remote}"
|
91
|
+
sh "git push -u #{@remote} #{branch}"
|
84
92
|
|
85
|
-
|
86
|
-
|
87
|
-
sh "gh pr create --draft --title #{Shellwords.escape(title)} --body #{Shellwords.escape(body_lines.join("\n"))} --base #{base_branch}"
|
93
|
+
unless @skip_pr
|
94
|
+
puts "Creating pull request"
|
95
|
+
sh "gh pr create --draft --title #{Shellwords.escape(title)} --body #{Shellwords.escape(body_lines.join("\n"))} --base #{base_branch}"
|
96
|
+
end
|
data/pullrequest.gemspec
CHANGED
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pull-request
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jens Ravens
|
8
8
|
- David Dufour-Boivin
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2025-04-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -53,7 +53,7 @@ dependencies:
|
|
53
53
|
- - ">="
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: '0'
|
56
|
-
description:
|
56
|
+
description:
|
57
57
|
email:
|
58
58
|
- jens@nerdgeschoss.de
|
59
59
|
- david@nerdgeschoss.de
|
@@ -79,7 +79,7 @@ homepage: https://nerdgeschoss.de
|
|
79
79
|
licenses:
|
80
80
|
- MIT
|
81
81
|
metadata: {}
|
82
|
-
post_install_message:
|
82
|
+
post_install_message:
|
83
83
|
rdoc_options: []
|
84
84
|
require_paths:
|
85
85
|
- lib
|
@@ -95,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
95
95
|
version: '0'
|
96
96
|
requirements: []
|
97
97
|
rubygems_version: 3.3.7
|
98
|
-
signing_key:
|
98
|
+
signing_key:
|
99
99
|
specification_version: 4
|
100
100
|
summary: Automatically create PRs for GitHub Flow
|
101
101
|
test_files: []
|