Commit Graph

54 Commits

Author SHA1 Message Date
Grzegorz Bizon 0430b76441 Enable Style/DotPosition Rubocop 👮 2017-06-21 13:48:12 +00:00
Douwe Maan b38c74d696 Revert 'New file from interface on existing branch' 2017-06-09 10:10:47 -05:00
Douwe Maan d170133bde Refactor changing files in web UI 2017-04-20 00:37:44 +00:00
Douwe Maan 6cc4cf1e15 Fix cherry-picking or reverting through an MR 2017-03-02 17:41:05 -06:00
Douwe Maan 80543e0abd Fix creating a file in an empty repo using the API 2017-03-01 12:25:21 -06:00
Douwe Maan 1fe7501b49 Revert "Prefer leading style for Style/DotPosition"
This reverts commit cb10b725c8929b8b4460f89c9d96c773af39ba6b.
2017-02-23 09:33:05 -06:00
Douwe Maan 206953a430 Prefer leading style for Style/DotPosition 2017-02-23 09:32:22 -06:00
Douwe Maan 5c7f9d69e3 Fix code for cops 2017-02-23 09:31:57 -06:00
Douwe Maan 8a4d68c53e Enable Style/ConditionalAssignment 2017-02-23 09:31:57 -06:00
Douwe Maan 4a8a28eb9e Fix issue where files on a fork could not be edited 2017-02-17 12:54:41 -06:00
Lin Jen-Shin eb242fc865 Make sure different project gets a merge request
Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7237#note_21626479
2017-01-26 22:37:22 +08:00
Lin Jen-Shin acda0cd48d @tree_edit_project is no longer used
Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7237#note_21626434
2017-01-26 19:13:02 +08:00
Lin Jen-Shin ccc73c455b Rename from base to start because base could mean merge base 2017-01-06 23:29:13 +08:00
Lin Jen-Shin e3c36850a6 Detect if we really want a new merge request properly 2017-01-06 22:49:23 +08:00
Lin Jen-Shin 358501df2d Properly fix the edge case! 2017-01-06 22:20:02 +08:00
Lin Jen-Shin a4b97b2cb6 Rename source to base to avoid confusion from MR 2017-01-06 22:05:30 +08:00
Lin Jen-Shin 593228ffe3 Don't set invalid @mr_source_branch when create_merge_request? 2017-01-06 20:59:38 +08:00
Lin Jen-Shin a30f278bde Fix for initial commit and remove unneeded args 2017-01-06 04:18:51 +08:00
Lin Jen-Shin ae86a1b9d3 Just trust set_commit_variables to set everything!
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.
2017-01-06 02:11:27 +08:00
Lin Jen-Shin 0b3b56b34d Merge request terms are reversed for GitOperationService
This is seriously confusing but a target branch in merge request,
is actually the source branch for GitOperationService, which is
the base branch. The source branch in a merge request, is the
target branch for GitOperationService, which is where we want to
make commits.

Perhaps we should rename source branch in GitOperationService to
base branch, and target branch to committing branch.
2017-01-05 23:15:58 +08:00
Lin Jen-Shin 9244c81bc5 I think I am really confused, should be @tree_edit_project
Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7237#note_20571990
2017-01-05 03:01:16 +08:00
Lin Jen-Shin 05d742a047 Indent the way rubocop likes 2017-01-05 01:10:35 +08:00
Lin Jen-Shin 104bac3d21 Merge branch 'master' into fix-git-hooks-when-creating-file
* 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
  ...
2017-01-04 22:25:55 +08:00
Felipe Artur 781cca8d45 Fix redirect after update file when user has forked project 2016-12-29 21:11:34 -02:00
Lin Jen-Shin 99b5569763 Try to use those @mr variables for full correctness 2016-12-14 03:40:09 +08:00
Lin Jen-Shin dc4b3dd0ae Fix source_project and also pass source_project
Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7237#note_19747556
2016-12-14 01:47:17 +08:00
Lin Jen-Shin e0df1b5f99 Merge remote-tracking branch 'upstream/master' into 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
  ...
2016-12-10 01:27:56 +08:00
Douwe Maan f23b1cb453 Merge branch 'jej-23867-use-mr-finder-instead-of-access-check' into 'security'
Replace MR access checks with use of MergeRequestsFinder

Split from !2024 to partially solve https://gitlab.com/gitlab-org/gitlab-ce/issues/23867

⚠️ - Potentially untested
💣 - No test coverage
🚥 - Test coverage of some sort exists (a test failed when error raised)
🚦 - Test coverage of return value (a test failed when nil used)
 - Permissions check tested

- [x] 💣  app/finders/notes_finder.rb:17
- [x] ⚠️  app/views/layouts/nav/_project.html.haml:80 [`.count`]
- [x] 💣  app/controllers/concerns/creates_commit.rb:84
- [x] 🚥  app/controllers/projects/commits_controller.rb:24
- [x] 🚥  app/controllers/projects/compare_controller.rb:56
- [x] 🚦  app/controllers/projects/discussions_controller.rb:29
- [x]   app/controllers/projects/todos_controller.rb:27
- [x] 🚦  app/models/commit.rb:268
- [x]  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
2016-12-08 21:42:07 -03:00
Lin Jen-Shin 4f94053c21 We still need it for empty repo for web UI!
We shouldn't pass a non-existing branch to source_branch.
Checkout test for:

* spec/features/tags/master_views_tags_spec.rb:24
* spec/features/projects/files/project_owner_sees_link_to_create_license_file_in_empty_project_spec.rb:13
2016-12-08 15:22:32 +08:00
Lin Jen-Shin cdb598f397 We probably don't need this anymore, not sure why 2016-12-08 14:15:50 +08:00
Lin Jen-Shin 3e69c716f0 Try if branch_exists? would work, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7237#note_18424135
2016-11-15 20:03:18 +08:00
Lin Jen-Shin cd22fdd531 @ref might not exist 2016-11-15 08:21:16 +08:00
Lin Jen-Shin a68a62011d Don't pass source_branch if it doesn't exist 2016-11-15 07:53:36 +08:00
tiagonbotelho 08dc8af733 fixes distinction between renaming a file and updating its content and
refactors update file
2016-09-09 23:05:30 -04:00
tiagonbotelho 893f3f2856 refactors update action to change commit_params with the correct path 2016-07-12 15:55:16 +01:00
tiagonbotelho cf96c7596a changes the usasge of path to file_path on blob_controller for compatibillity with the create action 2016-07-12 15:55:16 +01:00
tiagonbotelho 3beb55c659 removes debugging prints from code 2016-07-12 15:53:25 +01:00
tiagonbotelho df3d1c1fb9 refactors blob_controller 2016-07-12 15:52:47 +01:00
tiagonbotelho 2313b09bff removes debugging prints from code 2016-07-12 15:49:47 +01:00
tiagonbotelho a50322679c refactors blob_controller 2016-07-12 15:49:21 +01:00
tiagonbotelho 7759e86be5 removes debugging prints from code 2016-07-12 15:41:20 +01:00
tiagonbotelho ea577ddda3 refactors blob_controller 2016-07-12 15:39:04 +01:00
tiagonbotelho 71bab5fe58 removes debugging prints from code 2016-07-12 15:34:44 +01:00
tiagonbotelho 1d5d5b1a42 refactors blob_controller 2016-07-12 15:33:39 +01:00
tiagonbotelho 9951854648 creates the update_file method in repository.rb and applies changes accordingly 2016-07-12 15:24:17 +01:00
tiagonbotelho ac30c60ad9 successfully adds the new version with the updated name on the projects repo 2016-07-12 15:22:54 +01:00
Gabriel Mazetto f5a0ac0fc1 Codestyle: make sure we have space around operators 2016-05-13 04:46:56 -03:00
Rubén Dávila cc5ff3b5a4 Use the adequate success path on the JSON endpoint.
I forgot to update this and some spinach specs were failing.
2016-02-19 13:15:43 -05:00
Rubén Dávila b8295fc323 Fix build and add specs 2016-02-19 13:14:53 -05:00
Rubén Dávila 328b52d58a Some updates after last code review. 2016-02-19 13:14:52 -05:00