Commit Graph
969 Commits
Author SHA1 Message Date
Douglas Barbosa Alexandre 28097398c5 Does not raise an error when Todo is already marked as done 2016-02-23 10:43:29 -03:00
Rémy Coutable 96ed5c5114 Ensure we don't check a commit's description for revert message if it has no description 2016-02-22 18:33:02 +01:00
Douglas Barbosa Alexandre 04d1b41258 Merge branch 'tasks' into 'master'
Add Todos

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/2425

Tasks:

-  Prepare database
 - [X] Create a new table (`todos`)
- Tasks Queue view
 - [X] Add a number icon showing the number of todos on the top right next to the new and logout button that will redirect the user to the todos page
 - [X] Add a chronological list of todos, with the 'Todos' tab active by default
 - [X] Add a 'Done' button to each todo
 - [x] Add filters (project, author, type, and action)
- Todos generation
 - [X] When user issue/mr is assgined to someone
 - [x] When user is mentioned on (issues/mr's/comments)
- Mark todo as `done`
 - [X] When clicks on the 'Done' button
 - [X] When edit issue/mr
 - [X] When left/edit a comment
 - [X] When reassign issue/mr
 - [X] When add/remove labels to issue/mr
 - [X] When issue/mr is closed
 - [X] When mr is merged
 - [X] When added an emoji
 - [X] When changed the issue/mr milestone

* Screenshot:

![Screenshot_2016-02-20_12.45.57](/uploads/4b2554b1bde25aed3347e1ae41e8e0c0/Screenshot_2016-02-20_12.45.57.png)

See merge request !2817
2016-02-22 02:36:41 +00:00
Yorick Peterse e0cb3212ed Flush emptiness caches whenever needed
This ensures that the emptiness cache (used for Repository#empty? and
Repository#has_visible_content?) is flushed after comitting changes
(using the web editor, API or Git) for new repositories. Once a
repository is no longer empty there's no need to explicitly flush the
cache for Repository#empty?. The cache for
Repository#has_visible_content? in turn is already flushed whenever
needed.

Fixes gitlab-org/gitlab-ce#13387
2016-02-20 20:17:50 +01:00
Douglas Barbosa Alexandre 3d52e139b1 Rename Tasks to Todos 2016-02-20 12:39:27 -02:00
Douglas Barbosa Alexandre 7200989675 Refactoring task queue partials 2016-02-20 12:12:05 -02:00
Douglas Barbosa Alexandre 8673a70f50 Improve formatted message for tasks when action is a mention 2016-02-20 12:12:05 -02:00
Douglas Barbosa Alexandre a74a69db68 Use destroy, in case we ever have before_destroy callbacks on Task 2016-02-20 12:12:05 -02:00
Douglas Barbosa Alexandre bc54300ce5 Fix task factory 2016-02-20 12:12:05 -02:00
Douglas Barbosa Alexandre b13a73446a Fix pending examples from task model spec 2016-02-20 12:12:05 -02:00
Douglas Barbosa Alexandre 1d476b0656 Create a pending task when a user is mentioned on a note 2016-02-20 12:12:05 -02:00
Douglas Barbosa Alexandre 7cafa2ce92 Add tasks queue list page 2016-02-20 12:10:26 -02:00
Douglas Barbosa Alexandre 41d8f5649e Add task model 2016-02-20 12:10:26 -02:00
Douwe Maan 3a97a5ddfd Merge branch 'rs-blob' into 'master'
Add a `Blob` model that wraps `Gitlab::Git::Blob`

This allows us to take advantage of Rails' `to_partial_path` to render
the correct partial based on the Blob type, rather than cluttering the
view with conditionals.

It also allows (and will allow in the future) better encapsulation for
Blob-related logic which makes sense for our Rails app but might not
make as much sense for the core `gitlab_git` library, such as detecting
if the blob is an SVG.

See merge request !2887
2016-02-20 01:12:52 +00:00
Douwe Maan c352aaa008 Merge branch '12792-emoji-as-text-diff-comment' 2016-02-19 16:59:36 -08:00
Kamil Trzciński 20781b2927 Merge branch 'builds-artifacts-API' into 'master'
Introduce API for serving the artifacts archive

Add API to download build artifacts archive in context of GitLab API

/cc @DouweM @grzesiek 

See merge request !2893
2016-02-19 22:30:11 +00:00
Kamil Trzcinski 73be775cd7 Fix ci_build trace trait 2016-02-19 19:31:57 +01:00
Rubén DávilaandRobert Speicher b8295fc323 Fix build and add specs 2016-02-19 13:14:53 -05:00
Rubén DávilaandRobert Speicher b6fe51b901 Some updates from last code review. 2016-02-19 13:14:50 -05:00
Rubén DávilaandRobert Speicher df5f362c34 Add some specs plus some refactor. 2016-02-19 13:14:50 -05:00
Rubén DávilaandRobert Speicher f56ee9d3b9 Save merge commit id when MR is merged 2016-02-19 13:14:49 -05:00
Grzegorz Bizon 86a49dfb88 Move build erasable implementation from concern to model
Discussion:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/2560#note_3659905
2016-02-19 17:24:59 +01:00
Grzegorz Bizon 293999cabb Fix name of build erasable, remove superfluous method from it 2016-02-19 17:24:59 +01:00
Grzegorz BizonandGrzegorz Bizon 21152d7d51 Use DELETE verb for erasing a build content
Also added API specs for that
2016-02-19 17:24:59 +01:00
Grzegorz BizonandGrzegorz Bizon c850ceec5d Create method that checks if build has been erased
+ minor improvements
2016-02-19 17:24:59 +01:00
Grzegorz BizonandGrzegorz Bizon 2c7f36f430 Update relevant build fields when build is erased 2016-02-19 17:24:59 +01:00
Grzegorz BizonandGrzegorz Bizon f3e92fb4d0 Make CI build eraseable only if build is completed 2016-02-19 17:24:59 +01:00
Grzegorz BizonandGrzegorz Bizon c8102d938b Add build eraseable feature implementation 2016-02-19 17:24:03 +01:00
Grzegorz BizonandGrzegorz Bizon 89b181204c Use build artifacts trait in build specs 2016-02-19 17:24:03 +01:00
Tomasz Maczukin 49d5c35b69 Fix old usages of ci_runner factory 2016-02-19 13:18:49 +01:00
Zeger-Jan van de Weg aba1aa49a9 Improve #set_award! on the Note model 2016-02-19 10:10:55 +01:00
Zeger-Jan van de Weg 11ed1cbbb7 Emoji reponses on diffs aren't award emoji 2016-02-19 10:04:38 +01:00
Robert Speicher 8c454b3624 Add a Blob model that wraps Gitlab::Git::Blob
This allows us to take advantage of Rails' `to_partial_path` to render
the correct partial based on the Blob type, rather than cluttering the
view with conditionals.

It also allows (and will allow in the future) better encapsulation for
Blob-related logic which makes sense for our Rails app but might not
make as much sense for the core `gitlab_git` library, such as detecting
if the blob is an SVG.
2016-02-18 22:45:30 -05:00
Robert Speicher 924463907d Allow ProjectTeam#human_max_access to return "Owner" 2016-02-18 16:39:59 -05:00
Robert Speicher 94a0a00f40 Merge branch 'autocrlf-lazy' into 'master'
Only set autocrlf when creating/updating files

Related issue: gitlab-org/gitlab-ce#13457
Details: 5619a6de1dd6fc1dfd4053810c7b11c677b7a495

See merge request !2859
2016-02-18 19:07:13 +00:00
Yorick Peterse 5b6d347fcd Handle raw_repository returning nil in exists?
If path_with_namespace is nil Repository#raw_repository will also return
nil. Apparently code out there creates a Repository instance without a
namespace path. Right.
2016-02-18 14:19:35 +01:00
Grzegorz Bizon bee26f9c4e Add specs covering bug in build allowed to fail case 2016-02-18 14:08:50 +01:00
Yorick Peterse 8a7aad770c Added specs for Repository#exists? 2016-02-18 12:28:47 +01:00
Yorick Peterse c475b17111 Only set autocrlf when creating/updating files
Setting the "autocrlf" Git option is an overkill since it's rarely
actually needed. More importantly, it has quite the impact on
performance (see gitlab-org/gitlab-ce#13457 for more information).

By setting "autocrlf" when creating or updating files we guarantee the
option is always set properly when we actually need it _without_
introducing overhead for requests that have nothing to do with this
option.

Fixes gitlab-org/gitlab-ce#13457
2016-02-18 11:46:05 +01:00
Yorick Peterse a9e0301c23 Expire caches after forking/importing a repository
This ensures the caches for Repository#empty? and
Repository#has_visible_content? are flushed after a repository has been
imported or forked.

Fixes gitlab-org/gitlab-ce#13505
2016-02-17 11:38:18 +01:00
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 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
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
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
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
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 f86ff1b833 Merge branch 'fix/max-attachment-size-setting-validation' 2016-02-09 16:52:20 +01:00