summaryrefslogtreecommitdiff
path: root/danger/documentation
diff options
context:
space:
mode:
authorAsh McKenzie <amckenzie@gitlab.com>2019-08-26 17:06:15 +1000
committerAsh McKenzie <amckenzie@gitlab.com>2019-09-06 10:56:54 +1000
commit70e1a17604a45419b079ab9da5ef69e010b103c6 (patch)
tree9da29bbf906f1cc8ac15eaa59372de0d5c47d58b /danger/documentation
parentfdc17ebc039e53dd0ed8119c92fac5fd2f43c7fe (diff)
downloadgitlab-ce-70e1a17604a45419b079ab9da5ef69e010b103c6.tar.gz
Update some Danger rules to not rely upon CI66596-allow-danger-to-be-run-locally
Convert a bunch of Danger rules so they can run locally.
Diffstat (limited to 'danger/documentation')
-rw-r--r--danger/documentation/Dangerfile22
1 files changed, 12 insertions, 10 deletions
diff --git a/danger/documentation/Dangerfile b/danger/documentation/Dangerfile
index 96c0d9b7478..ad64c3a6c60 100644
--- a/danger/documentation/Dangerfile
+++ b/danger/documentation/Dangerfile
@@ -6,20 +6,22 @@ unless docs_paths_to_review.empty?
message 'This merge request adds or changes files that require a review ' \
'from the Technical Writing team.'
- markdown(<<~MARKDOWN)
-## Documentation review
+ if GitlabDanger.new(helper.gitlab_helper).ci?
+ markdown(<<~MARKDOWN)
+ ## Documentation review
-The following files require a review from a technical writer:
+ The following files require a review from a technical writer:
-* #{docs_paths_to_review.map { |path| "`#{path}`" }.join("\n* ")}
+ * #{docs_paths_to_review.map { |path| "`#{path}`" }.join("\n* ")}
-The review does not need to block merging this merge request. See the:
+ The review does not need to block merging this merge request. See the:
-- [DevOps stages](https://about.gitlab.com/handbook/product/categories/#devops-stages) for the appropriate technical writer for this review.
-- [Documentation workflows](https://docs.gitlab.com/ee/development/documentation/workflow.html) for information on when to assign a merge request for review.
- MARKDOWN
+ - [DevOps stages](https://about.gitlab.com/handbook/product/categories/#devops-stages) for the appropriate technical writer for this review.
+ - [Documentation workflows](https://docs.gitlab.com/ee/development/documentation/workflow.html) for information on when to assign a merge request for review.
+ MARKDOWN
- unless gitlab.mr_labels.include?('Documentation')
- warn 'This merge request is missing the ~Documentation label.'
+ unless gitlab.mr_labels.include?('Documentation')
+ warn 'This merge request is missing the ~Documentation label.'
+ end
end
end