This solves https://dev.gitlab.org/gitlab/gitlabhq/issues/2646
1. This MR simplifies CI permission model:
- read_build: allows to read a list of builds, artifacts and trace
- update_build: allows to cancel and retry builds
- admin_build: allows to manage triggers, runners and variables
- read_commit_status: allows to read a list of commit statuses (including the status of a build, but doesn't allow to see a build details)
- create_commit_status: allows to create a new commit status using API
2. I do make sure that the proper permissions are used in all places where the CI can be shown.
3. Add the `read_build` ability if user is anonymous or guest and allow_guest_to_access_builds is enabled.
4. Add CI setting: public_builds.
5. The artifacts specific permission are removed, since they are covered by `*_build`.
Allow manual resize of js-autosize textareas
First, the autosize library was being too controlling and removed the
`resize` property from any elements to which it was attached, removing
the drag handle. We've disabled this behavior in the vendored library
and added a spec to prevent a regression during an upgrade.
Second, we detect (as best we can) when the user manually resizes an
autosize textarea, and then remove the autosize behavior from it and
increase its max-height.
This should allow for the best of both worlds.
Closes#12832
See merge request !2653
Highlight note code and edit preview
More highlighting fixes! Highlighting wasn't applied all the way for
code in notes, diff notes diffs and diff preview (on the file edit page).
The CSS changes further unify the styling for file-content highlighting,
diff highlighting and note code highlighting.
See merge request !2594
Make deleted line background color for Solarized Dark a little darker
The difference is very slight, and I don't even _use_ Solarized Dark, but this annoyed me.
See merge request !2563
Creator should be added as a master of the project on creation
Fixes#4222
This also enable a project creator to add themselves as a master of the
project for existing repositories that were created in the meanwhile
that they don't appear as members.
See merge request !2520
Add sentry integration
Sentry is an event logging platform primarily focused on capturing and
aggregating exceptions. With this MR it will be possible to log and
track exceptions from GitLab to Sentry.
https://gitlab.com/gitlab-com/operations/issues/39
See merge request !2485
Fixes tooltip doesn't duplicate the "me" name.
Checks that "me" is not in the array of names in tooltip

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/7978
See merge request !2454
Added X-GitLab-... headers to emails from CI and Email On Push services
Fixes#2098
This adds the 'X-GitLab-Project', 'X-GitLab-Project-Id' and
'X-GitLab-Project-Path' headers to emails from CI and Email On Push in a way
that it is done currently for merge requests and issues emails.
Additionally, CI emails will have 'X-GitLab-Build-Status' header with either
'fail' or 'success'.
Emails from Email On Push will include 'X-Gitlab-Author' header containing the
username of user who did the push.
See merge request !2159
Starring project only increases star count
This is instead of increasing star & fork count
Fixes#11396

cc. @jschatz1
See merge request !2504
Fix double request issue in artifacts browser
This fixed problem with double propagation when clicking a link that lies inside tr with clicked event attached.
See merge request !2496
Greatly improve external_issue_tracker performance
See 3d41133d48f6522b8755bb91b804864e8e520871 for all the details. As an aside, this commit contains a set of migrations that will introduce downtime as they add a column with a default value which in turn locks the entire table (at least on PostgreSQL).
See merge request !2498
Fix positioning issues with browse files button
Issue is that in Firefox clipboard is blocking the browse files
from moving all the way to the right.
Move clipboard up 1px into -1px to unblock "browse files"
SS from firefox:

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/10849
See merge request !2489
Reduce margin to fit dropdowns

Fixes#10747
See merge request !2492
Improve UX in build artifacts browser
This improves UX in build artifacts browser, and makes it more consistent with repository tree browser we already have.
---
Before:

---
After:

---
It is easier to click on a file/directory entry now, because we don't need to click on a entry's basename (that can be really short, like `..` parent directory). We also show `Compressed to` size that indicates how much storage does this entry really consume.
Row for an entry is also highlighted on hover and we do not have Download button (clicking on a file row / file basename is enough to download a file).
Closes#10242
See merge request !2477
Fixes issue where firefox does not delete message after comment submit
Issue was **not** in the way comment was being submitted.
`app/assets/javascripts/awards_handler.coffee` was throwing an error.
This error was preventing any js from running after it.
Fixes#1473
See merge request !2452
Issue page keeps jumping up
This happens when the discussion side is smaller than the sidebar and the sidebar will need to scroll. When this happens I calculate the height of the two and see if the discussion panel is smaller and make them the same height and add a class `no-affix` which makes the sidebar relative positioning so it won't stick to the top.
See merge request !2417
Fix alignment issues after a fix on titles weight
Fixes#8102. Fixes#3956. This fixes an alignment regression introduced by !2422. Sorry about that! :/
## Commit title alignment fixed

**The fact that the first row has a smaller height than the other rows was not introduced by !2422 (I've checked by reverting 818607f0 on `master`).**
## Tags name in list

See merge request !2431
Let the CI runner know about builds that this build depends on
This allows us to implement artifacts passing: runner will download artifacts from all prior builds. It will happen automatically, and always, as long as artifacts are enabled.
## The changes:
This MR exposes list of prior builds in CI::API::Builds.
**The API response when asking for builds**
```json
{
"id": 48584,
"ref": "0.1.1",
"tag": true,
"sha": "d63117656af6ff57d99e50cc270f854691f335ad",
"status": "success",
"name": "pages",
"token": "9dd60b4f1a439d1765357446c1084c",
"stage": "test",
"project_id": 479,
"project_name": "test",
"commands": "echo commands",
"repo_url": "http://gitlab-ci-token:token@gitlab.example/group/test.git",
"before_sha": "0000000000000000000000000000000000000000",
"allow_git_fetch": false,
"options": {
"image": "docker:image",
"artifacts": {
"paths": [
"public"
]
},
"cache": {
"paths": [
"vendor"
]
}
},
"timeout": 3600,
"variables": [
{
"key": "CI_BUILD_TAG",
"value": "0.1.1",
"public": true
}
],
"dependencies": {
"builds": [
{
"id": 48584,
"ref": "0.1.1",
"tag": true,
"sha": "d63117656af6ff57d99e50cc270f854691f335ad",
"status": "success",
"name": "build",
"token": "9dd60b4f1a439d1765357446c1084c",
"stage": "build",
"project_id": 479,
"project_name": "test",
"artifacts_file": {
"filename": "artifacts.zip",
"size": 0
}
}
]
}
}
```
## How it will work?
**Example:**
```
build:
type: build
script:
- echo TEST > test_file
artifacts:
untracked: true
rspec:
type: test
script:
- test-my-project
staging:
type: deploy
script:
- scp test_file root@server.com:
```
**The flow:**
1. We run `build`. The `build` creates a file `test_file`. This file gets archived and send us build artifacts.
2. We run `rspec`. The `rspec` downloads build artifacts from `build`. Uses the `test_file`.
3. We run `staging`. The `staging` downloads build artifacts from `build` and `rspec`, but since the `rspec` doesn't have build artifacts we skip that build. Deploys the `test_file`.
This partially implements the https://gitlab.com/gitlab-org/gitlab-ce/issues/3423.
In the next release we will introduce option to configure what artifacts are received.
/cc @grzesiek @DouweM @sytse @rspeicher
See merge request !2437
Allow access to artifacts for users with reporter role
This is originally introduced by @ajohnsn in this merge request: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/2259
I've added and refactored specs, original commit by @ajohnsn has been cherry picked here.
See merge request !2448