Commit Graph
4035 Commits
Author SHA1 Message Date
Douwe Maan bbbfdba0b9 Merge branch 'bugagazavr/gitlab-ce-extend-hooks' into 'master'
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
2016-02-16 13:08:36 +00:00
Douwe Maan 42d088fcb1 Merge branch 'fix/cross-reference-notes-forks' into 'master'
Fix cross reference notes  on forks

Updates `cross_reference_exists?` to match on commit only.

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/5849

See merge request !2731
2016-02-16 11:47:46 +00:00
Douwe Maan 8db62f2548 Merge branch 'rs-issue-13467' into 'master'
Ensure Commit#show responds 404 instead of 500 when given an invalid ID

Closes #13467

See merge request !2823
2016-02-16 11:40:06 +00:00
James Lopez 11913a762a updated system note service and spec based on feedback 2016-02-16 09:01:56 +01:00
Robert Speicher f5ab126fd0 Ensure Commit#show responds 404 instead of 500 when given an invalid ID
Closes #13467
2016-02-15 15:48:16 -05:00
Robert Speicher 447568d15f Fix undefined method postgresql? during migration 2016-02-15 14:13:47 -05:00
Douwe Maan 39b4e98631 Merge branch 'fix/ci-emails-broken-link' into 'master'
Fix broken link in CI build notification emails

Closes #13199

See merge request !2785
2016-02-13 17:17:40 +00:00
James Lopez 99a50447a1 fix rubocop warning 2016-02-12 18:21:01 +01:00
James Lopez 4089be8fed woo hoo - getting there with the cross-reference issue. Should fix the problem and updated spec 2016-02-12 18:01:47 +01:00
Ben BoeckelandRémy Coutable e919b5a4e9 Fix relative links in other markup formats
- Apply the RelativeLinkFilter filter to other formats, e.g.,
  reStructuredText so links from the Files view or the Project view work
- Remove the AsciidocPipeline pipeline

Fixes #3533.
2016-02-12 17:20:59 +01:00
Grzegorz Bizon c0033e96ba Move profile notifications specs to separate file 2016-02-12 14:01:28 +01:00
Grzegorz Bizon 055ec4dc0a Move build emails specs to separate file
This also extracts shared examples for notification emails to separate
file.
2016-02-12 14:01:28 +01:00
Grzegorz Bizon c9f202b2ef Fix broken link in CI build notification emails
Closes #13199
2016-02-12 14:01:27 +01:00
James Lopez a5b011c9d8 Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into fix/cross-reference-notes-forks 2016-02-12 12:21:04 +01:00
Douwe Maan 2afd95a025 Merge branch 'streamline-email-validation' into 'master'
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
2016-02-12 09:09:23 +00:00
Douwe Maan 0807bd5130 Merge branch 'skakirill/gitlab-ce-api-merge-request-setup-milestone' into 'master'
API: Allow to set or update a merge-request's milestone

_Originally opened at !2107 by @ skakirill._

- - -


See merge request !2755
2016-02-12 08:39:18 +00:00
Rémy Coutable 973a7d040e Merge branch 'Schniz/gitlab-ce-feature/merge-request-closes-issues-in-api' into 'master'
Add merge_requests/:merge_request_id/closes_issues

_Originally opened at !2660 by @Schniz._

- - -

Added `/api/v3/projects/:id/merge_requests/:merge_request_id/closes_issues` route in the API for getting the issues that should be closed when a merge request merged successfully

See merge request !2779
2016-02-11 17:13:36 +00:00
Kirill ZaitsevandRémy Coutable b123171d3d Add new data to project in push, issue, merge-request and note webhooks data
- 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
2016-02-11 17:22:11 +01:00
Rémy Coutable b91d1890a8 Pass current_user to merge_request.closes_issues in API ans streamline MR API specs 2016-02-11 09:34:07 +01:00
Gal SchlezingerandRémy Coutable 78e36780be Added '/api/v3/projects/:id/merge_requests/:merge_request_id/closes_issues' route in the API
Added some documentation for it

Added to changelog

Added curl example and an attribute table

Moved the api route definition from "lib/api/issues.rb" to "lib/api/merge_requests.rb"

Fixed the attributes and changed the documentation to be at "merge_requests.md" too

Changed generic titles to more specific titles

added an underscore

added tests. it depends on a newer version of gitlab-test project
I'm doing a  since I need to add a branch to the `gitlab-test` repo

removed the before

using 'iid' instead of 'id' in the description to reference the issues. that makes the tests pass

Removed the 'closes-issues' key from test_env. so it should pass the tests

Moved the two initializations to the describe block

Changed the changelog
2016-02-11 09:34:07 +01:00
Robert Speicher 42607a7f17 Merge branch 'brammeleman/3047-add-assignee-data-to-isuable-hook-data' into 'master'
Add assignee data to Issuables' hook_data

Originally opened at !1633 by @brammeleman.

Fixes #3047. Fixes #2475.

See merge request !2724
2016-02-10 21:26:01 +00:00
Robert Speicher 51998fddca Merge branch 'cwq1913/gitlab-ce-fix_skip_merge_commits' into 'master'
Actually use the `skip_merges` option in Repository#commits

Originally opened at !2067 by @cwq1913.

See merge request !2750
2016-02-10 19:01:44 +00:00
James Lopez 3753c1e03e Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into fix/cross-reference-notes-forks 2016-02-10 14:56:27 +01:00
Bram DaamsandRémy Coutable d146d9fd83 Add assignee data to Issuables' hook_data 2016-02-10 09:40:00 +01:00
Douwe Maan 883bbd61ca Merge branch 'smarter-diverging-commit-cache-flushing' into 'master'
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
2016-02-09 17:19:12 +00:00
Rémy Coutable b34963bc12 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
2016-02-09 18:15:35 +01:00
Robert Speicher 7ea60fbfc8 Merge remote-tracking branch 'dev/master' into 'master' 2016-02-09 12:13:58 -05:00
Yorick Peterse 2ce0d06389 Smarter flushing of branch statistics caches
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.
2016-02-09 17:17:56 +01:00
Douwe Maan 6b0801d4f3 Merge branch 'develop7/add-merge_status-to-merge-request-in-api' into 'master'
Expose MergeRequest#merge_status

_Originally opened at !2478 by @develop7._

- - -

This enables API users to see whether a merge request can be merged without conflicts.

See merge request !2756
2016-02-09 16:01:20 +00:00
Douwe Maan f86ff1b833 Merge branch 'fix/max-attachment-size-setting-validation' 2016-02-09 16:52:20 +01:00
Douwe Maan 706b101f51 Merge branch 'huacnlee/gitlab-ce-feature/option-to-include-author-info-in-mail' into 'master'
Add option to include the sender name in body of Notify email

_Originally opened at !2495 by @huacnlee._

- - -

Fixes #7824.

See merge request !2767
2016-02-09 14:12:56 +00:00
Douwe Maan 643c61867c Merge branch 'zj/gitlab-ce-unique-milestone-title-per-project' 2016-02-09 13:15:37 +01:00
Jason LeeandRémy Coutable 9474e36f46 Add option to include the sender name in body of Notify email. fix #7824 2016-02-09 12:58:13 +01:00
Grzegorz Bizon 1cbc75b53c Validate maximum attachment size in application settings
`max_attachment_size` in `ApplicationSetting` should be present,
only integers greater than zero are valid.

Closes #13188
2016-02-09 12:11:16 +01:00
Yorick Peterse 366f617ecf Merge branch 'caching-repository-git-operations' into 'master'
See merge request !2752
2016-02-09 09:39:20 +00:00
Rémy Coutable 2d59a0ff44 Add a spec for setting/updating a MR's milestone via the API 2016-02-09 10:06:26 +01:00
Kamil Trzciński 7383453b78 Merge branch 'ci/improve-ci-build-api' into 'master'
Improve CI builds API specs

This modifies a CI Runners Builds API, to improve performance, and add few missing examples.
Extracted from !2560 (cherry-picked + extended).

cc @ayufan 

See merge request !2698
2016-02-09 08:50:49 +00:00
Robert Speicher 201fb4c7e3 Merge branch 'ci-permissions' into 'master'
Limit guest access to builds

Closes https://dev.gitlab.org/gitlab/gitlabhq/issues/2646

See merge request !1942
2016-02-08 23:33:44 +00:00
Rémy Coutable f6a666bdc2 Add an API spec for MergeRequest#merge_status and properly document this resource 2016-02-08 17:18:44 +01:00
Yorick Peterse 9a99d8e49d Cache various Repository Git operations
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.
2016-02-08 15:40:19 +01:00
Rémy Coutable 9fdd605fd2 Merge branch 'kkm/gitlab-ce-user-diff-view-pref-cookie' into 'master'
Remember user's inline/tabular diff view preference in a cookie

_Originally opened at !1677 by @kkm._

---

As per #3071, some users (we have a local EE installation) prefer 2-column view in diff. In this MR I add an implementation for this feature, using a cookie.

Fixes #3071.

See merge request !2723
2016-02-08 13:34:58 +00:00
Zeger-Jan van de Weg 308c967d0d Validate uniqueness of milestone title per project
Fixes #3903
2016-02-08 12:45:32 +01:00
Tony ChuandRémy Coutable b62cdc3c47 Actually use the skip_merges option in Repository#commits 2016-02-08 12:15:42 +01:00
Kamil Trzcinski 311f407651 Fix commit status tests 2016-02-06 15:01:37 +01:00
Robert Speicher 551ce0f245 Add spec for assigning view param from cookie 2016-02-05 16:03:20 -05:00
Phil Hughes b724f0871a Project dropdown test span -> i 2016-02-05 20:08:28 +00:00
Kamil Trzcinski 170ca8435a Merge branch 'master' into ci-permissions
# Conflicts:
#	db/schema.rb
2016-02-05 20:15:32 +01:00
Phil Hughes 0a094cb1df Changed the project switcher dropdown toggle
Moved the positioning of the dropdown to be more aligned with the title

Closes #13219 and #13214
2016-02-05 18:56:37 +00:00
James Lopez a64d881bac fixed spec - at last! 2016-02-05 17:43:05 +01:00
Rémy Coutable f6d816f9fe Add a controller test for the new 'diff_view' cookie 2016-02-05 15:40:44 +01:00