Using the API library to create or update a merge request at the moment a 404 error is returned.
This is fine when the merge request in question does not exist, but does not provide good
information that for example a required attribute is missing.
A status code of 400 (Bad request) is returned when creating or updating a merge request
when either `source_branch` or `target_branch` is missing. A status code of 409 is returned
when `source_branch` and `target_branch` are the same. Tests are added for these cases.
The attempt to revoke project access for a user that was not member of the
project results in a 500 Internal Server error where it actually should
result in a 200 OK since after the operation, the user is not member of
the project. This turns the operation into an idempotent call that can
be repeated with no ill effects.
Updated the spec and changed the code accordingly. However, the result differs
slightly, as we can't return the users project access level if the user was not
member. I'm not aware if anybody relies on the result of this call.
Fixes#2832
In case we rescue from a fatal error, we want the error and the backtrace to
the error logged, so we can debug later on. This change injects the configured
logger from the rails app to the grape API and logs error as well as backtrace
in a rails-like fashion.
A new queue of "project_web_hook" is used to process web hooks asynchronously, allowing each to succeed/fail (and be retried) independently.
(Basically, project web hooks now process the same as system hooks.)
The tasks gitlab:env:info mixes user and group, and presume as a group 'git'.
However, gitolite group name can be anything.
That patch add the git group name in the config,
and check gitolite.ssh_user group against git.group
(which defaults to 'git', as before this patch, if undefined).
M config/gitlab.yml.example:
Add 'group' in 'git' section
Mention default value for the two extra settings
M lib/tasks/gitlab/check.rake:
Check that gitolite.ssh_user *group* is the one defined in git.group.
Make sure to default to 'git' as the expected group
if said group is undefined in the config.
Note: uses a more complete regexp for the group detection
(the group can start, end or be in the middle or the list of groups
of gitolite.ssh_user)
M: config/initializers/1_settings.rb:
Add default values for gitolite.group and gitlab.user