summaryrefslogtreecommitdiff
path: root/danger/documentation
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2019-09-06 06:22:02 +0000
committerLin Jen-Shin <godfat@godfat.org>2019-09-06 06:22:02 +0000
commit351d72cbed57c5b117e6b2239dffabcedbc45046 (patch)
tree0c1d87332450741f710e159485a0f1e8899767ee /danger/documentation
parent13227500f29d8a74c77cba23b7dfdb4169222821 (diff)
parent70e1a17604a45419b079ab9da5ef69e010b103c6 (diff)
downloadgitlab-ce-351d72cbed57c5b117e6b2239dffabcedbc45046.tar.gz
Merge branch '66596-allow-danger-to-be-run-locally' into 'master'
Break up Danger rules into local or CI only See merge request gitlab-org/gitlab-ce!32196
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