summaryrefslogtreecommitdiff
path: root/app/services/commits
Commit message (Collapse)AuthorAgeFilesLines
* Enable frozen string in apps/services/**/*.rbrepo-forks/gitlab-ce-frozen-string-enable-apps-services-innergfyoung2018-07-164-0/+8
| | | | | | For directories application_settings --> labels. Partially addresses #47424.
* Updates from `rubocop -a`Lin Jen-Shin2018-07-091-2/+0
|
* Don't use Gitlab::Utils.nlbr in Gitlab::GitJacob Vosmaer (GitLab)2018-06-111-1/+1
|
* Prepare cherry-pick and revert for migration to GitalyJacob Vosmaer (GitLab)2017-09-191-1/+5
|
* Move GitOperationService to Gitlab::Gitmove-git-operation-serviceJacob Vosmaer2017-09-011-1/+1
|
* Move GitHooksService to Gitlab::GitJacob Vosmaer2017-08-231-1/+1
|
* Whitelist or fix additional `Gitlab/PublicSend` cop violationsrs-more-public-send-whitelistsRobert Speicher2017-08-141-0/+1
| | | | | An upcoming update to rubocop-gitlab-security added additional violations.
* Refactor changing files in web UIDouwe Maan2017-04-204-49/+81
|
* Remove useless assignmentdm-fix-cherry-pickDouwe Maan2017-03-031-1/+1
|
* Use separate error class for cherry-pick and revert tree errorsDouwe Maan2017-03-021-9/+5
|
* Fix cherry-picking or reverting through an MRDouwe Maan2017-03-021-30/+22
|
* Enable and autocorrect the CustomErrorClass copSean McGivern2017-03-011-2/+2
|
* Rename from base to start because base could mean merge baseLin Jen-Shin2017-01-061-5/+5
|
* Rename source to base to avoid confusion from MRLin Jen-Shin2017-01-061-5/+5
|
* Prefer leading dots over trailing dotsLin Jen-Shin2017-01-061-2/+2
|
* Fix for initial commit and remove unneeded argsLin Jen-Shin2017-01-061-2/+9
|
* Just trust set_commit_variables to set everything!Lin Jen-Shin2017-01-061-1/+2
| | | | | | | | Removing those weird setup in assign_change_commit_vars fixed all the failures in the tests. I still cannot say why but clearly we need to have better names. It's so confusing right now. We should seriously stop fiddling those instance variables.
* Merge branch 'master' into fix-git-hooks-when-creating-fileLin Jen-Shin2017-01-041-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (1031 commits) Add changelog entry for renaming API param [ci skip] Add missing milestone parameter Refactor issues filter in API Fix project hooks params Gitlab::LDAP::Person uses LDAP attributes configuration Don't delete files from spec/fixtures Copy, don't move uploaded avatar files Minor improvements to changelog docs Rename logo, apply for Slack too Fix Gemfile.lock for the octokit update Fix cross-project references copy to include the project reference Add logo in public files Use stable icon for Mattermost integration rewrite the item.respond_to?(:x?) && item.x? to item.try(:x?) API: extern_uid is a string Increases pipeline graph drowdown width in order to prevent strange position on chrome on ubuntu Removed bottom padding from merge manually from CLI because of repositioning award emoji's Make haml_lint happy Improve spec Add feature tests for Cycle Analytics ...
| * fix awkward verb conjugation in cherry-pick and revert errorsMike Greiling2016-12-101-1/+1
| |
* | Fix source_project and also pass source_projectLin Jen-Shin2016-12-141-0/+1
| | | | | | | | | | Feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7237#note_19747556
* | Merge remote-tracking branch 'upstream/master' into ↵Lin Jen-Shin2016-12-101-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fix-git-hooks-when-creating-file * upstream/master: (60 commits) Refactor SSH keys docs Improvements to setting up ssh Do not reload diff for merge request made from fork when target branch in fork is updated Add 8.12.10, 8.12.11, and 8.12.12 CHANGELOG.md items Changes after review Fix broken test Adds CHANGELOG entry Adds tests Uniformize props name format Replace commit icon svg logic Replace play icon svg logic Update docs to reflect new defaults on omnibus Merge branch 'jej-23867-use-mr-finder-instead-of-access-check' into 'security' Merge branch 'html-safe-diff-line-content' into 'security' Merge branch 'rs-filter-authentication_token' into 'security' Merge branch 'destroy-session' into 'security' remove unnecessary issues event filter on comments tab Updating reference to database password Add CHANGELOG entry Displays milestone remaining days only when it's present ...
| * Merge branch 'jej-23867-use-mr-finder-instead-of-access-check' into 'security'Douwe Maan2016-12-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace MR access checks with use of MergeRequestsFinder Split from !2024 to partially solve https://gitlab.com/gitlab-org/gitlab-ce/issues/23867 :warning: - Potentially untested :bomb: - No test coverage :traffic_light: - Test coverage of some sort exists (a test failed when error raised) :vertical_traffic_light: - Test coverage of return value (a test failed when nil used) :white_check_mark: - Permissions check tested - [x] :bomb: app/finders/notes_finder.rb:17 - [x] :warning: app/views/layouts/nav/_project.html.haml:80 [`.count`] - [x] :bomb: app/controllers/concerns/creates_commit.rb:84 - [x] :traffic_light: app/controllers/projects/commits_controller.rb:24 - [x] :traffic_light: app/controllers/projects/compare_controller.rb:56 - [x] :vertical_traffic_light: app/controllers/projects/discussions_controller.rb:29 - [x] :white_check_mark: app/controllers/projects/todos_controller.rb:27 - [x] :vertical_traffic_light: app/models/commit.rb:268 - [x] :white_check_mark: lib/gitlab/search_results.rb:71 - [x] https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2024/diffs#d1c10892daedb4d4dd3d4b12b6d071091eea83df_267_266 Memoize ` merged_merge_request(current_user)` - [x] https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2024/diffs#d1c10892daedb4d4dd3d4b12b6d071091eea83df_248_247 Expected side effect for `merged_merge_request!`, consider `skip_authorization: true`. - [x] https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2024/diffs#d1c10892daedb4d4dd3d4b12b6d071091eea83df_269_269 Scary use of unchecked `merged_merge_request?` See merge request !2033
* | Cleanup parameters, easier to understand andLin Jen-Shin2016-12-081-1/+1
| | | | | | | | more consistent across different methodst
* | Pass source_branch properly for cherry-pick/revertLin Jen-Shin2016-12-071-1/+8
| | | | | | | | | | Feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7237/diffs#note_19210818
* | Add `source_branch` option for various git operationsLin Jen-Shin2016-11-151-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | If `source_branch` option is passed, and target branch cannot be found, `Repository#update_branch_with_hooks` would try to create a new branch from `source_branch`. This way, we could make changes in the new branch while only firing the hooks once for the changes. Previously, we can only create a new branch first then make changes to the new branch, firing hooks twice. This behaviour is bad for CI. Fixes #7237
* | Revert "Don't execute git hooks if you create branch as part of other change"Lin Jen-Shin2016-11-151-1/+1
| | | | | | | | This reverts commit a431ca0f8b7f8967e89a35caddf1e41e53eee290.
* | Don't execute git hooks if you create branch as part of other changeKamil Trzcinski2016-11-021-1/+1
|/ | | | | | | | | | | Currently, our procedure for adding a commit requires us to execute `CreateBranchService` before file creation. It's OK, but also we do execute `git hooks` (the `PostReceive` sidekiq job) as part of this process. However, this hook is execute before the file is actually committed, so the ref is updated. Secondly, we do execute a `git hooks` after committing file and updating ref. This results in duplicate `PostReceive` jobs, where the first one is completely invalid. This change makes the branch creation, something that is intermediate step of bigger process (file creation or update, commit cherry pick or revert) to not execute git hooks.
* Reduce duplication in Commits::{CherryPickService,RevertService}22203-reduce-duplication-in-commits-cherry_pick_serviceRémy Coutable2016-09-153-27/+21
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Revert "Revert "Merge branch '18193-developers-can-merge' into 'master' ""Rémy Coutable2016-07-181-2/+2
| | | | | | | | This reverts commit 530f5158e297f3cde27f3566cfe13bad74ba3b50. See !4892. Signed-off-by: Rémy Coutable <remy@rymai.me>
* Revert "Merge branch '18193-developers-can-merge' into 'master' "Robert Speicher2016-07-131-2/+2
| | | | | This reverts commit 9ca633eb4c62231e4ddff5466c723cf8e2bdb25d, reversing changes made to fb229bbf7970ba908962b837b270adf56f14098f.
* Refactor `Gitlab::GitAccess`Timothy Andrew2016-07-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Revert back to not defining a default Git access protocol.Patricio Cano2016-07-051-1/+1
|
* Default Git access protocol to `web`Patricio Cano2016-07-051-1/+1
|
* Rename ENV['PROTOCOL'] to ENV['GL_PROTOCOL'] to conform to what GitLab Shell ↵Patricio Cano2016-07-051-1/+1
| | | | expects and make the `protocol` param in `GitAccess` mandatory.
* Add support to cherry-pick any commitP.S.V.R2016-04-183-43/+69
| | | | | Issue: https://gitlab.com/gitlab-org/gitlab-ce/issues/12785 Merge Request: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3514
* Check push permissions only when pushing directly to target branch.issue_14374Rubén Dávila2016-03-171-3/+4
|
* Check for conflicts before creating target branch.Rubén Dávila2016-03-011-11/+11
|
* Some updates from last code review.Rubén Dávila2016-02-191-7/+3
|
* Refactor RevertService.Rubén Dávila2016-02-191-30/+24
|
* Some fixes and refactors for code related to forks.Rubén Dávila2016-02-191-4/+25
|
* Don't make Repository#revert aware of MRs.Rubén Dávila2016-02-191-2/+6
|
* Update copy and URLs used when reverting MRs.Rubén Dávila2016-02-191-1/+1
|
* Big refactor for #revert_commit.Rubén Dávila2016-02-191-10/+1
| | | | | | * Now checking if a commit is already reverted or there is a conflict is much more faster. * No longer need to create a new branch.
* Some fixes required for conflicts on revert.Rubén Dávila2016-02-191-2/+4
|
* Make it work for merge commits.Rubén Dávila2016-02-191-3/+1
|
* Make MRs with revert commit work.Rubén Dávila2016-02-191-6/+10
|
* Add RevertService class with basic logic to revert commitRubén Dávila2016-02-191-0/+48