Refactor merge requests documentation
## What does this MR do?
Add more information on merge requests.
## Moving docs to a new location?
See the guidelines: http://docs.gitlab.com/ce/development/doc_styleguide.html#changing-document-location
- [x] Make sure the old link is not removed and has its contents replaced with a link to the new location.
- [x] Make sure internal links pointing to the document in question are not broken.
- [x] Search and replace any links referring to old docs in GitLab Rails app, specifically under the `app/views/` directory.
- [x] If working on CE, submit an MR to EE with the changes as well.
---
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/21857
See merge request !6202
Remove gitorious
## What does this MR do?
Remove gitorious as import source
## Are there points in the code the reviewer needs to double check?
Did I remove everything?
## Why was this MR needed?
This button yielded a 404
## What are the relevant issue numbers?
Closes#17062
/cc @JobV
See merge request !5866
Update merge_requests.md with a simpler way to check out a merge request
## What does this MR do?
This MR updates `merge_requests.md` with a simpler way to check out a merge request
The previous way was put under the "By modifying `.git/config` for a given repository" section. The disadvantage of the old way is that one has to modify `.git/config` for each repository that one uses. The new way was put under the "By adding a git alias" section. One has to create this git alias once, and then it will work from any repository, without having to modify `.git/config` over and over again.
## Are there points in the code the reviewer needs to double check?
One should double check that the link provided by the "Check out branch" button in a MR, i.e. https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/workflow/merge_requests.md#checkout-merge-requests-locally, still works. I think it will, since I didn't modify the "Checkout merge requests locally" section name.
## Why was this MR needed?
This MR was needed because the old way of checking out a merge request locally requires to modify `.git/config` in all repositories that one has on a computer, which is a tedious task. The new way just requires adding a simple git alias, once. And the `git mr` command then works for all repositories.
## What are the relevant issue numbers?
I haven't created an issue for this.
## Screenshots (if relevant)
N/A
## Does this MR meet the acceptance criteria?
- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added (N/A)
- Tests
- [ ] Added for this feature/bug (N/A)
- [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 !5944
Now the alias should be used as:
git mr upstream 5
To check out a MR number 5 from the upstream remote, into a `mr-upstream-5`
local branch.
Also clarify that the `5` in the merge request is the number shown in GitLab.
The previous way was put under the
"By modifying `.git/config` for a given repository" section. The
disadvantage is that one has to modify `.git/config` for each repository
that one uses. The new way was put under the "By adding a git alias"
section. One has to create this git alias once, and then it will work
from any repository, without having to modify `.git/config` over and
over again.
Send notification emails when users are newly mentioned in issue or MR edits
## What does this MR do?
Introduces "new mention in issue" and "new mention in MR" email notifications. Editing a Mentionable title or description and adding a mention to a user who was not previously mentioned will now send them a notification email, following usual permissions for doing so.
## Why was this MR needed?
Issues & MRs may be edited to include mentions to new people. We don't currently send out email notifications of these edits to anyone, although they do create TODOs. This brings email notifications into parity with TODOs.
## What are the relevant issue numbers?
Closes#2451
See merge request !5800
This slightly changes the semantics of the 'New Issue' and 'New MR' events to
include new mentions in edited Mentionables.
An alternative would be to introduce 'Issue updated' and 'MR updated' events,
but that would lead to questions about why those events were only available
to new mentions, and not existing mentions as well, so hold off for now.
Other improvements:
- Ensure slash commands autocomplete doesn't break when noteable_type is not given
- Slash commands: improve autocomplete behavior and /due command
- We don't display slash commands for note edit forms.
- Add tests for reply by email with slash commands
- Be sure to execute slash commands after the note creation in Notes::CreateService
Signed-off-by: Rémy Coutable <remy@rymai.me>
- Return only slash commands that make sense for the current noteable
- Allow slash commands decription to be dynamic
Other improvements:
- Add permission checks in slash commands definition
- Use IssuesFinder and MergeRequestsFinder
- Use next if instead of a unless block, and use splat operator instead of flatten
Signed-off-by: Rémy Coutable <remy@rymai.me>
Some important things to note:
- commands are removed from noteable.description / note.note
- commands are translated to params so that they are treated as normal
params in noteable Creation services
- the logic is not in the models but in the Creation services, which is
the right place for advanced logic that has nothing to do with what
models should be responsible of!
- UI/JS needs to be updated to handle notes which consist of commands
only
- the `/merge` command is not handled yet
Other improvements:
- Don't process commands in commit notes and display a flash is note is only commands
- Add autocomplete for slash commands
- Add description and params to slash command DSL methods
- Ensure replying by email with a commands-only note works
- Use :subscription_event instead of calling noteable.subscribe
- Support :todo_event in IssuableBaseService
Signed-off-by: Rémy Coutable <remy@rymai.me>
Convert shortcuts image into markdown
## What does this MR do?
Recreates shortcuts page into markdown
## Are there points in the code the reviewer needs to double check?
Double check all the shortcuts are correct
## Why was this MR needed?
Improve maintainability of this page
## What are the relevant issue numbers?
Closes#20160
See merge request !5452