2018-08-27 11:26:28 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
# All the files/directories that should be reviewed by the Docs team.
|
|
|
|
DOCS_FILES = [
|
|
|
|
'doc/'
|
|
|
|
].freeze
|
|
|
|
|
|
|
|
def docs_paths_requiring_review(files)
|
|
|
|
files.select do |file|
|
|
|
|
DOCS_FILES.any? { |pattern| file.start_with?(pattern) }
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2018-10-16 09:56:03 -04:00
|
|
|
docs_paths_to_review = docs_paths_requiring_review(helper.all_changed_files)
|
2018-08-27 11:26:28 -04:00
|
|
|
|
|
|
|
unless docs_paths_to_review.empty?
|
|
|
|
message 'This merge request adds or changes files that require a ' \
|
|
|
|
'review from the docs team.'
|
|
|
|
|
|
|
|
markdown(<<~MARKDOWN)
|
|
|
|
## Docs Review
|
|
|
|
|
|
|
|
The following files require a review from the Documentation team:
|
|
|
|
|
|
|
|
* #{docs_paths_to_review.map { |path| "`#{path}`" }.join("\n* ")}
|
|
|
|
|
2018-11-09 13:55:27 -05:00
|
|
|
When your content is ready for review, mention a technical writer in a separate
|
|
|
|
comment and explain what needs to be reviewed.
|
2018-11-09 10:37:22 -05:00
|
|
|
|
2018-11-12 04:09:02 -05:00
|
|
|
You are welcome to mention them sooner if you have questions about writing or updating
|
2018-11-09 13:55:27 -05:00
|
|
|
the documentation. GitLabbers are also welcome to use the [#docs](https://gitlab.slack.com/archives/C16HYA2P5) channel on Slack.
|
2018-11-09 10:37:22 -05:00
|
|
|
|
2018-11-09 13:55:27 -05:00
|
|
|
Who to ping [based on DevOps stages](https://about.gitlab.com/handbook/product/categories/#devops-stages):
|
2018-11-09 10:37:22 -05:00
|
|
|
|
2018-11-12 04:09:02 -05:00
|
|
|
| Stage | Tech writer |
|
|
|
|
| ------------- | ----------- |
|
|
|
|
| ~Create | `@marcia` |
|
|
|
|
| ~Configure | `@eread` |
|
|
|
|
| ~Distribution | `@axil` |
|
|
|
|
| ~Geo | `@eread` |
|
|
|
|
| ~Gitaly | `@axil` |
|
|
|
|
| ~Gitter | `@axil` |
|
|
|
|
| ~Manage | `@eread` |
|
|
|
|
| ~Monitoring | `@axil` |
|
|
|
|
| ~Packaging | `@axil` |
|
|
|
|
| ~Plan | `@mikelewis`|
|
|
|
|
| ~Release | `marcia` |
|
|
|
|
| ~Secure | `@axil` |
|
|
|
|
| ~Verify | `@eread` |
|
2018-11-09 13:55:27 -05:00
|
|
|
|
|
|
|
If you are not sure which category the change falls within, or the change is not
|
|
|
|
part of one of these categories, you can mention the whole team with `@gl-docsteam`.
|
2018-08-27 11:26:28 -04:00
|
|
|
MARKDOWN
|
|
|
|
|
|
|
|
unless gitlab.mr_labels.include?('Documentation')
|
|
|
|
warn 'This merge request is missing the ~Documentation label.'
|
|
|
|
end
|
|
|
|
end
|