Commit Graph

173 Commits

Author SHA1 Message Date
GitLab Bot d8803c7e40 Add latest changes from gitlab-org/gitlab@master 2020-05-07 09:09:51 +00:00
GitLab Bot 0f59ad0c29 Add latest changes from gitlab-org/gitlab@master 2020-04-28 09:09:34 +00:00
GitLab Bot e33f87ac0f Add latest changes from gitlab-org/gitlab@master 2020-04-21 15:21:10 +00:00
GitLab Bot f098e6d3d2 Add latest changes from gitlab-org/gitlab@master 2020-04-06 03:09:23 +00:00
GitLab Bot c6c7437861 Add latest changes from gitlab-org/gitlab@master 2020-03-04 12:07:52 +00:00
GitLab Bot e0fa0638a4 Add latest changes from gitlab-org/gitlab@master 2020-02-27 18:09:21 +00:00
GitLab Bot 0637ba1e6e Add latest changes from gitlab-org/gitlab@master 2020-02-18 12:09:15 +00:00
GitLab Bot 5564275a0b Add latest changes from gitlab-org/gitlab@master 2020-02-06 12:10:29 +00:00
GitLab Bot 1ce6af4aad Add latest changes from gitlab-org/gitlab@master 2020-01-24 00:08:51 +00:00
GitLab Bot 02ab65d49f Add latest changes from gitlab-org/gitlab@master 2020-01-14 09:08:19 +00:00
GitLab Bot a5ab3467a7 Add latest changes from gitlab-org/gitlab@master 2020-01-13 15:07:53 +00:00
GitLab Bot 9f2d4a6490 Add latest changes from gitlab-org/gitlab@master 2019-12-23 18:07:33 +00:00
GitLab Bot 185f428fa5 Add latest changes from gitlab-org/gitlab@master 2019-10-07 12:06:18 +00:00
GitLab Bot b7dfe2ae40 Add latest changes from gitlab-org/gitlab@master 2019-09-13 13:26:31 +00:00
Diego Louzán 0dcb9d21ef feat: SMIME signed notification emails
- Add mail interceptor the signs outgoing email with SMIME
- Add lib and helpers to work with SMIME data
- New configuration params for setting up SMIME key and cert files
2019-08-20 16:13:32 +02:00
Mayra Cabrera 0ab89d8e36 Add a rubocop for Rails.logger
Suggests to use a JSON structured log instead

Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/54102
2019-07-10 19:26:47 +00:00
Andrew Newdigate 3288e1a874 Adds the Rubocop ReturnNil cop
This style change enforces `return if ...` instead of
`return nil if ...` to save maintainers a few minor review points
2019-03-06 17:51:56 +02:00
Heinrich Lee Yu 35b8f103a8
Prevent comments by email when issue is locked
This changes the permission check so it uses the policy on Noteable
instead of Project. This prevents bypassing of rules defined in
Noteable for locked discussions and confidential issues.

Also rechecks permissions when reply_to_discussion_id is provided since the
discussion_id may be from a different noteable.
2019-01-31 16:52:48 +01:00
Heinrich Lee Yu f54290de75 Remove caching of CSV file
Load whole file in memory to simplify code
2019-01-07 11:21:30 +08:00
Heinrich Lee Yu 63e9969ca3 Refactor upload service to return uploader
Also changes old calls to the service
2019-01-07 11:16:58 +08:00
Brett Walker 4a0801b9c0 Fix already initialized constant constant warning 2019-01-03 14:37:35 -06:00
Brett Walker 496c6165d1 Move constant definition 2019-01-03 14:37:35 -06:00
Brett Walker a4f2de7964 Refactoring and review comments
including verifying the project_slug
2019-01-03 14:37:35 -06:00
Brett Walker 54eb6260e7 Address review feedback 2019-01-03 14:37:35 -06:00
Brett Walker 2e51431403 Use new issue email address format
We now use `-issue` in order to support catch all email addresses
2019-01-03 14:37:35 -06:00
Brett Walker 34dd6196e3 Use new merge request email address format
We now use `-merge-request` instead of `+merge-request+`
in order to support catch all email addresses
2019-01-03 14:37:35 -06:00
Brett Walker 23d5f4c991 Use new unsubscribe link
We now use `-unsubscribe` instead of `+unsubscribe`
in order to support catch all email addresses
2019-01-03 14:37:35 -06:00
Rémy Coutable 32bf2667d2 Merge branch 'frozen-string-lib-gitlab-more' into 'master'
Enable even more frozen string in lib/gitlab

See merge request gitlab-org/gitlab-ce!22863
2018-11-09 17:26:46 +00:00
Bob Van Landuyt 6fbdc5ed52 Apply patches when creating MR via email
This allows users to add patches as attachments to merge request
created via email.

When an email to create a merge request is sent, all the attachments
ending in `.patch` will be applied to the branch specified in the
subject of the email. If the branch did not exist, it will be created
from the HEAD of the repository.

When the patches could not be applied, the error message will be
replied to the user.

The patches can have a maximum combined size of 2MB for now.
2018-11-07 16:27:55 +01:00
gfyoung 7e6f6e1603 Enable even more frozen string in lib/gitlab
Enables frozens string for the following:

* lib/gitlab/conflict/**/*.rb
* lib/gitlab/cross_project_access/**/*.rb
* lib/gitlab/cycle_analytics/**/*.rb
* lib/gitlab/data_builder/**/*.rb
* lib/gitlab/database/**/*.rb
* lib/gitlab/dependency_linker/**/*.rb
* lib/gitlab/diff/**/*.rb
* lib/gitlab/downtime_check/**/*.rb
* lib/gitlab/email/**/*.rb
* lib/gitlab/etag_caching/**/*.rb

Partially addresses gitlab-org/gitlab-ce#47424.
2018-11-06 22:47:32 -08:00
Yorick Peterse 2039c8280d
Disable existing offenses for the CodeReuse cops
This whitelists all existing offenses for the various CodeReuse cops, of
which most are triggered by the CodeReuse/ActiveRecord cop.
2018-09-11 17:32:00 +02:00
Sean McGivern b07ca92f2e Remove requires from email handlers 2018-09-03 10:33:48 +01:00
Sean McGivern 55465747aa Add frozen_string_literal: true to email handlers 2018-09-03 10:33:48 +01:00
Sean McGivern 74616ece28 Extract EE-specific lines from Gitlab::Email::Handler 2018-09-03 10:33:48 +01:00
Felipe Artur Cardozo 236ed1f2f3 Merge branch 'security-event-counters-private-data' into 'master'
[master] Don't expose project names in various counters

See merge request gitlab/gitlabhq!2418
2018-07-24 20:25:25 +00:00
Grzegorz Bizon dce9599ef5 Implement action mailer delivery metrics observer 2018-07-16 13:40:55 +02:00
Grzegorz Bizon e682d94180 Move existing email interceptors into the same module 2018-07-16 11:23:15 +02:00
Yorick Peterse 9e29408ee6
Don't expose project names in various counters
Various counters would expose either project names, or full project
paths (e.g. "gitlab-org/gitlab-ce"). This commit changes various places
where we use "add_event" so we no longer expose (potentially) private
information.
2018-06-21 16:56:40 +02:00
Cameron Crockett 421dbb1746 skip email trim when email is creating new issue
Updates from MR discussion

1. Added test for ReplyParser
2. Changed param to trim_reply with default set as true

Removed keyword param in favor of normal options param

updates for MR discussion

Resolutions for code review comments

more code review fixes
2018-05-22 23:05:51 -05:00
Mario de la Ossa 02741ca4c5
Backport 5480-epic-notifications from EE 2018-05-07 12:58:47 -06:00
Bob Van Landuyt 71ccfde322 Correct permissions for creating merge requests from issues
This could only be possible for users that can create merge requests
within a project.

So they need to be a allowed to create a branch and create a merge request.
2018-04-11 10:51:17 +02:00
Riccardo Padovani f68aab1945 Make email handler clearer 2018-04-09 09:39:03 +00:00
Takuya Noguchi 2b6307f6ad Enable RuboCop Style/RegexpLiteral 2018-02-01 02:06:07 +09:00
🙈 jacopo beschi 🙉 729f05f0e3 Adds Rubocop rule for line break around conditionals 2018-01-11 16:34:01 +00:00
Jan Provaznik b39b5524f2 Use message body for merge request description
When a merge request is created from email, use message body
as merge request description. If message body is empty then
merge request description is still created from the source
branch commit (if there is only single commit in the merge
request).

If message body is empty and there are multiple commits in
the source branch, then merge request description is left empty.

Closes #40968
2017-12-11 11:46:21 +01:00
Jan Provaznik 8cce70730c Create merge request from email
* new merge request can be created by sending an email to the specific
email address (similar to creating issues by email)
* for the first iteration, source branch must be specified in the mail
subject, other merge request parameters can not be set yet
* user should enable "Receive notifications about your own activity" in
user settings to receive a notification about created merge request

Part of #32878
2017-12-05 08:41:58 +01:00
Jacopo 181cd299f9 Adds Rubocop rule for line break after guard clause
Adds a rubocop rule (with autocorrect) to ensure line break after guard clauses.
2017-11-16 17:58:29 +01:00
Lin Jen-Shin 86e1f41b83 Check against "Auto-Submitted: no" instead
This would be much more accurate. We assume this is an
auto-generated email if such header is provided, and
the value is not "no". It could also be: "auto-generated",
"auto-replied", or other values from extension. It seems
that only "no" could mean that this is sent by a human.

See: https://tools.ietf.org/html/rfc3834
2017-08-03 19:29:18 +08:00
Lin Jen-Shin f097e4dbcd Don't send rejection mails for all auto-generated mails
Also make it easier to have mailer helper
2017-08-03 00:40:10 +08:00
Gabriel Mazetto abb878326c Rename many path_with_namespace -> full_path 2017-08-01 07:26:58 +02:00