Commit 62bc1822 authored by Alexis Reigel's avatar Alexis Reigel

Merge branch 'chores/document-correct-dangerfile-path' into 'master'

'Dangerfile' needs to be appended to the path

See merge request !2
parents ba846520 3c17d7b3
Pipeline #31333 passed with stage
in 10 seconds
......@@ -11,21 +11,21 @@ Provides rules for [Danger](https://danger.systems/ruby/) that ~~can~~ should
```ruby
# imports all rules
danger.import_dangerfile(gitlab: 'open-source/danger-rules', path: 'rules/all')
danger.import_dangerfile(gitlab: 'open-source/danger-rules', path: 'rules/all/Dangerfile')
# only import one specific rule
danger.import_dangerfile(gitlab: 'open-source/danger-rules', path: 'rules/git/wip_commit')
danger.import_dangerfile(gitlab: 'open-source/danger-rules', path: 'rules/git/wip_commit/Dangerfile')
```
Available rules:
<!-- rules -->
- rules/all
- rules/git/commit\_message\_too\_long
- rules/git/fixup\_commit
- rules/git/master\_merge\_commit
- rules/git/wip\_commit
- rules/merge\_request/issue\_reference
- rules/all/Dangerfile
- rules/git/commit\_message\_too\_long/Dangerfile
- rules/git/fixup\_commit/Dangerfile
- rules/git/master\_merge\_commit/Dangerfile
- rules/git/wip\_commit/Dangerfile
- rules/merge\_request/issue\_reference/Dangerfile
<!-- /rules -->
1. Add the following to your `.gitlab-ci.yml`
......
......@@ -36,7 +36,6 @@ task 'generate:readme' do
files = [ALL_DANGER_FILE, *danger_files].map do |file|
file
.sub(%r{^src/}, '')
.sub(%r{/Dangerfile$}, '')
.gsub('_', '\_')
.yield_self { |f| "rules/#{f}" }
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment