Commit Graph
1064 Commits
Author SHA1 Message Date
Douwe Maan 6ce25e7b4c Rename MergeRequest methods that return commits or shas to be more clear and consistent 2016-07-06 18:50:58 -04:00
Douglas Barbosa Alexandre e186626d25 Allow '?', or '&' for label titles 2016-07-05 20:57:09 -03:00
Patricio Cano fbaabb3911 Rename enabled_git_access_protocols to singular. 2016-07-05 16:54:22 -05:00
Patricio Cano 42fb2516d9 Add more tests to the allowed protocols feature 2016-07-05 16:54:22 -05:00
Lin Jen-Shin 36a73929df Use describe rather than context for this:
Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4964/diffs#note_12867416

Guidelines:
https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/testing.md#general-guidelines

> Use `context` to test branching logic.
2016-07-04 23:05:05 +08:00
Lin Jen-Shin 596f46881f Merge remote-tracking branch 'upstream/master' into save-artifacts_sizes
* upstream/master: (175 commits)
  Document Repository#keep_around
  Don't garbage collect commits that have related DB records like comments
  Update CHANGELOG
  Update RedCloth to 4.3.2 for CVE-2012-6684
  Fix typo in Merge Requests API documentation
  Downgrade to Redis 3.2.2 due to massive memory leak with Sidekiq
  Enable Style/EmptyLines cop, remove redundant ones
  Update CHANGELOG
  Cache results from jQuery selectors to retrieve namespace name
  Fix import button when import fail due the namespace already been taken
  Fix snippets comments not displayed
  Fix emoji paths in relative root configurations
  Exclude requesters from Project#members, Group#members and User#members
  Upgrade Thin from 1.6.1 to 1.7.0.
  Many squashed commits
  Cache autocomplete results
  Upgrade Sidekiq from 4.1.2 to 4.1.4.
  Upgrade seed-fu from 2.3.5 to 2.3.6
  use has_many relationship with events
  Support creating a todo on issuables via API
  ...
2016-07-04 19:14:54 +08:00
Lin Jen-Shin 79d7e71487 Use describe rather than context, feedback from:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4964#note_12861588
2016-07-04 19:06:34 +08:00
Lin Jen-Shin 7cc6a703f6 Rename to "successful artifacts upload", feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4964#note_12861577
2016-07-04 19:04:51 +08:00
Douwe Maan fc3402b7ea Merge branch 'git-http-kerberos-ce' into 'master'
Groundwork for Kerberos SPNEGO (EE feature)

Refactor Projecst::GitHttpController to allow Kerberos integration in GitLab EE.

Companion to https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/509

See merge request !5037
2016-07-01 22:24:49 +00:00
Grzegorz Bizon 9e211091a8 Enable Style/EmptyLines cop, remove redundant ones 2016-07-01 21:56:17 +02:00
Robert Schilling 87ac9c9850 Support creating a todo on issuables via API 2016-07-01 14:52:04 +02:00
Robert Schilling 3942621329 Expose target, filter by state as string 2016-07-01 14:52:04 +02:00
Jacob Vosmaer 4bcad1cbdd Groundwork for Kerberos SPNEGO (EE feature) 2016-07-01 11:46:56 +02:00
Robert Schilling 631765748e Expose action_name 2016-07-01 10:49:34 +02:00
Robert Schilling 69397d559f Assert response body 2016-07-01 10:49:34 +02:00
Robert Schilling f3abd18c9c Add user to project to see todos 2016-07-01 10:49:34 +02:00
Robert Schilling b94088d512 Make tests follow the guidelines 2016-07-01 10:49:34 +02:00
Douglas Barbosa AlexandreandRobert Schilling a1f224d3f7 Add Todos API 2016-07-01 10:49:34 +02:00
Lin Jen-Shin ef960286e5 Rename shared_examples, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4964#note_12817406
2016-07-01 14:30:39 +08:00
Lin Jen-Shin 7b06acea1c Use nil for non-existing files rather than 0 2016-07-01 00:00:35 +08:00
Alejandro Rodríguez 4a8a69837a Add Application Setting to configure default Repository Path for new projects 2016-06-29 23:35:00 -04:00
Alejandro Rodríguez 86359ec854 Refactor repository paths handling to allow multiple git mount points 2016-06-29 22:30:31 -04:00
Grzegorz Bizon 28bafd5354 Enable Style/SpaceAfterComma Rubocop cop 2016-06-29 15:23:44 +02:00
Lin Jen-Shin 9d8dca08e4 Use AR callbacks as suggested by:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4964#note_12744656
2016-06-29 17:44:39 +08:00
Lin Jen-Shin 1bc0d732f6 Also remove ci_builds.artifacts_size when erased 2016-06-28 20:37:46 +08:00
Lin Jen-Shin 0a294698db Just save the size in total rather than individual files
Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4964#note_12741046
2016-06-28 11:16:48 +00:00
Grzegorz Bizon b9b95a9f19 Improve commit builds API endpoint RESTful behavior
1. Return 404 if commit is not found (RESTful resource not found)
2. Return an empty array if pipeline is not found (resource present, no
   associated builds found)
3. Return an empty array if pipeline found but no builds there (resource
   present, no associated builds)
2016-06-28 12:22:31 +02:00
Lin Jen-Shin fe0c59d2e6 Introduce ci_builds.artifacts_sizes as JSON:
We store the sizes as a hash from path to bytes like:

``` ruby
{'ci_artifacts.txt' => 27,
 'other_artifacts_0.1.2/another-subdirectory/banana_sample.gif' =>
71759,
 'other_artifacts_0.1.2/doc_sample.txt' => 1314,
 'rails_sample.jpg' => 35255,
 'tests_encoding/utf8 test dir ✓/regular_file_2' => 7}
```

So that it's easier to access than reading gzip file again.
2016-06-28 18:14:21 +08:00
Grzegorz Bizon 8e66618749 Find all builds for commit if multiple pipelines 2016-06-28 11:34:49 +02:00
Lin Jen-Shin aa3a3fd12f Cleanup the tests a bit in order to extend it 2016-06-28 16:46:16 +08:00
Drew Blessing 1910fd05ae Rename Licenses API to License Templates API 2016-06-27 14:42:05 -05:00
Z.J. van de Weg abca19da8b Use HTTP matchers if possible 2016-06-27 20:10:42 +02:00
Marc Siegfriedt 6587feba65 gitlab-org/gitlab-ce#17818 - add api call for issues by group
rely only on IssuesFinder
docs and changelog
2016-06-23 16:31:48 +00:00
Grzegorz Bizon dd08202a24 Fix builds API response not including commit data 2016-06-21 14:26:57 +02:00
Jacob Schatz 0d287b06a6 Merge branch '17521-gitlab-ci-yml-templates' into 'master'
GitLab CI Yaml template dropdown

## What does this MR do?
Make it possible to select a dropdown for an easy start with GitLab CI.

## What are the relevant issue numbers?
Closes #17521

## TODO
- [ ] Backend
  - [x] CHANGELOG item
  - [x] Fix rubocop failure
  - [x] API Support
  - [x] New tests
  - [x] Add disclaimer to the top of the gitlab-ci.yml
- [ ] Frontend
  - [x] New tests

See merge request !4411
2016-06-21 10:56:41 +00:00
Z.J. van de WegandAlfredo Sumaran 483dc62eaa Incorporate review 2016-06-20 14:48:28 -05:00
Z.J. van de WegandAlfredo Sumaran 620d014aef Implement backend gitlab ci dropdown
This commit builds on the groundwork in
ee008e300b1ec0abcc90e6a30816ec0754cea0dd, which refactored the backend
so the same code could be used for new dropdowns. In this commit its
used for templates for the `.gitlab-ci.yml` files.
2016-06-20 14:48:28 -05:00
ZJ van de WegandAlfredo Sumaran 27bf7ae59e Refactor Gitlab::Gitignores 2016-06-20 14:48:28 -05:00
Lin Jen-Shin aeb24ee872 Merge remote-tracking branch 'upstream/master' into feature/runner-lock-on-project
* upstream/master: (353 commits)
  Put some admin settings in dropdown
  Add styleguide on configuration settings documentation
  Remove Duplicated keys add UNIQUE index to fingerprint
  Avoid autoload issue such as 'Mail::Parsers::AddressStruct'
  Move appearance settings as sub tab to application settings
  use rails root join
  fixed a couple of errors spotted in production
  Fix RangeError exceptions when referring to issues or merge requests outside of max database values
  Fix bug in `WikiLinkFilter`.
  Grammar and typographic changes to artifacts documentation
  Tweak grammar
  Small frontend code fixes and restore 8a2d88f commit
  Warn about admin privilege to disable GitHub Webhooks
  Listing GH Webhooks doesn't stop import process for non GH admin users
  fixup! updated docs for api endpoint award emoji
  Update CHANGELOG
  Ensure Todos counters doesn't count Todos for projects pending delete
  Add endpoints for award emoji on notes
  Sort API endpoints and implement feedback
  Add endpoints for Award Emoji
  ...
2016-06-20 14:04:14 +00:00
Douwe Maan 00906b5bb6 Merge branch 'issue_12758' into 'master'
Implement custom notification level options

![Screen_Shot_2016-06-17_at_15.31.43](/uploads/3fc47d2f461b3e8b67bb8acaa304cf99/Screen_Shot_2016-06-17_at_15.31.43.png)

![Screenshot_from_2016-06-15_10-52-27](/uploads/88dbdd21d97e80ee772fe08fa0c9b393/Screenshot_from_2016-06-15_10-52-27.png)

part of #12758 

See merge request !4389
2016-06-17 23:28:22 +00:00
Z.J. van de Weg e0bdcd2f2f fixup! updated docs for api endpoint award emoji 2016-06-17 22:03:57 +02:00
Z.J. van de Weg 05a4a586b5 Add endpoints for award emoji on notes
Docs also added.
2016-06-17 21:02:51 +02:00
Z.J. van de Weg 3f88221c2d Add endpoints for Award Emoji
This only supports Issues and MergeRequests right now because of the
consistency of the routes those models provide.
2016-06-17 20:07:17 +02:00
Felipe Artur e5aa902860 Merge master into issue_12758 2016-06-17 14:29:11 -03:00
Patricio Cano 8ad1884505 Fixed Rubocop error 2016-06-17 11:16:25 -05:00
Lin Jen-Shin 5174d6c146 Merge remote-tracking branch 'upstream/master' into feature/runner-lock-on-project
* upstream/master: (337 commits)
  Update CHANGELOG for !4659
  Center the header logo for all Devise emails
  Add previews for all customized Devise emails
  Customize the Devise `unlock_instructions` email
  Customize the Devise `reset_password_instructions` email
  Customize the Devise `password_change` emails
  Use gitlab-git 10.2.0
  Use Git cached counters on project show page
  Fix indentation scss-lint errors
  Added title attribute to enties in tree view Closes #18353
  Banzai::Filter::ExternalLinkFilter use XPath
  Reduce queries in IssueReferenceFilter
  Use gitlab_git 10.1.4
  Fixed ordering in Project.find_with_namespace
  Fix images in emails
  Banzai::Filter::UploadLinkFilter use XPath
  Turn Group#owners into a has_many association
  Make project_id nullable
  CHANGELOG [ci skip]
  CHANGELOG [ci skip]
  ...
2016-06-17 19:52:55 +08:00
Felipe Artur 33c61bd461 Re-use notifications dropdown/modal for user profile 2016-06-17 00:17:20 -03:00
Timothy Andrew 9d7cda3ddc Fix api_helpers_spec 2016-06-16 12:28:31 +05:30
Timothy Andrew 90bba2bc46 Merge remote-tracking branch 'origin/master' into 2979-personal-access-tokens 2016-06-16 08:27:37 +05:30
Douwe Maan 8249fdcd47 Merge branch '18451-track-new-redis-connections' into 'master'
Resolve "Track the number of new Redis connections per transaction"

## What does this MR do?

Add a new metric counter, `new_redis_connections`, that contains the number of calls to `Redis::Client#connect` in the current transaction.

## Are there points in the code the reviewer needs to double check?

Not sure. I tested this in kind of a brute-force way:

1. Add a debugger in the monkey-patched `connect` method.
2. With metrics enabled, start the app and load a page.
3. The first Redis connection is created by `Rack::Attack` and isn't in a transaction, but still works fine.
4. The second Redis connection is within a transaction (the page load), and increments the counter.
5. If I reload the page, neither debugger is hit.
6. If I use a Redis client and do `CLIENT KILL` on my two existing clients, then reload the page, I get 3 and 4 again.
7. If I disable metrics collection, the debugger never gets hit.

## Why was this MR needed?

We may have a Redis connection leak somewhere, so adding metrics will let us track this.

## What are the relevant issue numbers?

Closes #18451.

## Screenshots (if relevant)

Hahaha nope, not relevant.

## Does this MR meet the acceptance criteria?

- [ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- [ ] Tests
  - [ ] Added for this feature/bug
  - [ ] All builds are passing
- [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [ ] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

cc @yorickpeterse 

See merge request !4649
2016-06-15 09:56:42 +00:00