summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Build correct basenames for title search resultssearch-blob-basenamesMarkus Koller2019-06-201-3/+6
| | | | | | | | | The "basename" here needs to be the full path without the trailing extension, instead of stripping the leading path as well. This was previously fixed in 2f36efa0871 inside the view, but the problematic code was still present in FoundBlob, and the corresponding spec didn't actually use a child wiki page to properly verify the fix.
* Render GFM html in GraphQLBob Van Landuyt2019-06-202-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a `markdown_field` to our types. Using this helper will render a model's markdown field using the existing `MarkupHelper` with the context of the GraphQL query available to the helper. Having the context available to the helper is needed for redacting links to resources that the current user is not allowed to see. Because rendering the HTML can cause queries, the complexity of a these fields is raised by 5 above the default. The markdown field helper can be used as follows: ``` markdown_field :note_html, null: false ``` This would generate a field that will render the markdown field `note` of the model. This could be overridden by adding the `method:` argument. Passing a symbol for the method name: ``` markdown_field :body_html, null: false, method: :note ``` It will have this description by default: > The GitLab Flavored Markdown rendering of `note` This could be overridden by passing a `description:` argument. The type of a `markdown_field` is always `GraphQL::STRING_TYPE`.
* Merge branch 'fix/facivon-url-if-uploads-object-store-enabled' into 'master'Stan Hu2019-06-201-6/+2
|\ | | | | | | | | fix(favicon): get favicon_path, so it works also with uploads object store See merge request gitlab-org/gitlab-ce!29482
| * fix(favicon): get favicon_path, so it works also with uploads object storeRoger Meier2019-06-141-6/+2
| |
* | Updating CE repo to include new EE users API changesMichael Leopard2019-06-191-14/+1
| | | | | | | | | | Updated users API documentation Moved API level changes to the service level
* | CE backport for changes in EE MR 14017Luke Duncalfe2019-06-191-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This backports to CE changes to allow the EE model DesignManagement::Repository to override the #attributes_at method to provide its own git attributes. The #attributes_at method was freely available, as it's never called by anything in the app. It looks like the code that called it got refactored out of existence in ca66a04f. It was still being called in a spec https://gitlab.com/gitlab-org/gitlab-ce/blob/85b29c1c2fa3b94d7371cf454c485457a0756cb1/spec/services/files/create_service_spec.rb#L40 which I've left because with the change in Lfs::FileTransformer in fact is now again the perfect test! See EE MR https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/14017 And these comment threads https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/13894#note_178002089 https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/13894#note_178049984
* | Merge branch 'pderichs-52123' into 'master'Robert Speicher2019-06-195-29/+31
|\ \ | | | | | | | | | | | | Use NotesFinder to get Noteable See merge request gitlab-org/gitlab-ce!28205
| * | Simplify result of find_noteablepderichs-52123Patrick Derichs2019-06-191-3/+1
| | |
| * | Use NotesFinder to fetch notes on API and ControllersPatrick Derichs2019-06-195-28/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix missing iid query on NotesFinder Changed parameters of find_noteable, so changes across a few files were needed. MergeRequest also requires iid instead of id query Make NotesFinder fail with RecordNotFound again Add specs for target_iid Using RSpec tablesyntax for target_iid specs Revert "Using RSpec tablesyntax for target_iid specs" This reverts commit ba45c7f569a. Allow find_by! here Fix variable name Add readable check Revert "Add readable check" This reverts commit 9e3a1a7aa39. Remove unnecessary assignment Add required changes for EE Fix parameter count Reduce code duplication by extracting a noteable module method The call to find_noteable was redundant so multiple files and lines have changed in that commit to use the newly introduced module method `noteable`. Replace casecmp with include check Add parent_type parameter Revert "Reduce code duplication by extracting a noteable module method" This reverts commit 8c0923babff16. Method is no longer needed Check whether noteable can be read by user
* | | Merge branch 'pj/fix-emacs-style' into 'master'Lin Jen-Shin2019-06-191-1/+4
|\ \ \ | | | | | | | | | | | | | | | | Fix syntax coloring on emacs See merge request gitlab-org/gitlab-ce!29844
| * | | Use correct arg namepjaspers2019-06-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So funny story, true story. I tried to run the test locally, but didn't make it past setting up Gitaly. Here's what I tried: First attempt: `git clone gitlab-ce` `cd gitlab-ce && bundle install` `be rspec` This didn't work because I was missing the config/database.yml, I didn't see a `script/bootstrap` so I looked in the readme which redirected me to a webpage which redirected me to the gitlab-development-kit. Second attempt: `gem install gitlab-development-kit` cd gitlab-development-kit gdk init gdk isntall This broke somwhere along the way because it couldn't install Gitaly because my go version was too low. But it did clone the gitlab repo again and this time it did have a config/database.yml. So I tried to cd into it and `be rspec spec/lib/gitlab/database/migration_helpers_spec.rb` which complained about the database not being configured so I: - Changed the socket to localhost (in the config/database.yml) - `createdb <dev_db>` `createdb test_db` - `be rake db:test:prepare` Great success, it was doing things! But then failed when it came at the Gitaly step. Since I only want to change these three lines, at the point I gave up and entrusted the pipeline to do its thing. What I would have liked: - A 'It's a Rails system, I know this' readme/docs (It's in there somewhere just couldn't find it) - A way to run tests without having to use Gitaly - Not having too install all the things for a small fix (I get why'd you want this, but to me it's overkill)
| * | | Fix syntax coloring on emacspjaspers2019-06-191-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The rather cryptic: "fk_#{Digest::SHA256.hexdigest("#{table}_#{column}_fk").first(10)}" Was too much for emacs too handle*, since it was coming from the Rails codebase I took their way of doing the same thing and applied it here. I think it's easier to read and it also makes emacs render the migration helpers pretty again. * not true, emacs can handle anything, leave emacs alone!
* | | | Merge branch '63417-add-missing-class' into 'master'Kamil Trzciński2019-06-191-1/+1
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | Adds missing class in collapsible sections Closes #63417 See merge request gitlab-org/gitlab-ce!29804
| * | | Adds missing class63417-add-missing-classFilipa Lacerda2019-06-191-1/+1
| | | | | | | | | | | | | | | | | | | | Will apply identation from CSS to collapsible sections
* | | | Add documentation and testsManoj MJ2019-06-194-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds - feature specs - to test the ability of a user with "developer" permission to delete tags in repositories. - documentation
* | | | Fix Container Scanning job with K8S runnersPhilippe Lafoucrière2019-06-191-1/+1
| | | |
* | | | Adds identity information while making external authorization requestsManoj MJ2019-06-191-1/+2
| | | | | | | | | | | | | | | | Issue: https://gitlab.com/gitlab-org/gitlab-ce/issues/61201#
* | | | Merge branch 'fix-microsoft-teams-notification-flags' into 'master'Stan Hu2019-06-191-2/+3
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Fix missing API notification flags for Microsoft Teams See merge request gitlab-org/gitlab-ce!29824
| * | | | 59702 Fix API notification flags for MS TeamsSeiji Suenaga2019-06-181-2/+3
| | | | |
* | | | | Merge branch 'remove-support-for-app-label-matching' into 'master'Ash McKenzie2019-06-191-6/+1
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Remove support for app label matching See merge request gitlab-org/gitlab-ce!29460
| * | | | | Stop matching on legacy app labelThong Kuah2019-06-191-6/+1
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | From now on, only match on the annotations, instead of falling back to legacy app label. This enables users to use the app label for other purposes such as helm charts.
* | | | | Merge branch 'sh-cache-feature-flag-names' into 'master'Thong Kuah2019-06-181-1/+6
|\ \ \ \ \ | |_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | Cache feature flag names in Redis for a minute Closes #63435 See merge request gitlab-org/gitlab-ce!29816
| * | | | Cache feature flag names in Redis for a minuteStan Hu2019-06-181-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We saw on GitLab.com, the SQL query, `SELECT "features"."key" FROM "features"` peaked at 2300 times per second. We can quiet this down a bit by caching it in Redis for a minute. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/63435
* | | | | Add 2nd response for container api bulk deleteSteve Abrams2019-06-181-0/+10
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | The bulk delete api endpoint for container registries can only be called once per hour. If a user calls the endpoint more than once per hour, they will now receive a 400 error with a descriptive message.
* | | | #57815 Password authentication disabled for UltraAuth usersKartikey Tanna2019-06-181-0/+4
| | | | | | | | | | | | | | | | | | | | Disabled password authentication for the users registered using omniauth-ultraauth strategy
* | | | Merge branch 'mc/bug/old-codequality-template-autodevops' into 'master'63415-error-when-viewing-page-2-or-later-of-elasticsearch-search-resultsLin Jen-Shin2019-06-182-24/+12
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | Use new Code Quality job definition in Auto DevOps See merge request gitlab-org/gitlab-ce!29475
| * | | Refactor Code Quality templates into single filemc/bug/old-codequality-template-autodevopsMatija Čupić2019-06-142-24/+12
| | | |
* | | | Turn on Cat-File cache by defaultZeger-Jan van de Weg2019-06-183-10/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The feature flag has been introduced an was turned off by default, now the it will default to be turned on. That change would still allow users to turn this feature off by leveraging the Rails console by running: `Feature.disable("gitaly_catfile-cache")` Another option is to manage the number of items the LRU cache will contain, by updating the `config.toml` for Gitaly. This would be the `catfile_cache_size`: https://gitlab.com/gitlab-org/gitaly/blob/0dcb5c579e63754f557aef91a4fa7a00e5b8b127/config.toml.example#L27 Closes: https://gitlab.com/gitlab-org/gitaly/issues/1712
* | | | Move Gitaly feature flag logic to Feature::GitalyZeger-Jan van de Weg2019-06-182-18/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The GitalyClient held a lot of logic which was all very tightly coupled. In this instance the feature logic was extracted to make it do just a little less and create a bit more focus in the GitalyClient's responsibilies.
* | | | Introduce default: for gitlab-ci.ymlKamil Trzciński2019-06-1810-131/+314
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This moves all existing `image/services/before_script/variables` into `default:`. This allows us to easily add a default and top-level entries. `default`: is keep backward compatible: to be considered to be job if `default:script:` is specified. This behavior should be removed. All existing `image/services/before_script/variables` are properly handled in root context.
* | | | Merge branch 'asciidoctor-upgrade' into 'master'Douwe Maan2019-06-181-6/+3
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upgrade asciidoctor version to 2.0.10 and change method names in html5_converter Closes #63304 See merge request gitlab-org/gitlab-ce!29741
| * | | | Add changelog for the upgraderaju2492019-06-171-1/+0
| | | | |
| * | | | Revert to old name as its not needed to change and keep same in both filesraju2492019-06-172-2/+2
| | | | |
| * | | | Change asciidoc.rb to refer new backend nameraju2492019-06-171-1/+1
| | | | |
| * | | | Use same backend name, and remove reduntant use of requireraju2492019-06-171-2/+1
| | | | |
| * | | | Upgrade asciidoctor version to 2.0.10 and change menthod names in ↵raju2492019-06-171-4/+3
| | | | | | | | | | | | | | | | | | | | html5_converter
* | | | | Merge branch 'mc/feature/required-template-inclusion-single-commit-ce' into ↵Grzegorz Bizon2019-06-181-3/+12
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'master' Enforce template inclusion in pipelines - CE See merge request gitlab-org/gitlab-ce!29296
| * | | | | Backport CE changesmc/feature/required-template-inclusion-single-commit-ceMatija Čupić2019-06-171-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backports CE changes from https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/14011/
* | | | | | Merge branch '56737-commits-and-mr-events-on-jira-api' into 'master'Stan Hu2019-06-171-1/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Expose currently supported events properly on services API Closes #56737 See merge request gitlab-org/gitlab-ce!29736
| * | | | | | 56737 Expose currently supported events properly on services APIZsolt Kovari2019-06-161-1/+1
| | |/ / / / | |/| | | |
* | | | | | Merge branch '55362-refresh-blank-service-account-token' into 'master'Thong Kuah2019-06-171-1/+1
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | | | | | | | | | | | | | | Refresh service_account_token for kubernetes_namespaces See merge request gitlab-org/gitlab-ce!29657
| * | | | | Refresh service_account_token for kubernetes_namespaces55362-refresh-blank-service-account-tokenDylan Griffith2019-06-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There seems to be several examples where service_account_token is blank even in GitLab.com newly created kubernetes_namespaces . We have not figured out why they are blank but this should hopefully fix some issues similar to https://gitlab.com/gitlab-org/gitlab-ce/issues/55362
* | | | | | Merge branch 'generate-spans-for-sections' into 'master'Sean McGivern2019-06-171-12/+75
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add collapsible sections to job log See merge request gitlab-org/gitlab-ce!28642
| * | | | | | Remove unused lineFabio Pitino2019-06-171-1/+0
| | | | | | |
| * | | | | | Compact syntax for default class namesFabio Pitino2019-06-171-5/+3
| | | | | | |
| * | | | | | Fix integration specs for tracingFabio Pitino2019-06-141-0/+2
| | | | | | |
| * | | | | | Merge branch 'generate-spans-for-sections' of ↵Fabio Pitino2019-06-141-1/+1
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | https://gitlab.com/gitlab-org/gitlab-ce into generate-spans-for-sections
| | * | | | | | Update class namesFilipa Lacerda2019-06-141-1/+1
| | | | | | | |
| * | | | | | | Fixing specsFabio Pitino2019-06-141-2/+5
| |/ / / / / /
| * | | | | | Adds margins to the section linesFilipa Lacerda2019-06-121-4/+4
| | | | | | |