summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch '4142-show-inline-video' into 'master' Rémy Coutable2016-07-212-2/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for inline videos in issue, MR and notes (on issue, commit, MR, and MR diff) ## What does this MR do? It adds support for inline videos in issue, MR and notes (on issue, commit, MR, and MR diff). Most of the work was done by @hayesr in !3508 but a few improvements were still missing. ## Why was this MR needed? To be able to play uploaded videos in GitLab! ## What are the relevant issue numbers? Closes #4142. ## Screenshots ### Video players ![Screen_Shot_2016-07-19_at_18.44.09](/uploads/e85e531b455a41c3e66b26b356abaafd/Screen_Shot_2016-07-19_at_18.44.09.png) ----- ![Screen_Shot_2016-07-19_at_18.44.29](/uploads/05f52a812760210d1eae86a7f8fc48bc/Screen_Shot_2016-07-19_at_18.44.29.png) ----- ## 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) - Tests - [x] Test `VideoLinkFilter` - [x] Test in `spec/features/markdown_spec.rb` - [x] Improve `spec/uploaders/file_uploader_spec.rb` - [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 !5215
| * Get rid of `is_image` in FileUploaderRémy Coutable2016-07-192-2/+0
| | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | Merge branch 'migration-downtime-tags' into 'master' Robert Speicher2016-07-202-0/+130
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | Added checks for migration downtime This adds a set of checks that check/list which migrations require downtime (or not). It also comes with a CI task that fails should a migration not be tagged properly. Fixes #14545 See merge request !4911
| * | Added checks for migration downtimemigration-downtime-tagsYorick Peterse2016-07-202-0/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These new checks can be used to check if migrations require downtime or not (as tagged by their authors). In CI this compares the current branch with master so migrations added by merge requests are automatically verified. To check the migrations added since a Git reference simply run: bundle exec rake gitlab:db:downtime_check[GIT_REF]
* | | Ensure to_json methods take optional argumentSean McGivern2016-07-201-0/+24
| |/ |/|
* | Merge branch 'allow-deploy-key-to-download-public-projects' into 'master' Rémy Coutable2016-07-191-11/+61
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow to pull code with deploy key from public projects ## What does this MR do? With deploy keys you can download any public projects stored in GitLab. ## What are the relevant issue numbers? Fixes: https://gitlab.com/gitlab-org/gitlab-ce/issues/1217 ## Does this MR meet the acceptance criteria? - [ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [ ] API support added - Tests - [ ] Added for this feature/bug - [ ] All builds are passing - [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [ ] Branch has no merge conflicts with `master` (if you do - rebase it please) - [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !5316
| * | Allow to pull code with deploy key from public projectsallow-deploy-key-to-download-public-projectsKamil Trzcinski2016-07-191-11/+61
| |/
* | Merge branch 'fix/import-export-project-avatar' into 'master' Rémy Coutable2016-07-192-0/+52
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Project avatar import/export functionality Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/19851 Adds logic to export and import a project avatar - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - ~~[ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~ - 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 !5273
| * | fix specJames Lopez2016-07-191-1/+1
| | |
| * | squashed - added avatar saver/restorer and specsfix/import-export-project-avatarJames Lopez2016-07-192-0/+52
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | added spec for avatar saver avatar saver! added avatar restorer spec fix spec added avatar restorer class fix export service fix warnings, added changelog fix spec some refactoring based on feedback fixed a few issues after testing i/e avatar
* | Use value of `yaml_variables` and `when` from config_processor if undefinedKamil Trzcinski2016-07-191-1/+1
|/
* Squashed - fix encoding issuefix/import-export-encodingJames Lopez2016-07-193-11/+23
| | | | | | | | | | | | | | WIP - trying to replicate UTF-8 error fix spec fixing encoding issue and another spec, to do with MR diffs fix issue and spec failure Add changelog and bumped up I/E version fix spec based on feedback - omitted target project
* Merge branch '19820-safer-diffs' into 'master' Douwe Maan2016-07-181-0/+14
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Collapsed diffs lines/size don't accumulate to overflow diffs. ## What does this MR do? Reduce the number of lines that we highlight on big diffs to try to reduce the degradation introduced by !4990 as you can see on the issue description #19820 . We collapse any files after the diff is over the number of safe files (100), or over the safe lines (500) or over the safe number of bytes (5KB x 100 files). We still need to bump the gitlab_git and point this branch to the new gitlab_git version. ## What are the relevant issue numbers? Closes #19820 Closes #19885 ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - ~~[ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~ - ~~[ ] API support added~~ - 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 !5306
| * Collapsed diffs lines/size don't accumulate to overflow diffs.19820-safer-diffsPaco Guzman2016-07-181-0/+14
| |
* | Revert "Revert "Merge branch '18193-developers-can-merge' into 'master' ""Rémy Coutable2016-07-183-134/+204
| | | | | | | | | | | | | | | | This reverts commit 530f5158e297f3cde27f3566cfe13bad74ba3b50. See !4892. Signed-off-by: Rémy Coutable <remy@rymai.me>
* | Merge branch 'fix-lfs-ci-fetch' into 'master' Rémy Coutable2016-07-181-730/+0
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix LFS CI fetch ## What does this MR do? Fixes LFS fetching for CI objects that were kind of broken. ## Why was this MR needed? This also refactors LFS tests to be a blackbox tests instead of whitebox tests. Actually testing GrackAuth instead of LFSRouter. ## Related isssues Resolves: https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/issues/1199 - [ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [ ] API support added - Tests - [ ] Added for this feature/bug - [ ] All builds are passing - [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [ ] Branch has no merge conflicts with `master` (if you do - rebase it please) - [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !5270
| * | Refactor LFS specs to use requests instead of LfsRouterKamil Trzcinski2016-07-151-730/+0
| | |
* | | Fix spec to set import_url before attempting to create import_dataallow-blank-import-urlStan Hu2016-07-171-1/+1
| |/ |/|
* | Merge branch 'feature.rouge-20' into 'master' Robert Speicher2016-07-151-2/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upgrade to Rouge 2.0 ## What does this MR do? This MR is a refactor of the HTMLGitlab formatter. The original was copy-pasted from the legacy HTML formatter and adapted to suit our needs. In particular, this MR: * Strips dead code and unused options * Factors out the "wrapping" into the places that care about it - Bonzai and the view helpers * Uses the Rouge 2.0 `token_lines` method to split tokens into lines, removing the custom code we used to do the same * Uses the now-public `span` method instead of re-implementing it ourselves * Removes options to not split into lines - the places where this feature wasn't being used are now using the plain `Formatters::HTML` instead of this class See merge request !4691
| * | apparently this gets encoded now?http://jneen.net/2016-07-141-1/+1
| | |
| * | we no longer encode double-quoteshttp://jneen.net/2016-07-141-3/+3
| | |
* | | Merge branch 'fix/project-export-filename' into 'master' Douwe Maan2016-07-151-0/+21
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add project name and namespace to filename on project export Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/19848 Export filename now includes project and namespace path - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - 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 !5268
| * \ \ Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into ↵fix/project-export-filenameJames Lopez2016-07-152-0/+12
| |\ \ \ | | | | | | | | | | | | | | | fix/project-export-filename
| * | | | add project name and namespace to filename on project exportJames Lopez2016-07-151-0/+21
| | |/ / | |/| | | | | | | | | | added changelog
* | | | Merge branch 'fix/ee-to-ce-import'Douwe Maan2016-07-151-0/+1
|\ \ \ \ | |_|/ / |/| | |
| * | | fix EE => CE project import, and updated JSON specJames Lopez2016-07-141-0/+1
| |/ /
* | | Merge branch 'disable-statement-timeout' into 'master' Robert Speicher2016-07-151-0/+4
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Disable PostgreSQL statement timeout during migrations Long-running migrations may take more than the timeout allowed by the database. Disable the session's statement timeout to ensure migrations don't get killed prematurely. See merge request !5263
| * | | Fix spec Don't attempt to disable statement timeout on a MySQL DBdisable-statement-timeoutStan Hu2016-07-141-0/+4
| |/ /
* | | fix updated_at not preserved after import - for GitLab projectsJames Lopez2016-07-141-0/+8
|/ /
* | Revert "Merge branch '18193-developers-can-merge' into 'master' "Robert Speicher2016-07-133-204/+134
| | | | | | | | | | This reverts commit 9ca633eb4c62231e4ddff5466c723cf8e2bdb25d, reversing changes made to fb229bbf7970ba908962b837b270adf56f14098f.
* | Stub omniauth provider for GitLabgl-importer-keeps-issue-numberDouglas Barbosa Alexandre2016-07-131-1/+6
| |
* | Add spec for GitLab.com importerDouglas Barbosa Alexandre2016-07-131-0/+48
| |
* | Implement last round of review comments from !4892.18193-developers-can-mergeTimothy Andrew2016-07-131-21/+19
| | | | | | | | | | | | | | | | 1. Fix typos, minor styling errors. 2. Use single quotes rather than double quotes in `user_access_spec`. 3. Test formatting.
* | Appease rubocop.Timothy Andrew2016-07-131-1/+0
| |
* | Refactor `Gitlab::GitAccess`Timothy Andrew2016-07-132-82/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Don't use case statements for dispatch anymore. This leads to a lot of duplication, and makes the logic harder to follow. 2. Remove duplicated logic. - For example, the `can_push_to_branch?` exists, but we also have a different way of checking the same condition within `change_access_check`. - This kind of duplication is removed, and the `can_push_to_branch?` method is used in both places. 3. Move checks returning true/false to `UserAccess`. - All public methods in `GitAccess` now return an instance of `GitAccessStatus`. Previously, some methods would return true/false as well, which was confusing. - It makes sense for these kinds of checks to be at the level of a user, so the `UserAccess` class was repurposed for this. The prior `UserAccess.allowed?` classmethod is converted into an instance method. - All external uses of these checks have been migrated to use the `UserAccess` class 4. Move the "change_access_check" into a separate class. - Create the `GitAccess::ChangeAccessCheck` class to run these checks, which are quite substantial. - `ChangeAccessCheck` returns an instance of `GitAccessStatus` as well. 5. Break out the boolean logic in `ChangeAccessCheck` into `if/else` chains - this seems more readable. 6. I can understand that this might look like overkill for !4892, but I think this is a good opportunity to clean it up. - http://martinfowler.com/bliki/OpportunisticRefactoring.html
* | Enforce "developers can merge" during `pre-receive`.Timothy Andrew2016-07-132-72/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. When a merge request is being merged, save the merge commit SHA in the `in_progress_merge_commit_sha` database column. 2. The `pre-receive` hook looks for any locked (in progress) merge request with `in_progress_merge_commit_sha` matching the `newrev` it is passed. 3. If it finds a matching MR, the merge is legitimate. 4. Update `git_access_spec` to test the behaviour we added here. Also refactored this spec a bit to make it easier to add more contexts / conditions.
* | Added "developers can merge" setting to protected branchesMathias Vestergaard2016-07-131-0/+21
| | | | | | | | | | - Cherry-picked from `mvestergaard:branch-protection-dev-merge` - https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4220
* | Merge branch 'multi-line-inline-diff' into 'master' Douwe Maan2016-07-131-10/+18
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Render inline diffs for multiple changed lines following eachother Before: ![Screen_Shot_2016-07-11_at_00.08.27](/uploads/b14664211e0f5cef6e77a78eadfcbcdf/Screen_Shot_2016-07-11_at_00.08.27.png) After: ![Screen_Shot_2016-07-11_at_00.07.34](/uploads/567be631869a4867a2edf6ff7eda6369/Screen_Shot_2016-07-11_at_00.07.34.png) See merge request !5174
| * | Render inline diffs for multiple changed lines following eachotherDouwe Maan2016-07-111-10/+18
| | |
* | | Merge branch 'rs-describe-symbols' into 'master' Robert Speicher2016-07-125-6/+6
|\ \ \ | | | | | | | | | | | | | | | | Avoid `describe`-ing symbols in specs See merge request !5195
| * | | Avoid `describe`-ing symbols in specsrs-describe-symbolsRobert Speicher2016-07-125-6/+6
| | | |
* | | | Remove unnecessary context from GitHub client specDouglas Barbosa Alexandre2016-07-121-6/+4
| | | |
* | | | Fix GItHub client requests when rate limit is disabledDouglas Barbosa Alexandre2016-07-121-0/+9
|/ / /
* | | Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into ↵James Lopez2016-07-1149-172/+3184
|\ \ \ | | |/ | |/| | | | fix/import-event-error
| * | Merge branch 'fix/remove-import-url-migration' into 'master' Rémy Coutable2016-07-111-0/+6
| |\ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | Remove slow migration and add fix to sanitize errors Getting rid of the slow migration and preventing the Error to occur Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/19608 See merge request !5176
| | * spec and fix for sanitize methodJames Lopez2016-07-111-0/+6
| | |
| * | Merge branch '1548-average-commits-per-day' into 'master' Rémy Coutable2016-07-081-0/+39
| |\ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix: Infinity Bug in Commit Statistics ## What does this MR do? It fixes a logic bug in the commits statistics: The code assumed that the amount of days involved in a commit range is equal to the difference between the first and last date. This is not true, though, as (from a human standpoint), a commit yesterday and a commit today involve two days, not one. Similarly, a fresh project with only commits made today already 'used' one day. Since the number of involved days used to be zero for new projects, the result for commits per day quite often amounted to `Infinity`… ## Are there points in the code the reviewer needs to double check? The test file. I hope it is up to the standards of GitLab. ## Why was this MR needed? The bug occurres especially for new users with their first project while exploring GitLab. ## What are the relevant issue numbers? This bug was reported as #1548. ## Screenshots (if relevant) See merge request !4231
| | * Infinity Bug in Commit StatisticsJonas Weber2016-05-201-0/+39
| | | | | | | | | | | | fixes #1548
| * | Merge branch '18627-wildcard-branch-protection' into 'master' Douwe Maan2016-07-071-0/+70
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow specifying protected branches using wildcards Closes #18627 # Tasks - [ ] #18627 !4665 Allow specifying protected branches using wildcards - [x] Find existing usages of protected branches - Protecting branches - `ProtectedBranchesController` is used to mark a branch protected/unprotected - `API::Branches` can be used to mark a branch protected/unprotected - Enforcing branch protection - `Gitlab::GitAccess` has helpers (`can_push_to_branch?`, `check`) that are used to deny pushes if a branch is protected - Over SSH: `gitlab-shell` receives a push, and calls `/allowed` on the GitLab API, which calls `GitAccess.check` - Over HTTP: - `gitlab-workhorse` receives the request, and forwards it to rails - Rails (in the `GitHttpController#git-recieve-pack`) runs basic checks (is the user logged in, not protected branch checks) and returns ok with `GL_ID` and `RepoPath` - `gitlab-workhorse` looks at the response, and calls the relevant `gitlab-shell` action from `git-http/handlePostRPC` - Rest of this flow is the same as the SSH flow above - [x] Implementation - [x] Backend - [x] Change `project#protected_branch?` to look at wildcard protected branches - [x] Change `project#developers_can_push_to_protected_branch?` - [x] Change `project#open_branches` - [x] Better error message when creating a disallowed branch from the Web UI - [x] Frontend - [x] Protected branches page should allow typing out a wildcard pattern - [x] Add help text explaining the use of wildcards - [x] Show matching branches for each protected branch - [x] ~~On the index page~~ - [x] On a show page - [x] Index? - [x] Can't have the "last commit" column for wildcard protected branches - [x] Fix / write tests - [x] What happens if a hook is missing in dev? - [x] Refactor - [x] Test workflows - Create a branch matching a wildcard pattern - Push to a branch matching a wildcard pattern - Force push to a branch matching a wildcard pattern - Delete a branch matching a wildcard pattern - [x] Test using Web UI - [x] Test over SSH - [x] Test over HTTP - [x] Test as developer and master - [x] Investigate performance - [x] Test with a large number of protected branches / branches - [x] Paginate list of protected branches - [x] ~~Possibly rewrite `open_branches`~~ - [x] Add `iid`s to existing `ProtectedBranch`es - [x] Add documentation - [x] Add CHANGELOG entry - [x] Add screenshots - [x] Make sure [build](https://gitlab.com/gitlab-org/gitlab-ce/commit/2f753e3ed2ce681b4444944d521f4419e8ed37f7/builds) passes - [x] Assign to endboss for review - [x] Address @DouweM's comments - [x] `protected_branch_params` - [x] `exact_match` instead of `explicit_match` - [x] When would self.name be blank? - [x] Move `protected_branches.each` to a partial - [x] Move `matching_branches.each` to a partial - [x] If the branch is in @matching_branches, it's not been removed - [x] move this regex to a method and memoize it - [x] `commit_sha` directly for exact matches - [x] Number of matches for wildcard matches, with a link - [x] Wait for [build](https://gitlab.com/gitlab-org/gitlab-ce/commit/43f9ce0e88194b8f719bb1c1e656b7fc13278d56/builds) to pass - [x] Respond to @DouweM's comments - [x] Don't use iid - [x] Controller should use `@project.protected_branches.new` - [x] move the memoization to `def wildcard_regex` - [x] render with `collection: @protected_branches` - [x] Wait for [build](https://gitlab.com/gitlab-org/gitlab-ce/commit/f7beedf122fa0c7aa89e86181fe7499321fb10ca/builds) to pass - [x] Wait for @DouweM's review - [x] Wait for @jschatz1's review - [x] Respond to @jschatz1's comments - [x] Use the new dropdown style - [x] description should be moved to the description section without the styling - [x] Protect button should be disabled when no branch is selected - [x] Update screenshots - [x] Merge conflicts - [x] Make sure [build](https://gitlab.com/gitlab-org/gitlab-ce/commit/20f3cfe8d5540eab64c2ba548043d600b28c61ba/builds) passes - [ ] Revisit performance, possibly with staging/production data - [ ] Get a dump of staging / run against staging live - [ ] Get SSH access to staging - [ ] Wait for review/merge # Screenshots ## Creating wildcard protected branches ![1](/uploads/9446afccfdf6fa381e00c800dd2cc82e/1.png) ![2](/uploads/0b154503b297a818d3577488c575d845/2.png) ![3](/uploads/36217f79df9e41cc1550601f02627fe8/3.png) ![4](/uploads/041ca9bd529bcfa5373fca67e917cbcb/4.png) ### Using the `GLDropdown` component ![2016-06-30_14-16-15](/uploads/508afc2a5e2463c2954641409a560d88/2016-06-30_14-16-15.gif) ## Enforcing wildcard protected branches ### From the Web UI ![Screen_Shot_2016-06-20_at_1.21.18_PM](/uploads/8b5d4b1911e9152698a0488daf1880bc/Screen_Shot_2016-06-20_at_1.21.18_PM.png) ### Over SSH ![SSH](/uploads/7365989d7e4c406ef37b6ae5106442c9/SSH.gif) ### Over HTTPS ![HTTPS](/uploads/a7c0f56ae58efcffc75e6700fa2f4ac0/HTTPS.gif) ## Listing matching branches ![Screen_Shot_2016-06-20_at_1.33.44_PM](/uploads/d054113022f5d7ec64c0e57e501ac104/Screen_Shot_2016-06-20_at_1.33.44_PM.png) See merge request !4665
| | * | Improve the error message displayed when branch creation fails.Timothy Andrew2016-07-051-0/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note: This feature was developed independently on master while this was in review. I've removed the conflicting bits and left the relevant additions, mainly a test for `Gitlab::Git::Hook`. The original commit message follows: 1. `gitlab-shell` outputs errors to `stderr`, but we weren't using this information, prior to this commit. Now we capture the `stderr`, and display it in the flash message when branch creation fails. 2. This can be used to display better errors for other git operation failures with small tweaks. 3. The return value of `Gitlab::Git::Hook#trigger` is changed from a simple `true`/`false` to a tuple of `[status, errors]`. All usages and tests have been updated to reflect this change. 4. This is only relevant to branch creation _from the Web UI_, since SSH and HTTP pushes access `gitlab-shell` either directly or through `gitlab-workhorse`. 5. A few minor changes need to be made on the `gitlab-shell` end. Right now, the `stderr` message it outputs is prefixed by "GitLab: ", which shows up in our flash message. This is better removed.