socialcast-git-extensions 3.1.22 → 3.1.23
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/lib/socialcast-git-extensions/cli.rb +7 -3
- data/lib/socialcast-git-extensions/version.rb +1 -1
- data/spec/cli_spec.rb +12 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b980b68e25c9e7d9a362521e696a6a2ac9765d28
|
4
|
+
data.tar.gz: 31ef169e62e027d408fc18206dda74261b197dcf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a5e2859d6a3aa9c5203dd737aca06309eda03e1dcdb6598fb7e0beebbae16628647f98e302ee15f9218b79d1f15277283f2702de01fb477d3397dcf3e9f6477
|
7
|
+
data.tar.gz: be9c48c3d885f8142cf826ba8fe3299c888f6d50f593047dad0ca041c152b62f38b6f2002def99a830603a60d2181ebd326d817144f248b2ab52552feb1aa9ff
|
@@ -64,7 +64,7 @@ module Socialcast
|
|
64
64
|
url = create_pull_request branch, repo, description, assignee
|
65
65
|
say "Pull request created: #{url}"
|
66
66
|
|
67
|
-
review_message = ["#reviewrequest for #{branch} #scgitx", "/cc
|
67
|
+
review_message = ["#reviewrequest for #{branch} #scgitx", "/cc @#{developer_group}", review_mention, description, changelog_summary(branch)].compact.join("\n\n")
|
68
68
|
post review_message, :url => url, :message_type => 'review_request'
|
69
69
|
end
|
70
70
|
|
@@ -108,7 +108,7 @@ module Socialcast
|
|
108
108
|
if socialcast_reviewer
|
109
109
|
review_message << "/cc @#{socialcast_reviewer} for #backport track"
|
110
110
|
end
|
111
|
-
review_message << "/cc
|
111
|
+
review_message << "/cc @#{developer_group}"
|
112
112
|
post review_message.join("\n\n"), :url => pull_request_url, :message_type => 'review_request'
|
113
113
|
ensure
|
114
114
|
ENV['BASE_BRANCH'] = original_base_branch
|
@@ -207,7 +207,7 @@ module Socialcast
|
|
207
207
|
|
208
208
|
message_parts = []
|
209
209
|
message_parts << "#worklog resetting #{bad_branch} branch to #{good_branch} #scgitx"
|
210
|
-
message_parts << "/cc
|
210
|
+
message_parts << "/cc @#{developer_group}"
|
211
211
|
if removed_branches.any?
|
212
212
|
message_parts << ""
|
213
213
|
message_parts << "the following branches were affected:"
|
@@ -237,6 +237,10 @@ module Socialcast
|
|
237
237
|
|
238
238
|
private
|
239
239
|
|
240
|
+
def developer_group
|
241
|
+
config['developer_group'] || 'SocialcastDevelopers'
|
242
|
+
end
|
243
|
+
|
240
244
|
# post a message in socialcast
|
241
245
|
# skip sharing message if CLI quiet option is present
|
242
246
|
def post(message, params = {})
|
data/spec/cli_spec.rb
CHANGED
@@ -973,6 +973,18 @@ describe Socialcast::Gitx::CLI do
|
|
973
973
|
])
|
974
974
|
end
|
975
975
|
end
|
976
|
+
context 'and a developer group is specified' do
|
977
|
+
let(:message_body) { "#reviewrequest for FOO #scgitx\n\n/cc @#{another_group}\n\ntesting\n\n1 file changed" }
|
978
|
+
let(:another_group) { 'AnotherDeveloperGroup' }
|
979
|
+
before do
|
980
|
+
allow_any_instance_of(Socialcast::Gitx::CLI).to receive(:changelog_summary).and_return('1 file changed')
|
981
|
+
allow_any_instance_of(Socialcast::Gitx::CLI).to receive(:config).and_return({'developer_group' => another_group})
|
982
|
+
# The Review Buddy should be @mentioned in the message
|
983
|
+
stub_message message_body, :url => 'http://github.com/repo/project/pulls/1', :message_type => 'review_request'
|
984
|
+
Socialcast::Gitx::CLI.start ['reviewrequest', '--description', 'testing', '-s']
|
985
|
+
end
|
986
|
+
it 'should create github pull request with a different group mentioned' do end # see expectations
|
987
|
+
end
|
976
988
|
context 'and additional reviewers are not specified' do
|
977
989
|
let(:message_body) { "#reviewrequest for FOO #scgitx\n\n/cc @SocialcastDevelopers\n\ntesting\n\n1 file changed" }
|
978
990
|
before do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: socialcast-git-extensions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.23
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Sonnek
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-09-
|
11
|
+
date: 2014-09-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: grit
|