| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Reason for renaming is to comply with naming convention of services in
codebase.
|
| |
|
| |
|
|
|
|
|
| |
Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7237#note_19747556
|
|
|
|
| |
more consistent across different methodst
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
fix-git-hooks-when-creating-file
* upstream/master: (141 commits)
Log mv_namespace parameters
Remove header ids from University docs
Added test that checks the correct select box is there for the LFS enabled setting.
Simplify copy on "Create a new list" dropdown in Issue Boards
Fix `LFS enabled` select box.
Use Commit#author so we share logic and cache
Move admin abuse report spinach test to rspec
fixes non-retina shadow and browser zoom issue
Use default `closest` if available!
Adds polyfill for CustomEvent
Move abuse report spinach test to rspec
Add support of Chrome/Chromium in requirements.md
Fixed dragging issues on issue boards
Grapify the sidekiq metrics API
Add nested groups support to the routing
Correctly determine mergeability of MR with no discussions
API: Add endpoint to delete a group share
Add a starting date to milestones
Update ProjectTeam#fetch_members to use project authorizations
Update ProjectTeam#max_member_access_for_user_ids to use project authorizations
...
|
| |
| |
| |
| |
| | |
Rails by default use autoload for all dirs from app folder.
require_relative not needed. See ActiveSupport::Dependencies.autoload_paths
|
| |
| |
| |
| | |
and keep it only called in update_branch_with_hooks.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| | |
This reverts commit a431ca0f8b7f8967e89a35caddf1e41e53eee290.
|
|/
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
add docs and tests - add additional validation
allow move without content
updated response
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently when a user performs an update of a file through the UI and there
has already been a change committed to the file the previous commits will be
overwritten without a check to see if the file has been changed.
This commit uses the last commit sha at the time the user starts editing the
file and compares it with the current sha of the file being edited to ensure
they are the same before committing the file. If the shas do not match we
throw an exception preventing the commit from the commit from occurring.
Fixes #5857
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
This reverts commit 530f5158e297f3cde27f3566cfe13bad74ba3b50.
See !4892.
Signed-off-by: Rémy Coutable <remy@rymai.me>
|
| |
| |
| |
| |
| | |
This reverts commit 9ca633eb4c62231e4ddff5466c723cf8e2bdb25d, reversing
changes made to fb229bbf7970ba908962b837b270adf56f14098f.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|