Warn if migration time stamp is earlier than three weeks in the past
What does this MR do and why?
If any migrations are being added in a given MR, we want to warn the user if the migration's timestamp is older than three weeks - this keeps migrations in rough chronological order corresponding to the date they were added to GitLab.
How to set up and validate locally
A sample outcome of this testing procedure can be seen here
It is tough to run Danger locally, so I end-to-end tested this code this way:
- Check out branch
407459-warn-if-older-3-weeks
. - Make a new branch based on it -
git checkout -b 407359-test-danger
. - Generate a test migration using
bin/rails generate migration ...
- Rename the migration file such that the timestamp is greater than three weeks in the past.
- Commit the change.
- Push the change and open an MR against master.
- As soon as the
danger-review
job is done, review the comment left on the MR.
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.
Related to #407459 (closed)
Edited by Jon Jenkins