gub 0.1.1 → 0.1.2
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/bin/gub +4 -0
- data/lib/gub/cli.rb +2 -2
- data/lib/gub/repository.rb +10 -0
- data/lib/gub/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13347212ee0df95482e921cd191da7ecec690901
|
4
|
+
data.tar.gz: a1800e5d9860ec2b824a6c1c17bcfba05efbe5e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae93c287218cc9747f73002cc90b4646531b90a79ba900a6b579b64f1b4c0f15828318b257e75e1029a2ab87d149ae842ae0213b6afa6b150020e55a0544b7c6
|
7
|
+
data.tar.gz: b3adbc543bc3042f632dfd73eb5a54b0c9eca7c2efa4436129b6228aefe425924b8aa77d553334d1bcb13f3dc0e469806100615c44e1940f5f75bc6bdc676d09
|
data/bin/gub
CHANGED
data/lib/gub/cli.rb
CHANGED
@@ -98,11 +98,11 @@ module Gub
|
|
98
98
|
Gub.log.fatal "Unable to guess issue ID from branch name. You might want to specify it explicitly."
|
99
99
|
exit 1
|
100
100
|
else
|
101
|
-
|
101
|
+
repository = Repository.new
|
102
102
|
Gub.log.info 'Pushing branch...'
|
103
103
|
Gub.git.push('origin', "issue-#{id}")
|
104
104
|
Gub.log.info "Creating pull-request for issue ##{id}..."
|
105
|
-
|
105
|
+
repository.issue_pull_request(id)
|
106
106
|
Gub.git.checkout('master')
|
107
107
|
end
|
108
108
|
end
|
data/lib/gub/repository.rb
CHANGED
@@ -51,6 +51,16 @@ module Gub
|
|
51
51
|
Gub.github.update_issue name, issue.number, issue.title, issue.body, { assignee: assignee }
|
52
52
|
end
|
53
53
|
|
54
|
+
def issue_pull_request id
|
55
|
+
issue = self.issue(id)
|
56
|
+
if self.has_issues?
|
57
|
+
repo = self.full_name
|
58
|
+
else
|
59
|
+
repo = self.parent
|
60
|
+
end
|
61
|
+
Gub.github.create_pull_request_for_issue(repo, 'master', "#{self.owner}:issue-#{id}", id)
|
62
|
+
end
|
63
|
+
|
54
64
|
def owner
|
55
65
|
@full_name.split('/').first
|
56
66
|
end
|
data/lib/gub/version.rb
CHANGED