renuo-cli 4.7.0 → 4.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/renuo/cli/app/github_pull_request_creator.rb +13 -6
- data/lib/renuo/cli/version.rb +1 -1
- data/lib/renuo/cli.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dfd554a0dc6c1e7a71d712c41a9e01f7d8a22f23e756fabf620b02b3fef3d912
|
4
|
+
data.tar.gz: 788aab9b1d5eae0fd0cdbc8cec536e69761128749d553d426488218946a16d25
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7dc15ca3ddc34b94b1e7a0d2b8b628d94a7f01a04089f60a25d025e87dd148bb48801065e1f07d60754b1cb3e9e85b929d2726b9f9edb3a937cfd976f9175666
|
7
|
+
data.tar.gz: eedd47ddb8f4c8e607fe6d94adfd51de86d12decc94cb97ba24287f2cf838317aaa37ba234f7ebad7d6a454e9d420c0062cc93df4b502d30cddd7a427b5d5181
|
@@ -2,18 +2,25 @@
|
|
2
2
|
|
3
3
|
class GithubPullRequestCreator
|
4
4
|
def run(opts)
|
5
|
-
validate_options(opts)
|
6
5
|
create_pr(opts)
|
7
6
|
end
|
8
7
|
|
9
8
|
private
|
10
9
|
|
11
|
-
def
|
12
|
-
|
10
|
+
def create_pr(opts)
|
11
|
+
command = [
|
12
|
+
"gh pr create",
|
13
|
+
"--assignee @me",
|
14
|
+
pr_title(opts),
|
15
|
+
"--body \"#{pr_body(opts)}\"",
|
16
|
+
("--draft" if opts.draft)
|
17
|
+
].compact.join(" ")
|
18
|
+
|
19
|
+
puts `#{command}`
|
13
20
|
end
|
14
21
|
|
15
|
-
def
|
16
|
-
|
22
|
+
def pr_title(opts)
|
23
|
+
opts.title ? "--title \"#{opts.title}\"" : "--fill"
|
17
24
|
end
|
18
25
|
|
19
26
|
def pr_body(opts)
|
@@ -25,6 +32,6 @@ class GithubPullRequestCreator
|
|
25
32
|
|
26
33
|
def redmine_ticket_number(opts)
|
27
34
|
current_branch = `git branch --show-current`.strip
|
28
|
-
current_branch.match(/(\d+)/)&.captures&.first
|
35
|
+
opts.redmine_ticket || current_branch.match(/(\d+)/)&.captures&.first
|
29
36
|
end
|
30
37
|
end
|
data/lib/renuo/cli/version.rb
CHANGED
data/lib/renuo/cli.rb
CHANGED
@@ -319,7 +319,7 @@ module Renuo
|
|
319
319
|
c.summary = "Creates a PR for the current branch"
|
320
320
|
c.description = "Creates a PR, assigns it to you and automatically inserts the Redmine ticket number into " \
|
321
321
|
"the PR body"
|
322
|
-
c.option "--title <title>", String, "The title of the pull request"
|
322
|
+
c.option "--title <title>", String, "The title of the pull request (optional)"
|
323
323
|
c.option "--redmine-ticket <number>", Integer, "The redmine ticket number (optional)"
|
324
324
|
c.option "--draft", "Mark the PR as draft"
|
325
325
|
c.example "Create a PR with the title 'Implement XYZ'",
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: renuo-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.7.
|
4
|
+
version: 4.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Renuo AG
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-12-
|
11
|
+
date: 2024-12-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activeresource
|