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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +18 -0
  3. data/exe/pr +14 -5
  4. data/pullrequest.gemspec +1 -1
  5. metadata +6 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 06e6773c068432f0d4a3d1c7197098868ac2c518795281c9ed05993b9f4c9b8a
4
- data.tar.gz: 871f2deff84489e3fb02982f774b1c5c62bac854c0c0795e0f9f89b263a6aed8
3
+ metadata.gz: 01ed19f44671d055a29145c6f6c5b240c2dcb84e4cba73b5994e43c7927089aa
4
+ data.tar.gz: cb019b9929a65728475f17e0621ac5fd9ad5f942144738cacf5d3c145423e632
5
5
  SHA512:
6
- metadata.gz: 385eaf3a4b15ef66c674843937e47c7697494151606d2b3abc6378ee2f0a7bde616e31abebd75d52dbde8a0cb519f5341c648b04b57b4eb233f7697aba5c8089
7
- data.tar.gz: 76dc4fd0e5bf18e65d07735c8d63250443bb8238ee01b3d718ef94f2e7487ca3dab2fd7a04c2efd2eda567a4d893a9b4e4ddaa9b42a952f058dc1b8393f79239
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 origin"
83
- sh "git push -u origin #{branch}"
90
+ puts "Pushing to #{@remote}"
91
+ sh "git push -u #{@remote} #{branch}"
84
92
 
85
- puts "Creating pull request"
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
@@ -1,7 +1,7 @@
1
1
  # coding: utf-8
2
2
  Gem::Specification.new do |spec|
3
3
  spec.name = "pull-request"
4
- spec.version = "0.6.2"
4
+ spec.version = "0.6.3"
5
5
  spec.authors = ["Jens Ravens", "David Dufour-Boivin"]
6
6
  spec.email = ["jens@nerdgeschoss.de", "david@nerdgeschoss.de"]
7
7
 
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.2
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: 2023-09-26 00:00:00.000000000 Z
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: []