Backported minimal safewebhook implementation to GitLab CE
This brings a minimal implementation for gitlab-org/gitlab-ce#13478
backported from EE (gitlab-org/gitlab-ee!334).
Also added UI to configure Secret Token
Fixes#15365.
See merge request !3940
This changes 4 things:
1. Project#protected_branches_names has been renamed to
Project#protected_branch_names.
2. Project#open_branches uses a Set for the branch names as checking
values in a Set is faster than checking values in a (large) Array.
3. Some redundant code in Project#open_branches has been removed.
4. Project#protected_branch_names now uses #pluck instead of #map,
removing the need for loading entire DB records into memory.
This changes Project#protected_branch? to use a query to check if a
branch is protected, instead of loading all ProtectedBranch records into
memory just to check if the list of names includes a given branch name.
Move modal css to separate file and fix danger text for confirmation modal
* in help file I found css for modal that affect whole application -> moved to separate file
* fixed ugly confirmation message when remove project
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
See merge request !3979
Removes duplicates from the label dropdown
It concats the duplicate labels into a single label in the dropdown with the color being a gradient of the differnet colors being concatted.
I liked your idea @jschatz1 of using a standard icon color. However, with this i've taken all the duplicated colors & made a little gradient with them so it still half resembles the label colors (this has been limited to 4 or it could get crazy!)

Closes#16555, #14820
See merge request !3963
Updated spacing between notification label and button

Closes#16552
See merge request !3965
It concats the duplicate labels into a single label in the dropdown with
the color being a gradient of the differnet colors being concatted.
Closes#16555
Support supressing text file diffs on the default branch with .gitattributes
This change allows users to suppress diffs for text files by adding an entry to the `.gitattributes` file. To take effect the file present at the HEAD of the default branch.
When rendering a diff, if the file is text according to the charlock holmes gem (via the `text?` method) but the file is not diffable according to the project repository, then a message is displayed stating that the diff was suppressed.

I looked into ways to do this using a `binary` flag as suggested by @stanhu in [this comment](https://gitlab.com/gitlab-org/gitlab-ce/issues/2315#note_4435454), however, there was no good way to seperate what was a real binary file from one that had been marked as not diffable in `.gitattributes`.
Fixes and closes gitlab-org/gitlab-ce#2315.
See merge request !3806
This is a combination of 3 commits.
- Update the bare repositories info/attributes if the default branch is updated
- Check the diff attributes of a file before showing a diff
- Update CHANGELOG
make some changes for the checks to determine when the messages should be displayed
add item to changelog and also integration test
make some changes to the test
make some changes
Load the "New Branch" button asynchronously
Here's how it looks like for logged in users:

And here it is for anonymous users (or when a new branch can't be created by a logged in user):

See merge request !3855
This button depends on Issue#can_be_worked_on? which in turn depends on
Issue#related_branches. By rendering this button asynchronously we can
finally remove all usages of Issue#related_branches and
Issue#referenced_merge_requests from the issues "show" page.
Project group UI
Closes#13991

See merge request !3911
Build status `canceled` if any of the jobs canceled
Before this change in case of any of the jobs had been canceled, build status was `failed`.
Closes#14207
See merge request !3778
Add JS prefix to user tab classes
## What does this MR do
This MR adds the `js-` prefix to the classes which are used for js purposes only. This MR only affects the said classes inside `users/show.html.haml`.
## Are there points in the code the reviewer needs to double check?
I'm not entirely sure if this project uses the `js-` prefix for
classes that are used for js purposes only. Doing a grep shows some of the classes have the prefix, but I'm still unsure whether this project follows this rule.
## Why was this MR needed?
As I was working thru #13401, I wanted to add a tab on the user profile page to show the contributions outside the GitLab instance. Reading the JS, I came across this. This MR helps new people reading the code that the said classes are for js purposes only. Also, it helps the project work toward to uniform class naming.
I suggest that we document adding the `js-` prefix to classes for js purposes only (if this is the case for this project)
See merge request !3928