danger-samsao 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,72 @@
1
+ require File.expand_path('../spec_helper', __FILE__)
2
+
3
+ module Danger
4
+ describe Danger::DangerSamsao do
5
+ describe 'with Dangerfile' do
6
+ before do
7
+ @dangerfile = testing_dangerfile
8
+ @plugin = @dangerfile.samsao
9
+ end
10
+
11
+ describe 'check feature branch jira issue number' do
12
+ it 'continues on trivial change' do
13
+ allow(@plugin).to receive(:trivial_change?).and_return(true)
14
+
15
+ @plugin.check_feature_jira_issue_number
16
+
17
+ expect(@dangerfile).to have_no_error
18
+ end
19
+
20
+ it 'continues on fix branch' do
21
+ allow(@plugin).to receive(:trivial_change?).and_return(false)
22
+ allow(@plugin).to receive(:feature_branch?).and_return(false)
23
+
24
+ @plugin.check_feature_jira_issue_number
25
+
26
+ expect(@dangerfile).to have_no_error
27
+ end
28
+
29
+ it 'fails on missing jira project key' do
30
+ allow(@plugin).to receive(:trivial_change?).and_return(false)
31
+ allow(@plugin).to receive(:feature_branch?).and_return(true)
32
+
33
+ @plugin.check_feature_jira_issue_number
34
+
35
+ expect(@dangerfile).to have_error('Your Danger config is missing a `jira_project_key` value.')
36
+ end
37
+
38
+ it 'continue on branch with issue number' do
39
+ jira_project_key = 'VER'
40
+
41
+ @plugin.config do
42
+ jira_project_key jira_project_key
43
+ end
44
+
45
+ allow(@plugin.github).to receive(:branch_for_head).and_return('feature/a')
46
+ allow(@plugin.github).to receive(:pr_title).and_return("[#{jira_project_key}-123] Title")
47
+
48
+ @plugin.check_feature_jira_issue_number
49
+
50
+ expect(@dangerfile).to have_no_error
51
+ end
52
+
53
+ it 'fails on branch with no issue number' do
54
+ jira_project_key = 'VER'
55
+ message = 'The PR must starts with JIRA issue number between square brackets'\
56
+ " (i.e. [#{jira_project_key}-XXX])."
57
+
58
+ @plugin.config do
59
+ jira_project_key jira_project_key
60
+ end
61
+
62
+ allow(@plugin.github).to receive(:branch_for_head).and_return('feature/a')
63
+ allow(@plugin.github).to receive(:pr_title).and_return('Title')
64
+
65
+ @plugin.check_feature_jira_issue_number
66
+
67
+ expect(@dangerfile).to have_error(message)
68
+ end
69
+ end
70
+ end
71
+ end
72
+ end
@@ -14,7 +14,7 @@ module Danger
14
14
  allow(@plugin.github).to receive(:branch_for_head).and_return('feature/a')
15
15
  allow(@plugin.git).to receive(:commits).and_return(['sha1'])
16
16
 
17
- @plugin.fail_when_non_single_commit_feature
17
+ @plugin.check_non_single_commit_feature
18
18
 
19
19
  expect(@dangerfile).to have_no_error
20
20
  end
@@ -23,7 +23,7 @@ module Danger
23
23
  allow(@plugin.github).to receive(:branch_for_head).and_return('fix/a')
24
24
  allow(@plugin.git).to receive(:commits).and_return(['sha1', 'sha2'])
25
25
 
26
- @plugin.fail_when_non_single_commit_feature
26
+ @plugin.check_non_single_commit_feature
27
27
 
28
28
  expect(@dangerfile).to have_no_error
29
29
  end
@@ -32,7 +32,7 @@ module Danger
32
32
  allow(@plugin.github).to receive(:branch_for_head).and_return('feature/a')
33
33
  allow(@plugin.git).to receive(:commits).and_return(['sha1', 'sha2'])
34
34
 
35
- @plugin.fail_when_non_single_commit_feature
35
+ @plugin.check_non_single_commit_feature
36
36
 
37
37
  expect(@dangerfile).to have_error(@must_have_single_commit)
38
38
  end
@@ -0,0 +1,82 @@
1
+ require File.expand_path('../spec_helper', __FILE__)
2
+
3
+ module Danger
4
+ describe Danger::DangerSamsao do
5
+ describe 'with Dangerfile' do
6
+ before do
7
+ @dangerfile = testing_dangerfile
8
+ @plugin = @dangerfile.samsao
9
+ end
10
+
11
+ describe 'check fix branch jira issue number' do
12
+ it 'continues on trivial change' do
13
+ allow(@plugin).to receive(:trivial_change?).and_return(true)
14
+
15
+ @plugin.check_fix_jira_issue_number
16
+
17
+ expect(@dangerfile).to have_no_error
18
+ end
19
+
20
+ it 'continues on feature branch' do
21
+ allow(@plugin).to receive(:trivial_change?).and_return(false)
22
+ allow(@plugin).to receive(:fix_branch?).and_return(false)
23
+
24
+ @plugin.check_fix_jira_issue_number
25
+
26
+ expect(@dangerfile).to have_no_error
27
+ end
28
+
29
+ it 'fails on missing jira project key' do
30
+ allow(@plugin).to receive(:trivial_change?).and_return(false)
31
+ allow(@plugin).to receive(:fix_branch?).and_return(true)
32
+
33
+ @plugin.check_fix_jira_issue_number
34
+
35
+ expect(@dangerfile).to have_error('Your Danger config is missing a `jira_project_key` value.')
36
+ end
37
+
38
+ it 'fails on commit with no issue number' do
39
+ jira_project_key = 'VER'
40
+ commit_message = 'Bad message'
41
+ commit_sha = '48ffffb'
42
+ commit_id = "#{commit_sha} ('#{commit_message}')"
43
+
44
+ @plugin.config do
45
+ jira_project_key jira_project_key
46
+ end
47
+
48
+ allow(@plugin.github).to receive(:branch_for_head).and_return('fix/a')
49
+ allow(@plugin.github).to receive(:pr_title).and_return('Title')
50
+ allow(@plugin.git).to receive(:commits).and_return([commit(commit_message, commit_sha)])
51
+
52
+ @plugin.check_fix_jira_issue_number
53
+
54
+ message = "The commit #{commit_id} should contain JIRA issue number between square brackets"\
55
+ " (i.e. [#{jira_project_key}-XXX]), multiple allowed (i.e. [#{jira_project_key}-XXX,"\
56
+ " #{jira_project_key}-YYY, #{jira_project_key}-ZZZ])"
57
+
58
+ expect(@dangerfile).to have_warning(message)
59
+ end
60
+
61
+ it 'continue on multiple commits with issue number' do
62
+ jira_project_key = 'VER'
63
+
64
+ first_commit = commit("[#{jira_project_key}-123]", '48ffffb')
65
+ second_commit = commit("[#{jira_project_key}-124, #{jira_project_key}-125]", '48ffffb')
66
+
67
+ @plugin.config do
68
+ jira_project_key jira_project_key
69
+ end
70
+
71
+ allow(@plugin.github).to receive(:branch_for_head).and_return('fix/a')
72
+ allow(@plugin.github).to receive(:pr_title).and_return('Title')
73
+ allow(@plugin.git).to receive(:commits).and_return([first_commit, second_commit])
74
+
75
+ @plugin.check_fix_jira_issue_number
76
+
77
+ expect(@dangerfile).to have_no_warning
78
+ end
79
+ end
80
+ end
81
+ end
82
+ end
@@ -0,0 +1,37 @@
1
+ require File.expand_path('../spec_helper', __FILE__)
2
+
3
+ module Danger
4
+ describe Danger::DangerSamsao do
5
+ describe 'with Dangerfile' do
6
+ before do
7
+ @dangerfile = testing_dangerfile
8
+ @plugin = @dangerfile.samsao
9
+ end
10
+
11
+ describe 'jira_project_key? helper' do
12
+ it "doesn't have project key" do
13
+ expect(@plugin.jira_project_key?).to eq(false)
14
+ end
15
+
16
+ it 'has jira project key' do
17
+ jira_project_key = 'VER'
18
+
19
+ @plugin.config do
20
+ jira_project_key jira_project_key
21
+ end
22
+
23
+ expect(@plugin.jira_project_key?).to eq(true)
24
+ end
25
+
26
+ it 'has invalid jira project key' do
27
+ jira_project_key = '123'
28
+ message = "Jira project key '#{jira_project_key}' is invalid, must be uppercase and"\
29
+ ' between 1 and 10 characters'
30
+
31
+ expect { @plugin.config { jira_project_key jira_project_key } }.to raise_error(message)
32
+ expect(@plugin.jira_project_key?).to eq(false)
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,51 @@
1
+ require File.expand_path('../spec_helper', __FILE__)
2
+
3
+ module Danger
4
+ describe Danger::DangerSamsao do
5
+ describe 'with Dangerfile' do
6
+ before do
7
+ @dangerfile = testing_dangerfile
8
+ @plugin = @dangerfile.samsao
9
+ @message = 'The PR should have at least one label added to it.'
10
+ end
11
+
12
+ describe 'check labels PR' do
13
+ it 'continues if pr has labels' do
14
+ allow(@plugin.github).to receive(:pr_labels).and_return(['web', 'mobile', 'backend'])
15
+
16
+ @plugin.check_label_pr
17
+
18
+ expect(@dangerfile).to have_no_warning
19
+ expect(@dangerfile).to have_no_error
20
+ end
21
+
22
+ it 'fails if labels missing' do
23
+ allow(@plugin.github).to receive(:pr_labels).and_return([])
24
+
25
+ @plugin.check_label_pr
26
+
27
+ expect(@dangerfile).to have_error(@message)
28
+ expect(@dangerfile).to have_no_warning
29
+ end
30
+
31
+ it 'warns if report level specified' do
32
+ allow(@plugin.github).to receive(:pr_labels).and_return([])
33
+
34
+ @plugin.check_label_pr :warn
35
+
36
+ expect(@dangerfile).to have_warning(@message)
37
+ expect(@dangerfile).to have_no_error
38
+ end
39
+
40
+ it 'fails if labels is nil' do
41
+ allow(@plugin.github).to receive(:pr_labels).and_return(nil)
42
+
43
+ @plugin.check_label_pr
44
+
45
+ expect(@dangerfile).to have_error(@message)
46
+ expect(@dangerfile).to have_no_warning
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
@@ -15,7 +15,7 @@ module Danger
15
15
  it 'continues when no commits' do
16
16
  allow(@plugin.git).to receive(:commits).and_return([])
17
17
 
18
- @plugin.fail_when_merge_commit_detected
18
+ @plugin.check_merge_commit_detected
19
19
 
20
20
  expect(@dangerfile).to have_no_error
21
21
  end
@@ -26,7 +26,7 @@ module Danger
26
26
  commit('two'),
27
27
  ])
28
28
 
29
- @plugin.fail_when_merge_commit_detected
29
+ @plugin.check_merge_commit_detected
30
30
 
31
31
  expect(@dangerfile).to have_no_error
32
32
  end
@@ -37,7 +37,7 @@ module Danger
37
37
  commit("Merge branch 'develop'"),
38
38
  ])
39
39
 
40
- @plugin.fail_when_merge_commit_detected
40
+ @plugin.check_merge_commit_detected
41
41
 
42
42
  expect(@dangerfile).to have_error(@merge_commits_detected)
43
43
  end
@@ -48,7 +48,7 @@ module Danger
48
48
  commit("Merge branch 'develop'"),
49
49
  ])
50
50
 
51
- @plugin.fail_when_merge_commit_detected
51
+ @plugin.check_merge_commit_detected
52
52
 
53
53
  expect(@dangerfile).to have_error(@merge_commits_detected)
54
54
  end
@@ -59,23 +59,11 @@ module Danger
59
59
  commit("Merge branch 'test'"),
60
60
  ])
61
61
 
62
- @plugin.fail_when_merge_commit_detected
62
+ @plugin.check_merge_commit_detected
63
63
 
64
64
  expect(@dangerfile).to have_error(@merge_commits_detected)
65
65
  end
66
66
  end
67
-
68
- def commit(message)
69
- Commit.new(message)
70
- end
71
-
72
- class Commit
73
- attr_reader :message
74
-
75
- def initialize(message)
76
- @message = message
77
- end
78
- end
79
67
  end
80
68
  end
81
69
  end
@@ -0,0 +1,45 @@
1
+ require File.expand_path('../spec_helper', __FILE__)
2
+
3
+ module Danger
4
+ describe Danger::DangerSamsao do
5
+ describe 'with Dangerfile' do
6
+ before do
7
+ @dangerfile = testing_dangerfile
8
+ @plugin = @dangerfile.samsao
9
+ @content = 'Message'
10
+ end
11
+
12
+ describe 'report' do
13
+ it 'send fail' do
14
+ @plugin.report(:fail, @content)
15
+ expect(@dangerfile).to have_error(@content)
16
+ expect(@dangerfile).to have_no_warning
17
+ expect(@dangerfile).to have_no_message
18
+ end
19
+
20
+ it 'send warn' do
21
+ @plugin.report(:warn, @content)
22
+ expect(@dangerfile).to have_warning(@content)
23
+ expect(@dangerfile).to have_no_error
24
+ expect(@dangerfile).to have_no_message
25
+ end
26
+
27
+ it 'send message' do
28
+ @plugin.report(:message, @content)
29
+ expect(@dangerfile).to have_message(@content)
30
+ expect(@dangerfile).to have_no_warning
31
+ expect(@dangerfile).to have_no_error
32
+ end
33
+
34
+ it 'send unknown level' do
35
+ level = 'unknown'
36
+ error = "Report level '#{level}' is invalid."
37
+ expect { @plugin.report(level, @content) }.to raise_error(error)
38
+ expect(@dangerfile).to have_no_warning
39
+ expect(@dangerfile).to have_no_error
40
+ expect(@dangerfile).to have_no_message
41
+ end
42
+ end
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,26 @@
1
+ require File.expand_path('../spec_helper', __FILE__)
2
+
3
+ module Danger
4
+ describe Danger::DangerSamsao do
5
+ describe 'with Dangerfile' do
6
+ before do
7
+ @dangerfile = testing_dangerfile
8
+ @plugin = @dangerfile.samsao
9
+ end
10
+
11
+ describe 'shorten sha helper' do
12
+ it 'shorten short string' do
13
+ expect(@plugin.shorten_sha('1234')).to eq('1234')
14
+ end
15
+
16
+ it 'shorten long string' do
17
+ expect(@plugin.shorten_sha('1234567890')).to eq('12345678')
18
+ end
19
+
20
+ it 'shorten nil string' do
21
+ expect(@plugin.shorten_sha(nil)).to eq(nil)
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,36 @@
1
+ require File.expand_path('../spec_helper', __FILE__)
2
+
3
+ module Danger
4
+ describe Danger::DangerSamsao do
5
+ describe 'with Dangerfile' do
6
+ before do
7
+ @dangerfile = testing_dangerfile
8
+ @plugin = @dangerfile.samsao
9
+ end
10
+
11
+ describe 'truncate helper' do
12
+ it 'truncate short string' do
13
+ expect(@plugin.truncate('1234')).to eq('1234')
14
+ end
15
+
16
+ it 'truncate long string' do
17
+ actual = 'abcdefghijklmnopqrstuvwxyz1234567890'
18
+ expected = 'abcdefghijklmnopqrstuvwxyz1234'
19
+
20
+ expect(@plugin.truncate(actual)).to eq(expected)
21
+ end
22
+
23
+ it 'truncate nil string' do
24
+ expect(@plugin.truncate(nil)).to eq(nil)
25
+ end
26
+
27
+ it 'truncate custom length string' do
28
+ actual = 'abcdefghijklmnopqrstuvwxyz1234567890'
29
+ expected = 'abcde'
30
+
31
+ expect(@plugin.truncate(actual, 5)).to eq(expected)
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
@@ -16,7 +16,7 @@ module Danger
16
16
  it 'warns when PR title contains [WIP] at the end' do
17
17
  allow(@plugin.github).to receive(:pr_title).and_return('Marker at the end [WIP]')
18
18
 
19
- @plugin.warn_when_work_in_progess_pr
19
+ @plugin.check_work_in_progess_pr
20
20
 
21
21
  expect(@dangerfile).to have_warning(@work_in_progress)
22
22
  end
@@ -24,7 +24,7 @@ module Danger
24
24
  it 'warns when PR title contains [WIP] at the start' do
25
25
  allow(@plugin.github).to receive(:pr_title).and_return('[WIP] Marker at start')
26
26
 
27
- @plugin.warn_when_work_in_progess_pr
27
+ @plugin.check_work_in_progess_pr
28
28
 
29
29
  expect(@dangerfile).to have_warning(@work_in_progress)
30
30
  end
@@ -32,7 +32,7 @@ module Danger
32
32
  it 'warns when PR title contains [WIP] in the middle' do
33
33
  allow(@plugin.github).to receive(:pr_title).and_return('Marker in [WIP] the middle')
34
34
 
35
- @plugin.warn_when_work_in_progess_pr
35
+ @plugin.check_work_in_progess_pr
36
36
 
37
37
  expect(@dangerfile).to have_warning(@work_in_progress)
38
38
  end
@@ -40,7 +40,7 @@ module Danger
40
40
  it 'continues when PR title does not contain [WIP] marker' do
41
41
  allow(@plugin.github).to receive(:pr_title).and_return('A WIP PR')
42
42
 
43
- @plugin.warn_when_work_in_progess_pr
43
+ @plugin.check_work_in_progess_pr
44
44
 
45
45
  expect(@dangerfile).to have_no_warning
46
46
  end
data/spec/spec_helper.rb CHANGED
@@ -54,3 +54,18 @@ def testing_dangerfile
54
54
 
55
55
  Danger::Dangerfile.new(env, testing_ui)
56
56
  end
57
+
58
+ # A commit class to create test
59
+ def commit(message, sha = nil)
60
+ Commit.new(message, sha)
61
+ end
62
+
63
+ class Commit
64
+ attr_reader :message
65
+ attr_reader :sha
66
+
67
+ def initialize(message, sha)
68
+ @message = message
69
+ @sha = sha
70
+ end
71
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: danger-samsao
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samsao Development Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-09 00:00:00.000000000 Z
11
+ date: 2017-08-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: danger-plugin-api
@@ -161,6 +161,7 @@ files:
161
161
  - ".gitignore"
162
162
  - ".rubocop.yml"
163
163
  - ".travis.yml"
164
+ - ".travis/danger.sh"
164
165
  - CHANGELOG.md
165
166
  - Dangerfile
166
167
  - Gemfile
@@ -169,8 +170,6 @@ files:
169
170
  - LICENSE.txt
170
171
  - README.md
171
172
  - Rakefile
172
- - bitrise.wrapper.yml
173
- - bitrise.yml
174
173
  - danger-samsao.gemspec
175
174
  - lib/danger_plugin.rb
176
175
  - lib/danger_samsao.rb
@@ -181,20 +180,30 @@ files:
181
180
  - lib/samsao/plugin.rb
182
181
  - lib/samsao/regexp.rb
183
182
  - spec/matchers/have_error.rb
183
+ - spec/matchers/have_message.rb
184
184
  - spec/matchers/have_no_error.rb
185
+ - spec/matchers/have_no_message.rb
185
186
  - spec/matchers/have_no_warning.rb
186
187
  - spec/matchers/have_warning.rb
188
+ - spec/samsao_acceptance_criteria_spec.rb
187
189
  - spec/samsao_branch_helper_spec.rb
188
190
  - spec/samsao_branching_model_spec.rb
189
191
  - spec/samsao_changelog_modified_spec.rb
190
192
  - spec/samsao_changelog_updated_spec.rb
191
193
  - spec/samsao_config_spec.rb
194
+ - spec/samsao_feature_jira_issue_number_spec.rb
192
195
  - spec/samsao_feature_single_commit_spec.rb
196
+ - spec/samsao_fix_jira_issue_number_spec.rb
193
197
  - spec/samsao_has_app_changes_spec.rb
198
+ - spec/samsao_jira_project_key_spec.rb
199
+ - spec/samsao_label_pr_spec.rb
194
200
  - spec/samsao_merge_commit_detected_spec.rb
195
201
  - spec/samsao_regexp_spec.rb
202
+ - spec/samsao_report_spec.rb
203
+ - spec/samsao_shorten_sha_spec.rb
196
204
  - spec/samsao_spec.rb
197
205
  - spec/samsao_trivial_change_spec.rb
206
+ - spec/samsao_truncate_spec.rb
198
207
  - spec/samsao_work_in_progress_pr_spec.rb
199
208
  - spec/spec_helper.rb
200
209
  homepage: https://github.com/samsao/danger-samsao
@@ -217,25 +226,35 @@ required_rubygems_version: !ruby/object:Gem::Requirement
217
226
  version: '0'
218
227
  requirements: []
219
228
  rubyforge_project:
220
- rubygems_version: 2.6.10
229
+ rubygems_version: 2.6.11
221
230
  signing_key:
222
231
  specification_version: 4
223
232
  summary: A longer description of danger-samsao.
224
233
  test_files:
225
234
  - spec/matchers/have_error.rb
235
+ - spec/matchers/have_message.rb
226
236
  - spec/matchers/have_no_error.rb
237
+ - spec/matchers/have_no_message.rb
227
238
  - spec/matchers/have_no_warning.rb
228
239
  - spec/matchers/have_warning.rb
240
+ - spec/samsao_acceptance_criteria_spec.rb
229
241
  - spec/samsao_branch_helper_spec.rb
230
242
  - spec/samsao_branching_model_spec.rb
231
243
  - spec/samsao_changelog_modified_spec.rb
232
244
  - spec/samsao_changelog_updated_spec.rb
233
245
  - spec/samsao_config_spec.rb
246
+ - spec/samsao_feature_jira_issue_number_spec.rb
234
247
  - spec/samsao_feature_single_commit_spec.rb
248
+ - spec/samsao_fix_jira_issue_number_spec.rb
235
249
  - spec/samsao_has_app_changes_spec.rb
250
+ - spec/samsao_jira_project_key_spec.rb
251
+ - spec/samsao_label_pr_spec.rb
236
252
  - spec/samsao_merge_commit_detected_spec.rb
237
253
  - spec/samsao_regexp_spec.rb
254
+ - spec/samsao_report_spec.rb
255
+ - spec/samsao_shorten_sha_spec.rb
238
256
  - spec/samsao_spec.rb
239
257
  - spec/samsao_trivial_change_spec.rb
258
+ - spec/samsao_truncate_spec.rb
240
259
  - spec/samsao_work_in_progress_pr_spec.rb
241
260
  - spec/spec_helper.rb
data/bitrise.wrapper.yml DELETED
@@ -1,51 +0,0 @@
1
- ---
2
- format_version: 1.4.0
3
- default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
4
- description: |-
5
- This wrapper is configure in bitrise.io editor as the script to run. What it
6
- does mainly is to simply clone the repository and forward the execution of the
7
- workflow to the real build file (bitrise.yml) which is hosted in this repository.
8
-
9
- To work, main workflow here must also be present in bitrise.yml, so main workflows
10
- must be kept synchronized between the two.
11
-
12
- Also, any change made to this file must be **manually** added to bitrise.io editor.
13
- Simply copy/paste the content of this file into the web editor and press save.
14
-
15
- To test locally using bitrise CLI, while at project root directory, simply do:
16
-
17
- bitrise run <workflow> -c bitrise.wrapper.yml
18
-
19
- See http://devcenter.bitrise.io/tips-and-tricks/use-bitrise-yml-from-repository/
20
- for details on the technique.
21
-
22
- trigger_map:
23
- - push_branch: "develop"
24
- workflow: "develop"
25
- - pull_request_target_branch: "*"
26
- pull_request_source_branch: "*"
27
- workflow: "pr"
28
-
29
- workflows:
30
- _run_from_repo:
31
- steps:
32
- - activate-ssh-key@3.1.1:
33
- title: Activate SSH credentials
34
- run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
35
- - git-clone@3.4.2:
36
- title: Clone repository
37
- - script@1.1.3:
38
- title: Continue using repository bitrise.yml
39
- inputs:
40
- - content: |-
41
- #!/bin/bash
42
- set -ex
43
- bitrise run "${BITRISE_TRIGGERED_WORKFLOW_ID}"
44
-
45
- develop:
46
- after_run:
47
- - _run_from_repo
48
-
49
- pr:
50
- after_run:
51
- - _run_from_repo