thefuntasty_danger 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/Dangerfile +11 -6
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ee28e530b3229cf235c4e55d4b8f945a6ba59878
4
- data.tar.gz: 47633391cb9035ea8d2b8c45290016c46bbfa4a8
3
+ metadata.gz: 9be1430924ac37007b4b6cbfe7766083a52c9bd4
4
+ data.tar.gz: c86ea6e0c5c04685047d6c626392457be477dd04
5
5
  SHA512:
6
- metadata.gz: 3ae3ab493c15a392313d2415c1782537758470a069ede6620c0a30a9fe4f26b120c15846fb652532647b4546aa4378a4ab2e54385a43d9fbede538bae9db020a
7
- data.tar.gz: 903dbea54f506e7ce84033db10e28dd22c697603ba0039c8c260167242ca68cba537ccf06df4f262d20a6b575e95cef91af3e335588a7693949e9e5828e4614a
6
+ metadata.gz: 66e1e4de854493316bc77357b5890ab3dab8b99c1271fa9e04f0d24658fd90ea6c5f1566065c2497c1310a4b3f59d35786fae7023a0df3f0fc1dbd281966ad76
7
+ data.tar.gz: 2a803227ace8b2f671a27ee1a49e519cd404aad7c65353c28e71a5e556f3037b4babbe196c6181d26ab6a22bb8109b11aa6a556de6b1f98102a5736df2ba193f
data/Dangerfile CHANGED
@@ -25,15 +25,20 @@ fail("Only hotfix and release can point to master.") if !can_be_merged_to_master
25
25
 
26
26
  # Throw descriptive warnings
27
27
  warn("Branch name should have `release/`, `hotfix/`, `fix/`, `housekeep/` or `feature/` prefix.") if !has_correct_prefix
28
- warn("Feature of fix pull request title should include JIRA-ID.") if is_feature_or_fix and !title_contains_jira_id
29
- warn("Feature of fix pull request branch should include JIRA-ID.") if is_feature_or_fix and !branch_contains_jira_id
28
+ warn("Feature or fix PR title should include JIRA-ID and short description.") if is_feature_or_fix and !title_contains_jira_id
29
+ warn("Feature or fix PR branch name should include JIRA-ID and short description.") if is_feature_or_fix and !branch_contains_jira_id
30
30
  warn("Pull request is classed as Work in Progress") if is_pr_wip
31
31
  warn("This pull request is too big.") if is_pr_big
32
32
 
33
33
  # Send link to JIRA if possible
34
+ def jira_message(link, id)
35
+ message(":large_blue_diamond: [#{id}](#{link}#{id})")
36
+ end
37
+
34
38
  if title_contains_jira_id then
35
- jira_id = title_contains_jira_id.captures.first
36
- message(":large_blue_diamond: [#{jira_id}](#{jira_link}#{jira_id})")
39
+ jira_message(jira_link, title_contains_jira_id.captures.first)
40
+ elsif branch_contains_jira_id then
41
+ jira_message(jira_link, branch_contains_jira_id.captures[1])
37
42
  end
38
43
 
39
44
  # Check commit messages
@@ -46,8 +51,8 @@ if File.file?(swiftlint_binary_path) then
46
51
  swiftlint.lint_files inline_mode: true
47
52
  end
48
53
 
49
- # Send warning from iOS build if possible
50
- if File.file?(build_report_file)
54
+ # Send iOS build results if possible
55
+ if File.file?(build_report_file) then
51
56
  xcode_summary.ignored_files = '**/Pods/**'
52
57
  xcode_summary.inline_mode = true
53
58
  xcode_summary.report build_report_file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thefuntasty_danger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matěj Kašpar Jirásek