| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
There was a race condition issue when the application was generating an
email and was using a language that was previously being used in other
request.
|
| |
|
| |
|
|
|
|
|
|
| |
- Ignore JS fixtures
- Ignore qa directory
- Rewrite concern specs to put concern name first
|
|\ |
|
| |
| |
| |
| |
| | |
Visit `/rails/mailers/notify` on your local running GitLab instance to
show a preview pipeline success emails.
|
| | |
|
| | |
|
| | |
|
| | |
|
|/ |
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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`.
|
| |
|
|
|
|
|
|
|
| |
This solves transient failures when a text contains HTML-escapable
characters such as `'`.
Signed-off-by: Rémy Coutable <remy@rymai.me>
|
| |
|
|\
| |
| |
| |
| |
| |
| | |
Add setting to enable/disable HTML emails
Closes #24880
See merge request !7749
|
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
* 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
|
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
|
|
| |
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).
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
required
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
'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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|\ \
| |/
|/|
| |
| |
| |
| | |
New `Members::RequestAccessService`
Part of #21979.
See merge request !6265
|
| |
| |
| |
| | |
Signed-off-by: Rémy Coutable <remy@rymai.me>
|