summaryrefslogtreecommitdiff
path: root/lib/gitlab
Commit message (Collapse)AuthorAgeFilesLines
* fix typo from bad refactoringJames Lopez2016-05-171-1/+1
|
* Merge branch 'wiki-fix-reloaded' into 'master' Rémy Coutable2016-05-161-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | Use the relative url prefix for links in Wiki Retry of gitlab-org/gitlab-ce!4026 @rymai !4050 solved all other problems how it looks like. I [tested](https://gitlab.com/artem-forks/gitlab-ce/commit/ff01eca7b559efa7cacf3412aa01cd8ae8a6db7e/builds) this with ruby22 Fixes #17071 See merge request !4131
| * Use the relative url prefix for links in WikiArtem Sidorenko2016-05-131-1/+1
| |
* | Merge branch 'gh-pull-requests'Douwe Maan2016-05-163-57/+97
|\ \
| * | Remove branches that does exist on GitHub after PRs were importedDouglas Barbosa Alexandre2016-05-131-2/+3
| | |
| * | Fix validation method for Gitlab::GithubImport::PullRequestFormatterDouglas Barbosa Alexandre2016-05-132-3/+6
| | |
| * | Extract GitHub branch formatterDouglas Barbosa Alexandre2016-05-133-77/+52
| | |
| * | Import PRs where branch names were reused across PRsDouglas Barbosa Alexandre2016-05-131-4/+24
| | |
| * | Preserve commits/diff/comments for PRs that were merged on GitHubDouglas Barbosa Alexandre2016-05-131-0/+2
| | |
| * | Fix spec for Gitlab::GithubImport::PullRequestFormatterDouglas Barbosa Alexandre2016-05-132-6/+6
| | |
| * | Import pull requests from GitHub where the target branch was removedDouglas Barbosa Alexandre2016-05-132-12/+31
| | |
| * | Import pull requests from GitHub where the source branch was removedDouglas Barbosa Alexandre2016-05-132-27/+47
| |/
* | Add cache count metrics to rails cacheadd-cache-count-metricsPablo Carranza2016-05-151-5/+7
|/
* Codestyle: make sure we have space around operatorsGabriel Mazetto2016-05-132-4/+4
|
* Merge branch 'deprecated-class-methods-cop' into 'master' Robert Speicher2016-05-122-2/+2
|\ | | | | | | | | | | | | | | | | Enable the Rubocop DeprecatedClassMethods cop This reports uses of `File.exists?` and `Dir.exists?`, which were both deprecated in Ruby and will eventually be removed in favor of `.exist?`. Also fixes all existing uses of the deprecated methods. See merge request !4087
| * Enable the Rubocop DeprecatedClassMethods copConnor Shea2016-05-082-2/+2
| | | | | | | | | | | | This reports uses of `File.exists?` and `Dir.exists?`, which were both deprecated in Ruby and will eventually be removed in favor of `.exist?`. Also fixes all existing uses of the deprecated methods.
* | Removed tracking of total method execution timestotal-method-timeYorick Peterse2016-05-121-2/+0
| | | | | | | | | | | | | | | | | | | | | | Because method call timings are inclusive (that is, they include the time of any sub method calls) this would lead to the total method execution time often being far greater than the total transaction time. Because this is incredibly confusing it's best to simply _not_ track the total method execution time, after all it's not that useful to begin with. Fixes gitlab-org/gitlab-ce#17239
* | Merge branch '17270-only-generate-email-on-push-once-for-all-recipients' ↵Robert Speicher2016-05-111-3/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into 'master' Only generate repository push email once The repository push email can be very expensive to generate, especially with syntax-highlighted diffs. Instead of generating the email for each recipient, generate one email object and reset the Message-Id and To headers for each recipient. (Cloning would also be expensive in the case of large emails, although probably not as bad as generating from scratch.) Closes #17270. See merge request !4070
| * | Only generate repository push email onceSean McGivern2016-05-111-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The repository push email can be very expensive to generate, especially with syntax-highlighted diffs. Instead of generating the email for each recipient, generate one email object and reset the Message-Id and To headers for each recipient. (Cloning would also be expensive in the case of large emails, although probably not as bad as generating from scratch.)
* | | Merge branch 'casecmp-cop' into 'master' Rémy Coutable2016-05-112-3/+3
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable Rubocop Casecmp Performance Cop. Also fixes the errors caused by enabling the cop. `casecmp` is more performant than `.downcase` and `==`. See also: https://github.com/bbatsov/rubocop/blob/master/lib/rubocop/cop/performance/casecmp.rb See merge request !3957
| * | | Enable Rubocop Casecmp Performance Cop.Connor Shea2016-05-102-3/+3
| | |/ | |/| | | | | | | Also fixes the errors caused by enabling the cop. casecmp is more performant than `.downcase` and `==`.
* | | Merge branch 'string-replacement-cop' into 'master' Rémy Coutable2016-05-111-1/+1
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | Enable the StringReplacement cop. Also fix one use of `gsub` that would be faster as `delete`. Use `tr` instead of `gsub` when you are replacing the same number of characters. Use `delete` instead of `gsub` when you are deleting characters. See merge request !3960
| * | Enable the StringReplacement cop.Connor Shea2016-05-101-1/+1
| |/ | | | | | | | | | | | | | | Also fix one use of `gsub` that would be faster as `delete`. Use `tr` instead of `gsub` when you are replacing the same number of characters. Use `delete` instead of `gsub` when you are deleting characters.
* | Revert "Merge branch 'wiki-fix' into 'master' "Rémy Coutable2016-05-101-1/+1
| | | | | | | | | | | | | | This reverts commit 4cc85a58e8ca00f5a4ecbd2bca40a0cad867b817, reversing changes made to 90ae445ba930068d04adc5a009dbdeabe4cb3e34. Signed-off-by: Rémy Coutable <remy@rymai.me>
* | Use the proper GitLab URL for links in WikiArtem Sidorenko2016-05-091-1/+1
| |
* | Improve multiple branch push performance by memoizing permission checkingStan Hu2016-05-091-1/+6
|/ | | | | | | | | | | | | | If you attempt to push thousands of branches at once, the 60-second timeout will occur because GitAccess checking does a lot of work to check if the user has permission to push to a branch. This changes does two things: 1. Instead of making 1 DB query per branch push, use a memoized list of protected branches to check 2. Memoize what permissions the user has to perform on this project On a test of 10,000 branch pushes, this prevents gitlab-shell from hitting the 60-second timeout. Closes #17225
* Update SVG sanitizer to conform to SVG 1.1Stan Hu2016-05-062-0/+144
| | | | | | | | | | | Use a custom Loofah scrubber since sanitize 2.x transformers are inadequate to handle case-sensitive SVG attributes. sanitize parses documents as HTML instead of XML, which causes all SVG attribute names (e.g. viewBox) to be downcased. * SVG element list: https://www.w3.org/TR/SVG/eltindex.html * SVG attribute list: https://www.w3.org/TR/SVG/attindex.html Closes #14555
* Merge branch 'fix/import-url-issues' into 'master' Robert Speicher2016-05-051-1/+1
|\ | | | | | | | | | | | | Fix importer bug when throwing exceptions Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/15681 See merge request !3941
| * fix var errorJames Lopez2016-04-271-1/+1
| |
* | Fix passing nil to protected_tag?tag-existsYorick Peterse2016-05-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously this method would directly receive the output of tag_name(). This method could either return a String or nil. In the previous setup this would somehow magically work but because Rugged::TagCollection#[] doesn't accept nil values it started to fail. To work around this the elsif in change_access_check() assigns the result of tag_name() to a local and then _only_ calls protected_tag?() if the tag name is not nil. The extra parenthesis are put in place to ensure that things are parsed correctly, without these the code would be parsed as follows: elsif tag_ref = (tag_name(ref) && protected_tag(tag_ref)) During runtime this would basically resolve to: elsif tag_ref = (tag_name(ref) && protected_tag(nil)) This is because when you refer to the variable you're assigning _in_ the assignment Ruby returns nil instead of raising an error.
* | Use tag_exists? in GitAccess#protected_tag?Yorick Peterse2016-05-051-1/+1
| | | | | | | | | | This removes the need for retrieving the entire list of tags just to check if a specific one exists.
* | Fix the line code when importing PR review comments from GitHubDouglas Barbosa Alexandre2016-05-051-4/+17
| | | | | | | | | | Pull Request Review Comments are comments on a portion of the unified diff.
* | Merge branch 'use-rugged-to-create-tag' into 'master' Rémy Coutable2016-05-041-18/+0
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | Use Rugged's TagCollection#create instead of gitlab-shell's Repository#add_tag for better performance This was originally opened at !1757 by @pcarranza but I changed it to use Rugged instead of gitlab_git, following @DouweM's request. Once this is merged, https://gitlab.com/gitlab-org/gitlab-shell/merge_requests/26 will be mergeable too. See merge request !3745
| * | Use Rugged's TagCollection#create instead of gitlab-shell's ↵Rémy Coutable2016-05-041-18/+0
| | | | | | | | | | | | | | | | | | Repository#add_tag for better performance Signed-off-by: Rémy Coutable <remy@rymai.me>
* | | Merge branch 'pacoguzman/gitlab-ce-15001-since-and-until-operators-api-commits'Douwe Maan2016-05-041-1/+1
|\ \ \ | |/ / |/| | | | | | | | # Conflicts: # Gemfile.lock
| * | API support for the 'since' and 'until' operators on commit requestsPaco Guzman2016-04-291-1/+1
| |/ | | | | - Parameter validation as ISO8601 format
* | Properly handle bigger filesZeger-Jan van de Weg2016-04-281-4/+9
| |
* | Merge branch 'use-remote-ip-for-akismet' into 'master' Rémy Coutable2016-04-281-2/+10
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use ActionDispatch Remote IP for Akismet checking Previously all remote IPs appeared at 127.0.0.1, which made Akismet not very useful. Using the ActionDispatch Remote IP (http://api.rubyonrails.org/classes/ActionDispatch/RemoteIp.html) should provide more reliable results. Closes #16629 See merge request !3961
| * | Use ActionDispatch Remote IP for Akismet checkingStan Hu2016-04-271-2/+10
| |/ | | | | | | | | | | | | | | Previously all remote IPs appeared at 127.0.0.1, which made Akismet not very useful. Using the ActionDispatch Remote IP (http://api.rubyonrails.org/classes/ActionDispatch/RemoteIp.html) should provide more reliable results. Closes #16629
* | Backport GitHub Enterprise import support from EEStan Hu2016-04-261-4/+11
|/ | | | | | | | | | These changes were pulled from GitLab EE to support configuring an alternative API URL than the default https://api.github.com. In addition, the `verify_ssl` flag allows users to disable SSL cert checking. One modification: add a default `args` option if it does not exist to avoid breaking existing configurations.
* Merge remote-tracking branch 'origin/master' into issue_14904Alfredo Sumaran2016-04-212-3/+2
|\
| * Use SIGTERM during Sidekiq memory shutdownJacob Vosmaer2016-04-211-2/+2
| | | | | | | | This makes the memory killer behave more like 'sidekiqctl stop'.
| * Revert "Merge branch 'sentry-js' into 'master' "Jacob Schatz2016-04-211-1/+0
| | | | | | | | | | This reverts commit 0f309794e78243b1ee16ba6f1451dbb0752956c5, reversing changes made to 1e596fef1c42a1dd925636c48fea01be444dc3ab.
* | Merge remote-tracking branch 'origin/master' into issue_14904Alfredo Sumaran2016-04-202-0/+10
|\ \ | |/ | | | | | | # Conflicts: # app/views/shared/issuable/_sidebar.html.haml
| * Merge branch 'fix-grape-internal-allowed-action' into 'master' Robert Speicher2016-04-201-0/+9
| |\ | | | | | | | | | | | | | | | | | | | | | Fix setting of "action" for Grape transactions After wondering why we're not getting all the data in Grafana that I wanted I realized I wasn't setting the "action" field properly here. See merge request !3842
| | * Fix setting of "action" for Grape transactionsYorick Peterse2016-04-201-0/+9
| | | | | | | | | | | | | | | | | | | | | Merely setting the "action" tag will only result in the transaction itself containing a value for this tag. To ensure other metrics also contain this tag we must set the action using Transaction#action= instead.
| * | Merge branch 'sentry-js' into 'master' Robert Speicher2016-04-201-0/+1
| |\ \ | | |/ | |/| | | | | | | | | | | | | Add Sentry logging for JavaScript errors Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/12675 See merge request !3795
| | * place the sentry config into a new file, and some changessentry-jsArinde Eniola2016-04-191-1/+1
| | |
| | * Add sentry logger to GitLabJacob Schatz2016-04-181-0/+1
| | |
* | | Merge remote-tracking branch 'origin/master' into issue_14904Alfredo Sumaran2016-04-208-5/+133
|\ \ \ | |/ /