This extends Danger so it informs MR authors that single codebase merge
requests need to be approved by a specific group of engineers.
Co-authored-by: Yorick Peterse <yorickpeterse@gmail.com>
Make danger pick reviewers and maintainers at random, for feontend,
backend, database, etc, changes, whenever files belonging to those
teams get changed.
This danger check utilises `yarn-deduplicate` in order to show duplicate
dependencies in the yarn.lock dependency tree.
Often when introducing new dependencies or updating existing ones, yarn
does not seem to build the most optimal dependency tree.
In order to prevent those unnecessary dependency updates we are nudging
developers and maintainers to resolve these issues in MRs. Automating
this with danger especially helps, as yarn.lock files are not that easy
to review.
Danger apparently has three different objects which could contain files
you often want to check:
- git.added_files
- git.modified_files
- git.renamed_files
The problem: If a file is renamed, `modified_files` contains the file
path before the rename. In some Danger checks we use `added_files` +
`modified_files`, which might contain the deleted paths of renamed
files, but missing the new paths of renamed files.
So we need to consider `renamed_files` as well.
This Dangerfile ensures that commit authors write good commit messages.
We also prevent the use of Emoji, since these add no value and may not
always be displayed properly.
Merge commits are currently ignored. In the future we most likely want
to stop using these, but this is a separate discussion, hence we ignore
them for the time being.
The rules enforced by this Dangerfile are based on the article found at
https://chris.beams.io/posts/git-commit/. For more information, refer to
https://gitlab.com/gitlab-org/gitlab-ce/issues/50003.
Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/50003