| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
This allows us to take advantage of Rails' `to_partial_path` to render
the correct partial based on the Blob type, rather than cluttering the
view with conditionals.
It also allows (and will allow in the future) better encapsulation for
Blob-related logic which makes sense for our Rails app but might not
make as much sense for the core `gitlab_git` library, such as detecting
if the blob is an SVG.
|
|\
| |
| |
| |
| |
| |
| |
| | |
Only set autocrlf when creating/updating files
Related issue: gitlab-org/gitlab-ce#13457
Details: 5619a6de1dd6fc1dfd4053810c7b11c677b7a495
See merge request !2859
|
| |
| |
| |
| |
| |
| | |
If path_with_namespace is nil Repository#raw_repository will also return
nil. Apparently code out there creates a Repository instance without a
namespace path. Right.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Setting the "autocrlf" Git option is an overkill since it's rarely
actually needed. More importantly, it has quite the impact on
performance (see gitlab-org/gitlab-ce#13457 for more information).
By setting "autocrlf" when creating or updating files we guarantee the
option is always set properly when we actually need it _without_
introducing overhead for requests that have nothing to do with this
option.
Fixes gitlab-org/gitlab-ce#13457
|
|/ |
|
|
|
|
|
|
|
|
| |
This ensures the caches for Repository#empty? and
Repository#has_visible_content? are flushed after a repository has been
imported or forked.
Fixes gitlab-org/gitlab-ce#13505
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add new data to project in push, issue, merge-request and note webhooks data
_Originally opened at !2738 by @bugagazavr._
- - -
**What does this MR do?**
Adds more data to hooks, makes repository data in all hook more dry ( use one hook_attrs method for repository data in all hooks )
**Are there points in the code the reviewer needs to double check?**
1. https://gitlab.com/bugagazavr/gitlab-ce/blob/extend-hooks/app/models/project.rb#L738
2. https://gitlab.com/bugagazavr/gitlab-ce/blob/extend-hooks/app/models/concerns/issuable.rb#L132
3. https://gitlab.com/bugagazavr/gitlab-ce/blob/extend-hooks/lib/gitlab/push_data_builder.rb#L52
4. https://gitlab.com/bugagazavr/gitlab-ce/blob/extend-hooks/lib/gitlab/note_data_builder.rb#L56
**Why was this MR needed?**
More information about user for push events, and more data about repositiry ( project )
**What are the relevant issue numbers?**
No
**Screenshots (if relevant)**
No
See merge request !2788
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Add `avatar_url`, `description`, `git_ssh_url`, `git_http_url`,
`path_with_namespace` and `default_branch` in `project` in push, issue,
merge-request and note webhooks data
- Deprecate the `ssh_url` in favor of `git_ssh_url` and `http_url` in
favor of `git_http_url` in `project` for push, issue, merge-request and
note webhooks data
- Deprecate the `repository` key in push, issue, merge-request and
note webhooks data, use `project` instead
|
|\ \
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Validate email addresses using Devise.email_regexp
Also:
- Get rid of legacy `:strict_mode`
- Get rid of custom `:email` validator
- Add some shared examples to spec emails validation
This supersedes !2754 and fixes #3851.
See merge request !2771
|
| |
| |
| |
| |
| |
| |
| | |
Also:
- Get rid of legacy :strict_mode
- Get rid of custom :email validator
- Add some shared examples to spec emails validation
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
'master'
Add assignee data to Issuables' hook_data
Originally opened at !1633 by @brammeleman.
Fixes #3047. Fixes #2475.
See merge request !2724
|
| | | |
|
|\ \ \
| |/ /
|/| |
| | |
| | |
| | |
| | | |
Actually use the `skip_merges` option in Repository#commits
Originally opened at !2067 by @cwq1913.
See merge request !2750
|
| | | |
|
|\ \ \
| |_|/
|/| |
| | |
| | |
| | |
| | |
| | |
| | | |
Smarter flushing of branch statistics caches
This basically ensures we only flush caches of branches whenever we really have to. See commit c514f8b850219cd3e5526e73e1d00e6729e2b466 for the details.
cc @joshfng @rspeicher
See merge request !2769
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Instead of flushing the behind/ahead counts for all branches upon every
push we now only flush the cache of branches that actually need to have
these statistics recalculated. There are now basically 2 scenarios and
their effects:
1. A user pushes a commit to the default branch, this results in the
cache being flushed for all branches.
2. A user pushes to a non default branch, this results in _only_ the
cache for that branch being flushed.
The existing code (Repository#expire_cache) remains backwards compatible
with the previous behaviour, the new behaviour is only applied when a
branch name is passed as an argument. This ensures that when for example
a project is deleted the cache for all branches is flushed.
|
|\ \ \
| |/ /
|/| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
`max_attachment_size` in `ApplicationSetting` should be present,
only integers greater than zero are valid.
Closes #13188
|
|\ \ \
| |/ /
|/| | |
|
| |/
| |
| |
| | |
Fixes #3903
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
This caches the output of the following methods:
* Repository#empty?
* Repository#has_visible_content?
* Repository#root_ref
The cache for Repository#has_visible_content? is flushed whenever a
commit is pushed to a new branch or an existing branch is removed.
The cache for Repository#root_ref is only flushed whenever a user
changes the default branch of a project. The cache for Repository#empty?
is never explicitly flushed as there's no need for it.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Hide remove source branch button when new commit is added to branch
Fixes #3339
This MR hides the 'Remove source branch' button when a new commit is added to the source branch
/cc @DouweM
See merge request !2701
|
| |
| |
| |
| |
| |
| | |
Fixes #3339
This MR hides the 'Remove source branch' button when a new commit is added to the source branch
|
|\ \
| |/
|/|
| |
| |
| |
| |
| |
| |
| | |
No space required after WIP identifier
Fixes #2426
Currently, the WIP: (or any other variation) prefix of a merge request title must include a trailing space for it to be recognized as a work in progress and prevent merging.
To resolve this, I added an or pattern to the regexp to look for any one of the three possible delimiters ':', ']', or ' '. This way the trailing space isn't required but it still won't mark any titles beginning with wip as work in progress (e.g. "Wipwap").
See merge request !1876
|
| | |
|
| |\ |
|
| | |
| | |
| | |
| | | |
Modified changelog
|
| | | |
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Optimize fetching issues closed by a merge request
Related issue: #12419
See merge request !2625
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Instead of running ClosingIssueExtractor for every commit in a merge
request we can gather all the commit messages (and the merge request
description), concatenate all this together and then run
ClosingIssueExtractor only once.
The result of this is that MergeRequest#closes_issues is now between
3.5x and 4x faster than the old setup. Using a merge request with 10
commits (each referencing a number of issues to close) this reduced the
call duration from around 200 milliseconds to around 50 milliseconds.
As a result of these changes the Jira related tests for
MergeRequest#closes_issues have been removed. These tests stubbed
Commit#closes_issues meaning that the only code that was really tested
was the call to Array#uniq to filter out duplicate issues. As this code
is no longer used (nor present) the corresponding tests were removed.
Related: gitlab-org/gitlab-ce#12419
|
|\ \ \ \ |
|
| | | | | |
|
|/ / / / |
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
fix syntax error on 2.1 and rubocop on 2.2
Background:
Hashes `{:'key': 'value'}` are not valid in 2.1 but are recommended by Rubocop on 2.2. We only use those when we have a key such as `weird-key`, `weird.key`, etc...
We could disable Rubocop but it wouldn't warn us about the recommended syntax since `Ruby 1.9`: `{key: 'value'}`, which is valid for `Ruby 1.9+`.
Workaround 1 could be disabling `Style/HashSyntax:` in `rubocop.yml`.
Workaround 2 (tried in this MR) is to trick Rubocop using `.to_sym` which is effectively the same as adding the `:`. This would allow to keep the warning in place.
Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/12801
See merge request !2637
|
| |/ / / |
|
|\ \ \ \
| |/ / / |
|
| |\ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Update Ruby version to 2.2.4 (latest previous stable) and update docs
Tests and issues added to https://github.com/gitlabhq/gitlabhq/issues/8696 were all fine after the upgrade.
Main issue: https://gitlab.com/gitlab-org/gitlab-ce/issues/3340
See merge request !2534
|
| | |\ \ \ |
|
| | | | | | |
|
| |\ \ \ \ \
| | |_|/ / /
| |/| | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Improve performance of retrieving last update times for events
See 75195eefcca4cb3961986c90c8e837da02f30134 and
https://gitlab.com/gitlab-org/gitlab-ce/issues/12415#note_3387317
for the juicy details.
Related issue: https://gitlab.com/gitlab-org/gitlab-ce/issues/12415
See merge request !2613
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
By simply loading the first event from the already sorted set we save
ourselves extra (slow) queries just to get the latest update timestamp.
This removes the need for Event.latest_update_time and significantly
reduces the time needed to build an Atom feed.
Fixes gitlab-org/gitlab-ce#12415
|
|/ / / / / |
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The pattern in the `::reference_pattern` class method in the
ExternalIssue model does not match all valid forms of JIRA project
names. I have updated the regex to match JIRA project names with numbers
and underscores. More information on valid JIRA project names can be
found here:
https://confluence.atlassian.com/jira/changing-the-project-key-format-192534.html
* The first character must be a letter,
* All letters used in the project key must be from the Modern Roman Alphabet and upper case, and
* Only letters, numbers or the underscore character can be used.
|
| | | | |
|
|\ \ \ \
| |/ / /
|/| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Update gitlab_git & use new method for counting branches
Corresponding gitlab_git merge request detailing some of the rationale behind this: https://gitlab.com/gitlab-org/gitlab_git/merge_requests/62
Fixes #12418
See merge request !2535
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Gitlab::Git::Repository#branch_count is a tad faster than the previous
setup. See gitlab-org/gitlab_git!62 for more information.
|
|\ \ \ \
| |/ / /
|/| | |
| | | |
| | | | |
Add method to calculate total size of artifacts in subpath
See merge request !2500
|