Commit Graph

85 Commits

Author SHA1 Message Date
Marcel Amirault 6f3fa06fd1 Change docs markdown linter
Change from ruby mdl to node markdownlint, add
config file to root of project, delete old config
file, update exceptions, and fix one doc that
was didn't meet standards
2019-08-26 20:31:04 +00:00
Rémy Coutable 8ad3691b59
Make it clear that it's ok to ignore Danger's 'no changelog' warning
Signed-off-by: Rémy Coutable <remy@rymai.me>
2019-08-22 16:27:28 +02:00
Rémy Coutable 90f2adcb08
Make Danger consider .md files as documentation files
Signed-off-by: Rémy Coutable <remy@rymai.me>
2019-08-21 15:38:15 +02:00
Tiger e8d23fc872 Fix duplicated suggestion in Danger gem warning 2019-07-24 13:07:38 +10:00
Toon Claes 34a5f77e77 Document database review process
See https://gitlab.com/gitlab-com/gl-infra/infrastructure/issues/6069
2019-07-19 17:33:48 +00:00
Lin Jen-Shin f6399f1dfe Merge branch 'danger-throughputs' into 'master'
Danger asks for throughput labels

See merge request gitlab-org/gitlab-ce!30622
2019-07-17 15:09:49 +00:00
Achilleas Pipinellis 2549d2f08a Do not fail danger if suggestion commit msg > 72
We have another rule that requires squash enabled
when suggestions are applied. No need to fail the
ones that are more than 72 characters long since
they will be squashed anyway.
2019-07-16 16:51:31 +00:00
Mark Fletcher 4f72293aaf Danger asks for throughput labels 2019-07-11 14:19:26 +01:00
Marcel Amirault 81547207ca Docs: Update danger to accept docs linting changes 2019-07-09 06:27:43 +00:00
Marcel Amirault 5bea7d102b Update dangerfile to exclude docs ci yaml 2019-07-06 13:32:50 +00:00
Toon Claes 37e4d6d991 DRY up conditions for files require DB review
Stop using two separate lists for the conditions which files require a
database review.

Related discussion:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/30156#note_187732053
2019-07-04 18:47:16 +00: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
Achilleas Pipinellis f10c8481b3 When using suggestions, squash must be enabled 2019-06-19 14:17:10 +00:00
Yorick Peterse 8469f59d78
Backport the EE schema and migrations to CE
This backports all EE schema changes to CE, including EE migrations,
ensuring both use the same schema.

== Updated tests

A spec related to ghost and support bot users had to be modified to make
it pass. The spec in question assumes that the "support_bot" column
exists when defining the spec. In the single codebase setup this is not
the case, as the column is backported in a later migration. Any attempt
to use a different schema version or use of "around" blocks to
conditionally disable specs won't help, as reverting the backport
migration would also drop the "support_bot" column. Removing the
"support_bot" tests entirely appears to be the only solution.

We also need to update some foreign key tests now that we have
backported the EE columns. Fortunately, these changes are very minor.

== Backporting migrations

This commit moves EE specific migrations (except those for the Geo
tracking database) and related files to CE, and also removes any traces
of the ee/db directory.

Some migrations had to be modified or removed, as they no longer work
with the schema being backported. These migrations were all quite old,
so we opted for removing them where modifying them would take too much
time and effort.

Some old migrations were modified in EE, while also existing in CE. In
these cases we took the EE code, and in one case removed them entirely.
It's not worth spending time trying to merge these changes somehow as we
plan to remove old migrations around the release of 12.0, see
https://gitlab.com/gitlab-org/gitlab-ce/issues/59177 for more details.
2019-06-17 17:09:05 +02:00
Jacopo cef127e107 Excludes MR author from Review roulette
Excludes MR author from gitlab_ui and single_codebase Review roulette
results.
2019-06-12 21:32:35 +02:00
Sean McGivern 1b2de25dee Don't fail the pipeline when a colon-emoji is used
A colon-emoji like 💯 can be valid in the case where we're talking
about the GitLab feature that processes these into emojis. It's fine to
warn about those, but failing the pipeline is too restrictive.
2019-06-06 19:14:08 +01:00
Lin Jen-Shin 74399a9098
Show Test Automation Engineer for spec/feature as
reviewers.
2019-06-06 21:11:57 +08:00
Lin Jen-Shin ceb0636cbe Use roulette for single codebase roulette 2019-05-30 19:24:28 +08: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
Stan Hu f93b2e02a5 Run rubocop -a on CE files 2019-05-05 03:24:28 -07:00
Sean McGivern 60525148e7 Fix reviewer roulette when no-one is in a category
This would return `people.size` before, when it should return `nil`.
2019-04-30 13:31:52 +01:00
Michael Kozono dfc9d0b694 Exclude reviewers with OOO in status 2019-04-29 13:49:28 -05: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
Sean McGivern 28531ab436 Pick reviewers based on branch name
Change reviewer roulette to always pick the same reviewers for the same
branch name. We do this by:

1. Making the branch name 'canonical' across CE and EE by stripping a
   leading 'ce-' or 'ee-' and a trailing '-ce' or '-ee'. If people are
   following our branch naming guidelines, this should give the same
   branch name in both repos.
2. Converting the branch name to a stable integer by taking the integer
   form of its MD5.
3. Passing that integer as a seed to Ruby's `Random` class, which 'may
   be used to ensure repeatable sequences of pseudo-random numbers
   between different runs of the program' (from the Ruby documentation).

The upshot is that the same branch name (in CE and EE) should always
pick the same reviewers, and those should be evenly distributed across
the set of possible reviewers due to the use of MD5.
2019-04-08 11:56:17 +01:00
Sean McGivern 575ec3af13 Add issue links to Danger roulette comments 2019-04-08 11:56:17 +01:00
Sean McGivern dea1171724 Make trainee maintainers three times as likely to be picked
Trainee maintainers count as reviewers, but should get more reviews than
most reviewers, as they need practice to become a maintainer. This makes
them three times as likely to be picked (compared to another reviewer;
compared to before, it's roughly twice as likely at the current numbers
for each).

Also, switch to `Array#sample` because I think it looks nicer.
2019-04-05 11:20:44 +01:00
Filipa Lacerda 072489e36d Set specific reviewers for the GitLab UI WG effort 2019-03-29 11:56:18 +00:00
Evan Read a0c6418dd7 Reduce dangerbot message to the essentials 2019-03-13 09:49:24 +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
Lin Jen-Shin e9598f80a1 Resolve "Fix danger commit messages check" 2019-02-22 11:56:45 +00:00
Mike Lewis 09532e38bd Merge branch 'template-improvements-for-documentation' into 'master'
Template and process improvements for documentation

See merge request gitlab-org/gitlab-ce!24315
2019-02-20 22:43:32 +00:00
Kamil Trzciński d8145aa693 Refactor commit_messages#lint_commit
This introduces additional method for linting,
to reduce the complexity of `lint_commits`.
2019-02-20 14:25:12 +01:00
Kamil Trzciński 9d842c704a Ignore revert commits 2019-02-19 15:05:45 +01:00
Mike Lewis 07c32a0df5 Merge branch 'master' into 'template-improvements-for-documentation'
# Conflicts:
#   .gitlab/merge_request_templates/Documentation.md
2019-02-18 21:38:24 +00:00
Mike Lewis f1645c744f Update Documentation Dangerfile with small wording change 2019-02-18 21:23:25 +00:00
Nick Thomas 324a8fa28e
Fix the documentation Dangerfile 2019-02-18 10:03:46 +00:00
Nick Thomas 9afc4f9d11
Reviewer roulette ignores changelogs 2019-02-14 23:52:30 +00: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
Nick Thomas 235fe67bdb
Move the ee? helper method into the helper 2019-02-13 16:30:02 +00:00
Nick Thomas f034a35250
Move change category detection to a helper 2019-02-13 16:30:02 +00:00
Mike Lewis 62f65a6d02 Update Dangerfile per updated Technical Writing review policy 2019-02-11 21:19:06 +00:00
Achilleas Pipinellis 722b849651
Change Monitoring to Monitor in docs dangerfile 2019-01-22 15:39:22 +01:00
Drew Blessing efe7f4f768 Fix Danger commit message errors 2019-01-11 22:22:10 +00:00
Paul Slaughter 193f764bc2
Shorten danger 50 char commit warning
- Also pulls URLs into vars
2019-01-11 07:33:02 -06:00
Rémy Coutable 8f9d9112e6
Only detect short refs followed by \b in Danger
Signed-off-by: Rémy Coutable <remy@rymai.me>
2019-01-08 16:37:06 +01:00
George Tsiolis 35eee0b4b0 Update danger for documentation [ci skip]
Rename ~Packaging label to ~Package
2018-12-19 13:51:29 +02:00
Rémy Coutable 9e26728cfe Merge branch '51226-check-yarn-lock' into 'master'
Add danger check for duplicate yarn dependencies

Closes #51226

See merge request gitlab-org/gitlab-ce!21591
2018-12-18 10:42:09 +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
Sam Bigelow 0f069485c6 Clarify messaging on what fails for too many failed lines 2018-12-17 06:42:59 +00:00
Jasper Maes 44fef4fe4c Remove rails 4 support in CI, Gemfiles, bin/ and config/ 2018-12-14 19:36:22 +01:00