Commit graph

30 commits

Author SHA1 Message Date
Rémy Coutable 7c772bebf6
danger: Don't warn for missing labels while adding some
Signed-off-by: Rémy Coutable <remy@rymai.me>
2021-10-27 17:43:31 +02:00
Rémy Coutable 0d038abc24
danger: Use the changes_size Dangerfile from gitlab-dangerfiles
This opens up the possibility to actually re-use Danger rules accross
projects.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2021-05-04 14:00:22 +02:00
Heinrich Lee Yu a44959c3b7 Revert "Merge branch 'use-changes_size-from-gitlab-dangerfiles' into 'master'"
This reverts merge request !58130
2021-05-04 07:30:33 +00:00
Rémy Coutable d3bfdb4f59
danger: Use the changes_size Dangerfile from gitlab-dangerfiles
This opens up the possibility to actually re-use Danger rules accross
projects.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2021-04-28 11:48:43 +02:00
Rémy Coutable 95a3801f23 Use the gitlab-dangerfiles gem
The gem provides helpers that can be reused by multiple projects.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2021-03-12 16:31:04 +08:00
Rémy Coutable b1fcd0ad99
New Danger check to ensure a FF group is the same as the MR group label
This is to ensure good hygiene of the feature flag data.

See https://gitlab.com/gitlab-org/gitlab/-/issues/294218 and
https://gitlab.com/gitlab-org/gitlab/-/issues/299464.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2021-01-26 11:11:38 +01:00
Albert Salim 4ec103c627 Remove conditional require lines
These were added because of Rails eagerload.
These files are now moved out of Rails eagerload path,
so the conditionals are not necessary.
2021-01-20 11:52:32 +00:00
Sean McGivern e4edc69ed5
Add a Danger message when Sidekiq queues change
When Sidekiq queues are added, or existing queues are changed, this can
have some impact on our infrastructure as we may have a change in
workload that leads to us needing to make an infrastructure change.

The Scalability team can help with this, so point to them as a first
step.
2020-06-26 13:35:10 +01:00
Rémy Coutable bac4c30066
Only post 'Retry' message if Danger says anything
Signed-off-by: Rémy Coutable <remy@rymai.me>
2020-05-26 10:08:12 +02:00
Rémy Coutable d73ef010e1
Add a link to the 'danger-review' job
Signed-off-by: Rémy Coutable <remy@rymai.me>
2020-05-25 10:08:20 +02:00
Paul Gascou-Vaillancourt 5a0f8c5de2 Create changelog plugin
- Moved helper methods from Dangerfile into a new Danger plugin
- Added tests for all public methods in the plugin
2019-12-12 14:01:07 +00:00
Winnie Hellmann f9bb48c63d Move out_of_office? from reviewer roulette to Teammate class 2019-10-16 06:30:29 +00:00
Ash McKenzie 2c3208b3aa Add new GitlabDanger class
This class encapsulates our use of the Danger gem.
2019-09-06 11:09:46 +00:00
Ash McKenzie 98544921bb Revert "Merge branch '66596-allow-danger-to-be-run-locally' into 'master'"
This reverts merge request !16168
2019-09-06 07:20:50 +00:00
Ash McKenzie cfc543f865
Use GitlabDanger class when determining rules 2019-09-06 10:56:33 +10:00
Lukas Eipert 068d6baa38
Add a danger rule to suggest docs- prefixes
If an MR only changes files within `doc/` we can save valueable CI time
by prepending a branch name with `docs-`. This danger rule helps educate
people about that fact.

On the other hand, if someone has a branch with a `docs` prefix or
suffix, the branch shouldn't contain any changes outside of the `docs`
directory
2019-06-27 12:07:06 +02:00
Lin Jen-Shin c90ba127bf Extract roulette to its own module
So it's more modular and extensible
2019-05-30 19:24:28 +08:00
Nathan Friend c3268a6af5
Add Danger rule for EE/CE templates
This commit adds a rule to Danger that warns the developer when their MR
includes changes to a CE .vue file that has a counterpart in the
EE repo or vice-versa.
2019-04-24 09:08:33 -03:00
Robert Speicher fee7036394
Exempt release automation MRs from Danger rules 2019-04-04 13:26:01 +02:00
Filipa Lacerda 072489e36d Set specific reviewers for the GitLab UI WG effort 2019-03-29 11:56:18 +00:00
Marin Jankovski 87d19300e3
Set specific reviewers for single codebase effort
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>
2019-03-11 10:42:19 +01:00
Nick Thomas 77b2ecd2b1
Reviewer roulette via Danger
Make danger pick reviewers and maintainers at random, for feontend,
backend, database, etc, changes, whenever files belonging to those
teams get changed.
2019-02-13 16:41:28 +00:00
Lukas Eipert 243bd56f9d
Add danger check for duplicate yarn dependencies
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.
2018-12-17 09:58:39 +01:00
Lukas Eipert 253e1818aa
Create helper to get all changed files
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.
2018-10-22 11:04:55 +02:00
Lukas Eipert 685d579472
Danger check for ignored eslint rules
We disabled a lot of eslint rules on a per-file basis. This checks
touched files for those and reminds you to re-enable the rules and fix
them.
2018-09-29 08:22:12 +02:00
Lukas Eipert 4df24e5f04
Danger check for unprettified JavaScript
This adds a Dangerfile which executes `prettier` to find out if someone
touched Frontend files and forgot to run it on their current branch.
2018-09-28 22:04:26 +02:00
Yorick Peterse 28b56b7172
Added Danger file to lint commit messages
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
2018-09-10 14:12:58 +02:00
Achilleas Pipinellis b1b55371c6
Add Documentation Dangerfile
Every time a doc change is made, a comment to
ping the @gl-docsteam is added.
2018-09-06 10:50:35 +02:00
gfyoung db00a9c641 Add Dangerfile for frozen_string_literal
Checks that new Ruby files will enable
frozen string literal.

Partially addresses #47424.
2018-07-24 02:17:45 -07:00
Rémy Coutable 5679837cd4
Start to use Danger for automating MR reviews
Signed-off-by: Rémy Coutable <remy@rymai.me>
2018-07-11 11:52:01 +02:00