Adds a first pass at a ci config danger rule
What does this MR do and why?
This MR adds a danger rule to warn people when they change CI rules, but don't update the schema to match the change. We use the schema to suggest and autocomplete in the pipeline editor and Web IDE, so keeping it up-to-date is important. This danger rule should help with that.
If any changes are made to the CI rules, but there's no change to the schema, the warning triggers.
Note: Currently, the message links to the schema itself. We'd like it to link to documentation that helps you with updating the schema but we don't have that just yet. It's being written and we'll update this rule when we have it.
Screenshots or screen recordings
How to set up and validate locally
- Pull down this branch
- Make a commit that changes files in
lib/gitlab/ci/config/entry/
oree/lib/gitlab/ci/config/entry/
- Run the dangerbot locally with
bin/rails danger_local
, you should see the warning message - Make a commit that changes the schema in
app/assets/javascripts/editor/schema/ci.json
- Run dangerbot again
bin/rails danger_local
, the warning message should no-longer be there.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.