File: Dangerfile

package info (click to toggle)
gitlab 17.6.5-19
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 629,368 kB
  • sloc: ruby: 1,915,304; javascript: 557,307; sql: 60,639; xml: 6,509; sh: 4,567; makefile: 1,239; python: 406
file content (33 lines) | stat: -rw-r--r-- 1,247 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# frozen_string_literal: true

BLUEPRINT_LABEL = 'Architecture Evolution Blueprint'

return unless helper.ci?

blueprint_changes = helper.changed_files(%r{^doc/architecture/blueprints/.*})

BLUEPRINT_SHORT_MESSAGE = <<~MSG
This merge request might require a review from a [Coach Engineer](https://about.gitlab.com/handbook/engineering/architecture/workflow/).
MSG

BLUEPRINT_LONG_MESSAGE = <<~MSG
## Architecture Evolution Review

:exclamation: We plan to [move the architecture and design documents](https://gitlab.com/gitlab-com/content-sites/handbook/-/issues/279)
to the [public GitLab handbook](https://handbook.gitlab.com/handbook/engineering/architecture/).
This will change how you contribute to the documents. Follow the
[migration issue](https://gitlab.com/gitlab-com/content-sites/handbook/-/issues/279)
and join the `#architecture` and `#handbook` Slack channels for updates.

#{BLUEPRINT_SHORT_MESSAGE}

The following files, which might require the additional review, have been changed:
#{helper.markdown_list(blueprint_changes.to_set)}
MSG

if blueprint_changes.any?
  message(BLUEPRINT_SHORT_MESSAGE)
  markdown(BLUEPRINT_LONG_MESSAGE)

  helper.labels_to_add.push(BLUEPRINT_LABEL) unless helper.mr_has_labels?(BLUEPRINT_LABEL)
end