thefuntasty_danger 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/Dangerfile +11 -6
- 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: 9be1430924ac37007b4b6cbfe7766083a52c9bd4
|
|
4
|
+
data.tar.gz: c86ea6e0c5c04685047d6c626392457be477dd04
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
|
29
|
-
warn("Feature
|
|
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
|
-
|
|
36
|
-
|
|
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
|
|
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
|