Commit Graph
164 Commits
Author SHA1 Message Date
Douglas Barbosa Alexandre 9823d00e0b Add ability to see and sort on vote count from Issues and MR lists 2016-02-17 11:32:02 -02: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
Bram DaamsandRémy Coutable d146d9fd83 Add assignee data to Issuables' hook_data 2016-02-10 09:40:00 +01:00
Douwe Maan b6ae2def2c Merge branch 'unsubscribe-from-thread-from-email-footer' into 'master'
Unsubscribe from thread through link in email footer

Closes #3437 

![Screenshot_from_2015-12-11_15-35-06](/uploads/cfb3d8737d4757f527995411f103d0ce/Screenshot_from_2015-12-11_15-35-06.png)

![Screenshot_from_2015-12-11_15-35-56](/uploads/9b7121be7ce4b05e5995ca6d38c5bea4/Screenshot_from_2015-12-11_15-35-56.png)

See merge request !2068
2016-01-14 14:38:55 +00:00
Zeger-Jan van de Weg 58867eff46 Unsubscribe from thread through link in email footer 2016-01-09 12:41:22 +01:00
Yorick Peterse 9dacc3bc56 Sort by ID when sorting using "Recently created"
Sorting by "id" has the same effect as sorting by created_at while
performing far better and without the need of an extra index (in case
one wanted to speed up sorting by "created_at").

Sorting by "Recently updated" still uses the physical "updated_at"
column as there's no way to use the "id" column for this instead.
2016-01-07 14:53:02 +01:00
Douwe Maan 37ce5f312e Fix mentionable reference extraction caching. 2016-01-06 13:33:11 +01:00
Valery Sizov eeba266e3d Merge branch 'upvote_count_to_api' into 'master'
Revert upvotes and downvotes params back to MR API

issue https://gitlab.com/gitlab-org/gitlab-ce/issues/3672

See merge request !2212
2015-12-29 16:07:12 +00:00
Valery Sizov 83d42c1518 Revert upvotes and downvotes params to MR API 2015-12-28 11:41:16 +02:00
Robert Speicher a97a2d2720 Merge branch 'mention-all' into 'master'
Only allow group/project members to mention `@all`

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

See merge request !2205
2015-12-27 21:09:16 +00:00
Robert Speicher ab3d855c0e Add support for twitter:label meta tags 2015-12-24 17:11:08 -05:00
Douwe Maan 672cbbff95 Only allow group/project members to mention @all 2015-12-24 15:33:51 +01:00
Grzegorz Bizon 3e6950481a Use method that creates runners registration token
`runners_registration_token` now creates a new token if it is blank.
2015-12-23 11:45:17 +01:00
Grzegorz Bizon 37731ba1a1 Add method that persist ensured token in TokenAuthenticatable 2015-12-23 10:47:18 +01:00
Grzegorz Bizon 76f7e80455 Fix method that ensures authentication token
Until now, `ensure_#{token_filed_name}` method didn't persist new token in database.

This closes #4235.
2015-12-23 09:37:01 +01:00
Douwe Maan 5ef2048f65 Fix issue related cross-project MRs 2015-12-21 15:36:08 +01:00
Douwe Maan 6ea26ae623 Only cache markdown when object has been saved and has a proper cache_key. 2015-12-16 18:36:14 +01:00
Dmitriy Zaporozhets 40104746d6 Merge remote-tracking branch 'origin/feature/update-rubocop' 2015-12-16 13:44:50 +01:00
Douwe Maan 7781bda9bd Move Markdown/reference logic from Gitlab::Markdown to Banzai 2015-12-15 15:51:16 +01:00
Gabriel Mazetto b5291f9599 Fixed Rubocop offenses 2015-12-15 00:53:52 -02:00
Grzegorz Bizon 917effb737 Make sure that token ensure_* method always returns a token 2015-12-11 14:39:51 +01:00
Grzegorz Bizon d90d3db32b Use save! when generating new token in TokenAuthenticatable 2015-12-11 10:39:39 +01:00
Grzegorz Bizon 9948e5bcdd Refactor TokenAuthenticatable to improve reusability
This adds a ability to use multiple different authentication token
fields in other models. From now on it is necessary to add
authentication token field manually in each class that implements this
mixin.
2015-12-11 10:39:39 +01:00
Douwe Maan d611a38798 Merge branch 'master' into reference-pipeline-and-caching 2015-12-07 14:48:53 +01:00
Douwe Maan 2955ca613b Merge branch 'master' into reference-pipeline-and-caching 2015-12-02 11:20:51 +01:00
Douwe Maan 6dad2bc6e6 Fix referenced_mentionables method. 2015-12-01 16:15:53 +01:00
Douwe Maan 62c14ba2ed Render commit reference using short sha, but include full sha in comment. 2015-12-01 12:58:45 +01:00
Douwe Maan 4a0ebccf6b Fix specs 2015-11-30 22:43:54 +01:00
Douwe Maan d6a5b45c8e Recognize issue/MR/snippet/commit links as references. 2015-11-30 21:36:34 +01:00
Jose Corcuera b9df1a6355 Strip attributes for Milestone and Issuable. #3428 2015-11-26 10:16:50 -05:00
Douwe Maan 761bf63810 Merge branch 'issue_2296' into 'master'
Generate system note after Task item has been updated on Issue or Merge Request.

Reference: #2296 

Everytime the User check or uncheck a Task Item from the Issue or
Merge Request description, a new update is going to be
added to the activity logs of the Issue or Merge Request.

Note that when using the edit form, you can only update the Task item
status or add/delete/modify existing ones. Doing both actions is not
fully supported.

See merge request !1848
2015-11-23 13:09:34 +00:00
Robert Schilling 26b12e2c37 Add upvote/downvote fields to merge request and note API to preserve compatibility 2015-11-21 21:36:31 +01:00
Rubén Dávila 3aabed3456 Fix bug that happened when replacing the Task list. #2296
REF: https://gitlab.com/gitlab-org/gitlab-ce/issues/2296#note_2724697
2015-11-20 13:58:45 -05:00
Rubén Dávila fa9f2dec0e Monkey patching TaskList::Item is no longer required. #2296 2015-11-20 10:49:12 -05:00
Ruben DavilaandRubén Dávila 97afb84b31 Generate system note after Task item has been updated on Issue or Merge Request. #2296
Everytime the User check or uncheck a Task Item from the Issue or
Merge Request description, a new update is going to be
added to the activity logs of the Issue or Merge Request.

Note that when using the edit form, you can only update the Task item
status or add/delete/modify existing ones. Doing both actions is not
fully supported.
2015-11-19 21:05:44 -05:00
Dmitriy Zaporozhets 68d4ab2381 Merge branch 'emoji_votes' into 'master'
Award Emoji

This it first iteration of award emoji feature.
We have plan to extend emoji picker by the next release.

For now, you can add award by clicking to the emoji picker or posting a regular comment with emoji like "👍" and any other. You can post not only emoji that listed in the emoji picker.

See merge request !1825
2015-11-19 21:34:38 +00:00
Douwe Maan f5a630111f Merge branch 'master' into reference-pipeline-and-caching 2015-11-19 15:46:04 +01:00
Yorick Peterse 8591cc02be Use a JOIN in IssuableFinder#by_project
When using IssuableFinder/IssuesFinder to find issues for multiple
projects it's more efficient to use a JOIN + a "WHERE project_id IN"
condition opposed to running a sub-query.

This change means that when finding issues without labels we're now
using the following SQL:

    SELECT issues.*
    FROM issues
    JOIN projects ON projects.id = issues.project_id

    LEFT JOIN label_links ON label_links.target_type = 'Issue'
                          AND label_links.target_id  = issues.id

    WHERE (
        projects.id IN (...)
        OR projects.visibility_level IN (20, 10)
    )
    AND issues.state IN ('opened','reopened')
    AND label_links.id IS NULL
    ORDER BY issues.id DESC;

instead of:

    SELECT issues.*
    FROM issues
    LEFT JOIN label_links ON label_links.target_type = 'Issue'
                          AND label_links.target_id  = issues.id

    WHERE issues.project_id IN (
        SELECT id
        FROM projects
        WHERE id IN (...)
        OR visibility_level IN (20,10)
    )
    AND issues.state IN ('opened','reopened')
    AND label_links.id IS NULL
    ORDER BY issues.id DESC;

The big benefit here is that in the last case PostgreSQL can't properly
use all available indexes. In particular it ends up performing a
sequence scan on the "label_links" table (processing around 290 000
rows). The new query is roughly 2x as fast as the old query.
2015-11-19 11:58:05 +01:00
Valery Sizov fd2c0fe446 award emoji 2015-11-19 01:25:27 +02:00
Yorick Peterse 656d9ff69b Make it easier to re-apply default sort orders
By moving the default sort order into a separate scope (and calling this
from the default scope) we can more easily re-apply a default order
without having to specify the exact column/ordering all over the place.
2015-11-18 13:05:45 +01:00
Yorick Peterse 7eb502c036 Change "recent" scopes to sort by "id"
These scopes can just sort by the "id" column in descending order to
achieve the same result. An added benefit is being able to perform a
backwards index scan (depending on the rest of the final query) instead
of having to actually sort data.
2015-11-11 15:17:12 +01:00
Yorick Peterse 732f5380af Only sort by IDs by default
Sorting by both "created_at" and "id" in descending order is not needed
as simply sorting by "id" in descending order will already sort rows
from new to old. Depending on the query and data involved sorting twice
can also introduce significant overhead.
2015-11-03 11:54:43 +01:00
Douwe Maan c746a1de4e Use faster, more appropriate pipeline for mentionable attributes 2015-10-22 15:40:02 +02:00
Douwe Maan de0acf3cf7 Merge branch 'master' into reference-pipeline-and-caching 2015-10-21 11:36:41 +02:00
Douwe Maan 41615ddde4 Merge branch 'cross-reference-mr-on-issues' into 'master'
Show merge requests which close current issue

Closes #2903

### What does this MR do
If an issue is to be closed by a merge request the current user has access to, this will be displayed when the user looks at the issue.

![Screenshot_from_2015-10-12_12-10-37](https://gitlab.com/zj/gitlab-ce/uploads/52e429704e73067b24b69801f13ad7bc/Screenshot_from_2015-10-12_12-10-37.png)

/cc @DouweM

See merge request !1569
2015-10-18 12:07:28 +00:00
Douwe Maan 34148d1576 Merge branch 'master' into rs-redactor-filter 2015-10-16 11:26:48 +02:00
Zeger-Jan van de Weg 94a788f66d Only accept open issues and merge requests 2015-10-16 09:59:32 +02:00
Douwe Maan 9c2214f202 Remove stray conflict marker 2015-10-15 13:41:10 +02:00
Yorick Peterse 1554786c6a Eager load various issue/note associations
This ensures we don't end up running N+1 queries for the objects in the
affected collections.
2015-10-15 12:05:01 +02:00
Douwe Maan 95f0440a78 Merge branch 'master' into rs-redactor-filter 2015-10-15 11:26:58 +02:00