gitlab-org--gitlab-foss/lib/gitlab
Timothy Andrew 495db09653 Enforce "developers can merge" during `pre-receive`.
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.
2016-07-13 13:24:56 +05:30
..
auth Fix tests 2016-06-06 17:40:26 +02:00
backend Enable Style/EmptyLines cop, remove redundant ones 2016-07-01 21:56:17 +02:00
badge
bitbucket_import Revert "Fix merge conflicts - squashed commit" 2016-06-03 11:10:17 +02:00
checks Enforce "developers can merge" during `pre-receive`. 2016-07-13 13:24:56 +05:30
ci Add minor improvements in readability in CI config 2016-07-04 18:36:06 +02:00
database Fix update_column_in_batches to update all rows 2016-06-17 17:50:38 +02:00
diff Merge branch 'multi-line-inline-diff' into 'master' 2016-07-13 05:29:49 +00:00
email Allow reply-by-email with diff notes 2016-07-06 18:51:00 -04:00
fogbugz_import Revert "Fix merge conflicts - squashed commit" 2016-06-03 11:10:17 +02:00
gfm
git Merge branch '18627-wildcard-branch-protection' into 'master' 2016-07-07 22:37:30 +00:00
github_import Memoize response from `has_rate_limit?` to avoid extra API call 2016-07-12 12:14:17 -03:00
gitlab_import adding notifications stuff and more refactoring for exporting projects 2016-06-14 16:31:03 +02:00
gitorious_import
google_code_import Revert "Fix merge conflicts - squashed commit" 2016-06-03 11:10:17 +02:00
graphs Infinity Bug in Commit Statistics 2016-05-20 22:23:08 +02:00
import_export Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into fix/import-event-error 2016-07-11 18:00:19 +02:00
ldap Enable Style/EmptyLinesAroundAccessModifier rubocop cop 2016-06-03 10:34:20 +02:00
lfs Enable Style/EmptyLines cop, remove redundant ones 2016-07-01 21:56:17 +02:00
markdown
metrics RailsCache metrics now includes fetch_hit/fetch_miss and read_hit/read_miss info. 2016-07-05 12:28:06 +02:00
middleware Revert "Fix merge conflicts - squashed commit" 2016-06-03 11:10:17 +02:00
o_auth Merge branch 'master' into dev-master 2016-07-02 22:58:21 +02:00
saml Enable Style/EmptyLines cop, remove redundant ones 2016-07-01 21:56:17 +02:00
sanitizers Refactored SVG sanitizer 2016-06-12 21:05:58 -04:00
sherlock
sidekiq_middleware even more debug 2016-07-06 10:29:31 +02:00
sql
template fixup! override content method 2016-06-20 14:48:28 -05:00
access.rb Added "developers can merge" setting to protected branches 2016-07-13 13:24:26 +05:30
akismet_helper.rb
app_logger.rb
asciidoc.rb Enable Style/EmptyLines cop, remove redundant ones 2016-07-01 21:56:17 +02:00
auth.rb Revert "squashed merge and fixed conflicts" 2016-06-16 12:59:07 +02:00
award_emoji.rb Fix emoji paths in relative root configurations 2016-07-01 09:10:12 -07:00
bitbucket_import.rb
blame.rb add custom highlighting via .gitattributes 2016-06-27 14:17:49 -07:00
build_data_builder.rb Try to use `pipeline` where applicable 2016-06-03 13:09:49 +02:00
closing_issue_extractor.rb
color_schemes.rb
config_helper.rb
contributions_calendar.rb Revert "Fix merge conflicts - squashed commit" 2016-06-03 11:10:17 +02:00
contributor.rb
current_settings.rb Added setting to set new users by default as external 2016-07-07 19:21:18 +02:00
database.rb Fix RangeError exceptions when referring to issues or merge requests outside of max database values 2016-06-18 13:07:38 -07:00
devise_failure.rb
emoji.rb Add emoji.rb in lib/gitlab instead of using the gitlab_emoji gem. 2016-06-29 14:53:09 -06:00
exclusive_lease.rb
force_push_check.rb
git.rb
git_access.rb Enforce "developers can merge" during `pre-receive`. 2016-07-13 13:24:56 +05:30
git_access_status.rb
git_access_wiki.rb
git_logger.rb
git_post_receive.rb
git_ref_validator.rb
gitorious_import.rb
gl_id.rb Revert "squashed merge and fixed conflicts" 2016-06-16 12:59:07 +02:00
gon_helper.rb Unused got variable with very bad performance 2016-06-28 17:01:37 +02:00
highlight.rb support cgi style options, such as erb?parent=json 2016-06-27 14:17:49 -07:00
identifier.rb
import_export.rb bump version - as old exports wont be compatible 2016-06-29 10:49:31 +02:00
import_formatter.rb
import_sources.rb Enable Style/EmptyLines cop, remove redundant ones 2016-07-01 21:56:17 +02:00
incoming_email.rb
issues_labels.rb
key_fingerprint.rb Enable Style/UnneededCapitalW Rubocop cop 2016-06-30 13:31:52 +02:00
lazy.rb Revert "Fix merge conflicts - squashed commit" 2016-06-03 11:10:17 +02:00
logger.rb
markup_helper.rb Revert "Fix merge conflicts - squashed commit" 2016-06-03 11:10:17 +02:00
metrics.rb
note_data_builder.rb
other_markup.rb Enable Style/EmptyLines cop, remove redundant ones 2016-07-01 21:56:17 +02:00
popen.rb
production_logger.rb
project_search_results.rb Revert "Fix merge conflicts - squashed commit" 2016-06-03 11:10:17 +02:00
protocol_access.rb Default Git access protocol to `web` 2016-07-05 16:54:22 -05:00
push_data_builder.rb
recaptcha.rb
redis.rb Revert "Fix merge conflicts - squashed commit" 2016-06-03 11:10:17 +02:00
reference_extractor.rb Revert "Fix merge conflicts - squashed commit" 2016-06-03 11:10:17 +02:00
regex.rb Enable Style/EmptyLines cop, remove redundant ones 2016-07-01 21:56:17 +02:00
repository_check_logger.rb
routing.rb
search_results.rb
seeder.rb Replace colorize gem with rainbow. 2016-06-03 10:37:09 -06:00
sherlock.rb
sidekiq_logger.rb
snippet_search_results.rb
themes.rb
timeless.rb Add Timeless helper module to prevent updated_at from being updated 2016-07-06 18:50:58 -04:00
upgrader.rb
uploads_transfer.rb
url_builder.rb Revert "Fix merge conflicts - squashed commit" 2016-06-03 11:10:17 +02:00
url_sanitizer.rb spec and fix for sanitize method 2016-07-11 09:01:09 +02:00
user_access.rb
utils.rb
version_info.rb
visibility_level.rb Revert "Fix merge conflicts - squashed commit" 2016-06-03 11:10:17 +02:00
workhorse.rb Merge branch 'send-entry-via-Gitlab-Workhorse-Send-Data' into 'master' 2016-07-11 16:18:37 +00:00