From 07d4cce8bce8b1bc4c735c7d941c20046600fb3f Mon Sep 17 00:00:00 2001 From: Zeger-Jan van de Weg Date: Tue, 24 Apr 2018 11:33:54 +0200 Subject: [PATCH 1/2] Move danger to the test stage Given GitLab Pipelines work based on pushes, and not MRs, it can happen that the danger job starts before the MR is created. This leads to no output from danger. By moving it up one stage, a bit more MRs will be done on the first go too. An example of this happening is: https://gitlab.com/gitlab-org/gitaly/-/jobs/64654110 --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a2ed59b728c..0fb5a4a550b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -15,7 +15,7 @@ verify: - make verify danger-review: - stage: build + stage: test script: - git version - gem install danger-gitlab --no-document -- GitLab From 2340cb36101d8e797f8b72dd2066fec2a5241622 Mon Sep 17 00:00:00 2001 From: Zeger-Jan van de Weg Date: Tue, 24 Apr 2018 14:06:53 +0200 Subject: [PATCH 2/2] Add spelling check to markdown files Ignored words are empty now, but after the first push a few should be added probably. --- .gitlab-ci.yml | 2 +- Dangerfile | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0fb5a4a550b..d9c29413acd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -18,7 +18,7 @@ danger-review: stage: test script: - git version - - gem install danger-gitlab --no-document + - gem install danger-gitlab danger-prose --no-document - danger .ruby_template: &ruby_definition diff --git a/Dangerfile b/Dangerfile index c1ffd180f62..db9f8f97db1 100644 --- a/Dangerfile +++ b/Dangerfile @@ -17,3 +17,11 @@ if git.modified_files.include?(VENDOR_JSON) fail("gitaly-proto version is incorrect") end end + +# Look for prose issues +markdown_files = Dir['*.md'] + Dir['doc/**/*.md'] +prose.lint_files markdown_files + +# Look for spelling issues +prose.ignored_words = [] # Add later if we know what and why +prose.check_spelling markdown_files -- GitLab