Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
b1b55371
Commit
b1b55371
authored
Aug 27, 2018
by
Achilleas Pipinellis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Documentation Dangerfile
Every time a doc change is made, a comment to ping the @gl-docsteam is added.
parent
b64ba567
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
0 deletions
+47
-0
Dangerfile
Dangerfile
+1
-0
danger/documentation/Dangerfile
danger/documentation/Dangerfile
+37
-0
doc/development/documentation/index.md
doc/development/documentation/index.md
+9
-0
No files found.
Dangerfile
View file @
b1b55371
...
@@ -4,4 +4,5 @@ danger.import_dangerfile(path: 'danger/changelog')
...
@@ -4,4 +4,5 @@ danger.import_dangerfile(path: 'danger/changelog')
danger
.
import_dangerfile
(
path:
'danger/specs'
)
danger
.
import_dangerfile
(
path:
'danger/specs'
)
danger
.
import_dangerfile
(
path:
'danger/gemfile'
)
danger
.
import_dangerfile
(
path:
'danger/gemfile'
)
danger
.
import_dangerfile
(
path:
'danger/database'
)
danger
.
import_dangerfile
(
path:
'danger/database'
)
danger
.
import_dangerfile
(
path:
'danger/documentation'
)
danger
.
import_dangerfile
(
path:
'danger/frozen_string'
)
danger
.
import_dangerfile
(
path:
'danger/frozen_string'
)
danger/documentation/Dangerfile
0 → 100644
View file @
b1b55371
# 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
all_files
=
git
.
added_files
+
git
.
modified_files
docs_paths_to_review
=
docs_paths_requiring_review
(
all_files
)
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
* ")}
To make sure these changes are reviewed, mention `@gl-docsteam` in a separate
comment, and explain what needs to be reviewed by the team. Please don't mention
the team until your changes are ready for review.
MARKDOWN
unless
gitlab
.
mr_labels
.
include?
(
'Documentation'
)
warn
'This merge request is missing the ~Documentation label.'
end
end
doc/development/documentation/index.md
View file @
b1b55371
...
@@ -257,6 +257,15 @@ choices:
...
@@ -257,6 +257,15 @@ choices:
If your branch name matches any of the above, it will run only the docs
If your branch name matches any of the above, it will run only the docs
tests. If it doesn't, the whole test suite will run (including docs).
tests. If it doesn't, the whole test suite will run (including docs).
## Danger bot
GitLab uses [danger bot](https://github.com/danger/danger) for some elements in
code review. For docs changes in merge requests, the following actions are taken:
1. Whenever a change under `/doc` is made, the bot leaves a comment for the
author to mention `@gl-docsteam`, so that the docs can be properly
reviewed.
## Merge requests for GitLab documentation
## Merge requests for GitLab documentation
Before getting started, make sure you read the introductory section
Before getting started, make sure you read the introductory section
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment