Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-04-06Merge branch 'update-droplab-to-webpack-version' into new-resolvable-discussionLuke "Jared" Bennett
2017-04-06Make it possible to preview pipeline success/failed emailsToon Claes
Visit `/rails/mailers/notify` on your local running GitLab instance to show a preview pipeline success emails.
2017-04-05Remove unused codeDouwe Maan
2017-04-05Address review commentsDouwe Maan
2017-04-05Fix specsDouwe Maan
2017-04-05Add specsDouwe Maan
2017-04-05Better notification emails for notes and (diff) discussionsDouwe Maan
2017-04-03Don't use FFaker in factories, use sequences insteadRémy Coutable
FFaker can generate data that randomly break our test suite. This simplifies our factories and use sequences which are more predictive. Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-03-28Use `:empty_project` where possible in mailer specsRobert Speicher
2017-03-22Combine redundant `it` blocks in Notify specRobert Speicher
We perform a bunch of setup for most of these cases, and it didn't make sense to do an entirely new costly setup just to test a different string in the same body of the email we just generated in the last test.
2017-03-21Move the `a new user email` shared example to the Emails::Profile specRobert Speicher
This shared example was only used by this spec so having it in a separate file provided no benefit, at the cost of clarity. This also reduces the three `it` blocks into a single test with `aggregate_failures`.
2017-03-18All CI offline migrationsKamil Trzciński
2017-03-17Add a new have_html_escaped_body_text that match an HTML-escaped textRémy Coutable
This solves transient failures when a text contains HTML-escapable characters such as `'`. Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-03-14Fix intermittent spec failures in notify_spec.rbNick Thomas
2016-11-29Merge branch '24880-configurable-plaintext-emails' into 'master' Sean McGivern
Add setting to enable/disable HTML emails Closes #24880 See merge request !7749
2016-11-29Add new configuration setting to enable/disable HTML emails.Ruben Davila
This new global setting will allow admins to specify if HTML emails should be sent or not, this is basically useful when system administrators want to save some disk space by avoiding emails in HTML format and using only the Plain Text version.
2016-11-28Fix spec styleSean McGivern
2016-11-28Tidy up text emailsSean McGivern
2016-11-25Clean up rubocop complainthhoopes
2016-11-25Add keyword arguments to truncated_diff methodhhoopes
* Added keyword arguments to truncated_diff_lines method to allow for using highlighting or not (html templates vs. text) * Tweaked templates for consistency and format appropriateness
2016-11-25Change diff highlight/truncate for reusabilityhhoopes
Previously the `truncated_diff_lines` method for outputting a discussion diff took in already highlighted lines, which meant it wasn't reuseable for truncating ANY lines. In the way it was used, it also meant that for any email truncation, the whole diff was being highlighted before being truncated, meaning wasted time highlighting lines that wouldn't even be used (granted, they were being memoized, so perhaps this wasn't that great of an issue). I refactored truncation away from highlighting, in order to truncate formatted diffs for text templates in email, using `>`s to designate each line, but otherwise retaining the parsing already done to create `diff_lines`. Additionally, while notes on merge requests or commits had already been tested, there was no existing test for notes on a diff on an MR or commit. Added mailer tests for such, and a unit test for truncating diff lines.
2016-11-25Add new template to handle both commit & mr noteshhoopes
Currently comments on commits and merge requests do not require merge request- or commit-specific information, but can use the same template. Rather than change the method which calls the template, I opted to keep the templates separate and create a new template to highlight their identicality, while preserving the option to distinguish them from each other in the future. Also removed some of the inconsistencies between text and html email versions. Still needed is a text-only version of git diffs and testing.
2016-11-25Add diff hunks to notification emails on MRhhoopes
Added diff hunks to notification emails of messages on merge requests. This provides code context to the note. Uses existing template for formatting a diff for email (from repository push notifications).
2016-11-18Use `Gitlab.config.gitlab.host` over `'localhost'`Lin Jen-Shin
This would fix long standing failures running tests on my development machine, which set `Gitlab.config.gitlab.host` to another host because it's not my local computer. Now I finally cannot withstand it and decided to fix them once and for all.
2016-11-11Make access request specs explicitly enable or disable access requests as ↵Nick Thomas
required
2016-10-23Move spec/mailers/shared/notify.rb to spec/supportJared Ready
2016-10-11refactors tests because of gitlab-test repository changestiagonbotelho
2016-10-03override subject method in devise mailerFu Xu
2016-10-03follow the styleguide: Don't use parentheses around a literalFu Xu
2016-10-03move spec back into shared example `an email sent from GitLab`Fu Xu
2016-10-03stub config settings in specFu Xu
2016-10-03remove empty line at block body endFu Xu
2016-10-03create new test in `spec/mailers/notify_spec.rb`Fu Xu
2016-10-03add configurable email subject suffixFu Xu
2016-10-02Merge branch ↵Robert Speicher
'21983-member-add_user-doesn-t-detect-existing-members-that-have-requested-access' into 'master' Resolve "`Member.add_user`doesn't detect existing members that have requested access" ## What does this MR do? This merge request handle the case when an access requester is added to a group or project (via the members page or the API). In `Member.add_user`, if an access requester already exists, we simply accept their request (and set the `created_by`, `access_level` and `expires_at` attributes if given). ## Are there points in the code the reviewer needs to double check? I've taken the opportunity to cleanup the whole `{Group,Project}Member.add_user*` methods since it was quite a mess. ## What are the relevant issue numbers? Closes #21983 See merge request !6393
2016-10-02Merge branch 'rc-new-members-request-access-service' into 'master' Robert Speicher
New `Members::RequestAccessService` Part of #21979. See merge request !6265
2016-09-28Allow Member.add_user to handle access requestersRémy Coutable
Changes include: - Ensure Member.add_user is not called directly when not necessary - New GroupMember.add_users_to_group to have the same abstraction level as for Project - Refactor Member.add_user to take a source instead of an array of members - Fix Rubocop offenses - Always use Project#add_user instead of project.team.add_user - Factorize users addition as members in Member.add_users_to_source - Make access_level a keyword argument in GroupMember.add_users_to_group and ProjectMember.add_users_to_projects - Destroy any requester before adding them as a member - Improve the way we handle access requesters in Member.add_user Instead of removing the requester and creating a new member, we now simply accepts their access request. This way, they will receive a "access request granted" email. - Fix error that was previously silently ignored - Stop raising when access level is invalid in Member, let Rails validation do their work Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-09-26Wrap List-Unsubscribe link in angle bracketsSean McGivern
2016-09-22Fix specs that requires an access requestRémy Coutable
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-09-20Fix "Unsubscribe" link in notification emails that is triggered by anti-virusMaximiliano Perez Coto
* Created a force=true param that will continue with the previous behaviour of the unsubscribe method * Created a filter for not-logged users so they see a unsubsribe confirmation page * Added the List-Unsubscribe header on emails so the email client can display it on top
2016-08-19Merge branch 'master' into 'expiration-date-on-memberships'Sean McGivern
# Conflicts: # db/schema.rb
2016-08-18Merge branch 'master' into expiration-date-on-membershipsSean McGivern
2016-08-13Merge branch 'master' into diff-line-comment-vuejsDouwe Maan
2016-08-13Add specs for system note and email when all discussions are resolvedDouwe Maan
2016-08-09adds second batch of tests changed to active tensetiagonbotelho
2016-08-03Introduce Compare model in the codebase.Paco Guzman
This object will manage Gitlab::Git::Compare instances
2016-08-02Replace optional parameters with keyword arguments.Adam Niedzielski
2016-07-22Make Notify specs more robust by setting up assignee namesRémy Coutable
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-07-07Represent DiffRefs as proper class instead of tuple arrayDouwe Maan
2016-07-02Merge branch 'explicit-requesters-scope' into 'master' Douwe Maan
Exclude requesters from Project#members, Group#members and User#members ## What does this MR do? It excludes requesters from the `Project#members`, `Group#members` and `User#members` associations, and adds new `Project#requesters` and `Group#requesters` associations. ## Are there points in the code the reviewer needs to double check? No. ## Why was this MR needed? Without this, if you call `project.members`, requesters are included in the results! This is at best misleading, and at worst can lead to security issues. By excluding requesters from the `#members` associations, we avoid introducing security inadvertently since you have to call the `#requesters` association explicitly to get requesters. ## What are the relevant issue numbers? This is something I realized while fixing the security issue #19102. ## Does this MR meet the acceptance criteria? - [x] I don't think this needs a CHANGELOG since this is an internal change - Tests - [x] Added for this feature/bug - [ ] All builds are passing - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if you do - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !4946