debian-mirror-gitlab/danger/documentation/Dangerfile

26 lines
933 B
Ruby
Raw Normal View History

2018-11-20 20:47:30 +05:30
# frozen_string_literal: true
2019-07-07 11:18:12 +05:30
docs_paths_to_review = helper.changes_by_category[:docs]
2018-11-20 20:47:30 +05:30
unless docs_paths_to_review.empty?
2019-07-07 11:18:12 +05:30
message 'This merge request adds or changes files that require a review ' \
'from the Technical Writing team.'
2018-11-20 20:47:30 +05:30
markdown(<<~MARKDOWN)
2019-07-07 11:18:12 +05:30
## Documentation review
2018-11-20 20:47:30 +05:30
2019-07-07 11:18:12 +05:30
The following files require a review from a technical writer:
2018-11-20 20:47:30 +05:30
* #{docs_paths_to_review.map { |path| "`#{path}`" }.join("\n* ")}
2019-07-07 11:18:12 +05:30
The review does not need to block merging this merge request. See the:
2019-02-15 15:39:39 +05:30
2019-07-07 11:18:12 +05:30
- [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.
2018-11-20 20:47:30 +05:30
MARKDOWN
unless gitlab.mr_labels.include?('Documentation')
warn 'This merge request is missing the ~Documentation label.'
end
end