This commit builds on the groundwork in
ee008e300b1ec0abcc90e6a30816ec0754cea0dd, which refactored the backend
so the same code could be used for new dropdowns. In this commit its
used for templates for the `.gitlab-ci.yml` files.
Add borders to images in issues, MRs, and Help.
## What does this MR do?
Adds a gray border around images in Issues, MRs, and Help pages.
## Are there points in the code the reviewer needs to double check?
That this doesn't effect other elements or pages that it shouldn't.
## Why was this MR needed?
It was hard to differentiate between the actual interface and screenshots of it.
## What are the relevant issue numbers?
Fixes#18578
## Screenshots (if relevant)
### Issues/MRs
Before:

After:


### Help
Before:

After:

## Does this MR meet the acceptance criteria?
- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [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)
cc: @jschatz1
See merge request !4655
Hides award emoji & access level on system notes
## What does this MR do?
Hides award emoji & access level on system notes as they aren't applicable to them notes.
## Screenshots (if relevant)

See merge request !4629
Refs dropdown is now loaded async
## What does this MR do?
The refs dropdown is loaded async so not to block the page.
## What are the relevant issue numbers?
Part of #18202
## Screenshots (if relevant)

See merge request !4508
Document access request to project & group
## What does this MR do?
Adds documentation that was missing from !3798.
## Are there points in the code the reviewer needs to double check?
I've taken the opportunity to update the images in the "Project users" documentation page, I can remove the commit if it's not welcome!
## What are the relevant issue numbers?
Closes#18584.
## Does this MR meet the acceptance criteria?
- [ ] Tests
- [ ] 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)
/cc @DouweM
See merge request !4685
Fallback to group's owners/masters when a project has none for the "access requested email"
## What does this MR do?
From b31c5052f9:
Fallback to group's owners/masters when a project has none
A project in a group can have no explicit owners/masters,
in that case we fallbacks to the group's owners/masters.
## Are there points in the code the reviewer needs to double check?
No.
## Why was this MR needed?
Because of #18757.
## What are the relevant issue numbers?
Fixes#18757.
## Does this MR meet the acceptance criteria?
- [x] No need for CHANGELOG.
- [x] No need for documentation.
- [x] No API support added.
- [x] Tests
- [x] Added for this feature/bug
- [x] 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 !4791
POC: Markdown shortcut buttons
## What does this MR do?
Adds markdown shortcut buttons to text area for comments.
## Are there points in the code the reviewer needs to double check?
Because changing `textarea.val('something')` kills the natural browser undo stack, I had to implement a custom undo stack using state. You can't use the "undoable" state undo pattern because you need to go back to a previous state regardless of cursor position. The undo also adds an undo history item once you delete stuff or press enter.
You can also edit multiple textareas at once and it will keep an undo history for each textarea individually, so the undo state should not collide between textareas.
## Why was this MR needed?
It has been requested multiple times and the competition has it. https://gitlab.com/gitlab-org/gitlab-ce/issues/17185#note_12073433
Libraries are available that already implement this functionality but they are enormous and bloaty. I implemented this in very few lines of code and kept it very simple and as minimal as possible. This was also some competitions approach. I believe so as to not include too much JS.
Adding extra buttons with new functionality **should only need new HTML and no new JS**.
Only extra complex thing was adding a overridden undo stack, which was made as simple as possible as well.
## What are the relevant issue numbers?
https://gitlab.com/gitlab-org/gitlab-ce/issues/17185#note_12073433
## Screenshots (if relevant)
**NOTE:** One thing you cannot see in this screenshot is that I am pressing <kbd>Cmd</kbd><kbd>Z</kbd> to undo and <kbd>Cmd</kbd><kbd>Shift</kbd><kbd>Z</kbd> to redo which is the undo/redo stack I implemented. <kbd>Ctrl</kbd><kbd>Y</kbd> also works for redo.

cc @dzaporozhets for UI
cc @iamphill @alfredo1 for JS review
cc @JobV if you like the idea.
Fixes: #17185
See merge request !4305
Set missing stages on ci builds to 'test' to avoid regressions in the pipelines view
## What does this MR do?
Sets a default stage on old `ci_builds`.
## Are there points in the code the reviewer needs to double check?
Is the migration acceptable for online execution?
## Why was this MR needed?
Old `ci_builds`with no stages cause a regression on the pipelines index view.
## What are the relevant issue numbers?
#17949
Blocked by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4680
See merge request !4381
Fixed placement of close button on merge requests
## What does this MR do?
Fixes the order in which the MR buttons appear
## Screenshots (if relevant)


See merge request !4778
Fix double query string in url
This MR should fix the double query string in url that shows up while using the "filter by name .." input on projects list pages and also closes [17743](https://gitlab.com/gitlab-org/gitlab-ce/issues/17743)
Closes#17743
See merge request !4480
Set path for pinned nav cookie
## What does this MR do?
Sets a path for the pinned nav cookie so it will be present across page reload.
Closes#18836
See merge request !4784
Document environments and deployments
## What does this MR do?
Adds an introduction to environments and deployments and tweaks the `environments` entry in `.gitlab-ci.yml` documentation.
## Are there points in the code the reviewer needs to double check?
## Why was this MR needed?
## What are the relevant issue numbers?
Closes#18683.
## Screenshots (if relevant)


/cc @ayufan @axil
See merge request !4725
Avoid autoload issue such as 'Mail::Parsers::AddressStruct'
This is mostly a shot in the dark but at least it shouldn't break anything.
Fixes#18810.
See merge request !4793
Grammar tweaks
## What does this MR do?
* Updates grammar in recent CI documentation.
## Are there points in the code the reviewer needs to double check?
## Why was this MR needed?
Because grammar.
## What are the relevant issue numbers?
Needed because of !4200 and !4201.
## Screenshots (if relevant)
See merge request !4772
A project in a group can have no explicit owners/masters,
in that case we fallbacks to the group's owners/masters.
Signed-off-by: Rémy Coutable <remy@rymai.me>
Fix RangeError exceptions when referring to issues or merge requests outside of max database values
When using #XYZ in Markdown text, if XYZ exceeds the maximum value of a signed 32-bit integer, we get an exception when the Markdown render attempts to run `where(iids: XYZ)`. Introduce a method that will throw out out-of-bounds values.
Closes#18777
See merge request !4777
When using #XYZ in Markdown text, if XYZ exceeds the maximum value of a signed 32-bit integer, we
get an exception when the Markdown render attempts to run `where(iids: XYZ)`. Introduce a method
that will throw out out-of-bounds values.
Closes#18777
Display Star and Fork on mobile, fix#18537.
## What does this MR do?
Displays the Star and Fork buttons on mobile devices.
## Are there points in the code the reviewer needs to double check?
Nope.
## Why was this MR needed?
I wanted to star and/or fork projects while on my phone, I couldn't do that before.
## What are the relevant issue numbers?
#18537
## Screenshots (if relevant)

cc: @jschatz1
See merge request !4714
Add merge request data to the progress information on Milestones pages.
## What does this MR do?
Adds data about merge requests to the Milestone show view. It previously only showed something like `3 issues: 2 open and 1 closed 20% complete`, now it shows `3 issues: 2 open and 1 closed 2 merge requests: 2 open and 0 merged 20% complete`.
## Are there points in the code the reviewer needs to double check?
I don't think so.
## Why was this MR needed?
The milestone progress % didn't accurately reflect the open/merged MRs.
## What are the relevant issue numbers?
Fixes#13980
## Screenshots (if relevant)
Before:

After:

## Does this MR meet the acceptance criteria?
- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [x] 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)
cc: @jschatz1
See merge request !4719