git-pr-release 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/git-pr-release +16 -2
- data/git-pr-release.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b9504f5b1ca1141e1f8daa73d80c20d6e7e21bb1
|
4
|
+
data.tar.gz: 5893bc55363dd1f09e0753249643c66196faa214
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d5164dbf8cca261c84fe083348e25647373ca0697b089769bc780ffd15ae78e4ba9f769205800596ce9a81b6337400718d93c20a4508e8ca317f8c8cc5708854
|
7
|
+
data.tar.gz: 5b80839fde036f3f2101d146ac22b24549fc9155caa61cab0232715f03efd4ce31981d3743b74b40b6ec1ed0d83c4d251396d03ab05328de80fc93170c5bf27d
|
data/bin/git-pr-release
CHANGED
@@ -20,8 +20,7 @@ class PullRequest
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def to_checklist_item
|
23
|
-
"- [ ] ##{pr.number} #{pr.title}" +
|
24
|
-
(pr.assignee ? " @#{pr.assignee.login}" : pr.user ? " @#{pr.user.login}" : "")
|
23
|
+
"- [ ] ##{pr.number} #{pr.title}" + mention
|
25
24
|
end
|
26
25
|
|
27
26
|
def html_link
|
@@ -31,6 +30,21 @@ class PullRequest
|
|
31
30
|
def to_hash
|
32
31
|
{ :data => @pr.to_hash }
|
33
32
|
end
|
33
|
+
|
34
|
+
def mention
|
35
|
+
mention = case PullRequest.mention_type
|
36
|
+
when 'author'
|
37
|
+
pr.user ? "@#{pr.user.login}" : nil
|
38
|
+
else
|
39
|
+
pr.assignee ? "@#{pr.assignee.login}" : pr.user ? "@#{pr.user.login}" : nil
|
40
|
+
end
|
41
|
+
|
42
|
+
mention ? " #{mention}" : ""
|
43
|
+
end
|
44
|
+
|
45
|
+
def self.mention_type
|
46
|
+
@mention_type ||= (git_config('mention') || 'default')
|
47
|
+
end
|
34
48
|
end
|
35
49
|
|
36
50
|
class DummyPullRequest
|
data/git-pr-release.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "git-pr-release"
|
7
|
-
spec.version = '0.
|
7
|
+
spec.version = '0.4.0'
|
8
8
|
spec.authors = ["motemen"]
|
9
9
|
spec.email = ["motemen@gmail.com"]
|
10
10
|
spec.summary = 'Creates a release pull request'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git-pr-release
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- motemen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-02-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: octokit
|
@@ -102,7 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
102
102
|
version: '0'
|
103
103
|
requirements: []
|
104
104
|
rubyforge_project:
|
105
|
-
rubygems_version: 2.
|
105
|
+
rubygems_version: 2.6.11
|
106
106
|
signing_key:
|
107
107
|
specification_version: 4
|
108
108
|
summary: Creates a release pull request
|