Commit Graph

920 Commits

Author SHA1 Message Date
Rémy Coutable f5240f9703
Expose MergeRequest#user_notes_count in the API and use the method in issues list
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-05-09 16:08:07 +02:00
cnam-dep 5364400741 API: Expose Issue#user_notes_count 2016-05-09 16:07:35 +02:00
Douwe Maan 6a8359f3d3 Merge branch 'pacoguzman/gitlab-ce-15001-since-and-until-operators-api-commits'
# Conflicts:
#	Gemfile.lock
2016-05-04 17:27:47 +02:00
Robert Speicher c9bc3d20ef Merge remote-tracking branch 'dev/master' into 'master' 2016-05-02 19:58:54 -04:00
Paco Guzman c4b9bd0413 API support for the 'since' and 'until' operators on commit requests
- Parameter validation as ISO8601 format
2016-04-29 09:26:52 +02:00
Stan Hu e99cf05875 Use ActionDispatch Remote IP for Akismet checking
Previously all remote IPs appeared at 127.0.0.1, which made Akismet
not very useful. Using the ActionDispatch Remote IP (http://api.rubyonrails.org/classes/ActionDispatch/RemoteIp.html)
should provide more reliable results.

Closes #16629
2016-04-27 22:12:55 -07:00
Robert Speicher 29a23a4478 Merge branch '15579-filter-milestone-confidential-issues-api' into 'master'
Prevent information disclosure via milestone API

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

See merge request !1961
2016-04-26 00:37:01 +00:00
Stan Hu d5267dfd0d Prevent private snippets in public/internal projects from being leaked via API
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/15580
2016-04-25 12:02:06 -07:00
Stan Hu 03ae2cdbff Filter confidential issues from milestones API if user does not have access
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/15579
2016-04-25 12:20:29 +02:00
Stan Hu 9413dd80f5 Prevent users from deleting Webhooks via API they do not own
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/15576
2016-04-24 23:53:59 -07:00
Kamil Trzciński d240666800 Merge branch 'ci-commit-as-pipeline' into 'master'
Ci::Commit becomes a Pipeline object

1. Ci::Commit receives context: ref, :tag.
1. One Ci::Commit describes a one Pipeline
1. Pipeline is created from `.gitlab-ci.yml`
1. Pipeline is a ordered group of builds
1. We test MR against Pipeline
1. Pipelines have a separate view (https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3703)
1. Pipeline can be triggered from UI (https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3703)
1. Later we change `Trigger -> TriggerRequest -> Build` to `Trigger -> Pipeline` (future)
1. We add a Pipeline Hook that will be triggered on Pipeline status change  (future)
1. We extend notifications to use `Pipeline Hook` to send summary on pipeline changes (future)

After merging that I'll prepare a separate MR that will unify naming, database columns, table names:
```
Ci::Commit -> Pipeline
Ci::Build -> Build
CommitStatus -> Job
GenericCommitStatus -> ExternalJob

ci_commits -> pipelines
ci_builds -> jobs
```

This MR implements first 5 points.

This is made to solve this issue https://gitlab.com/gitlab-org/gitlab-ce/issues/14149.

See merge request !3653
2016-04-21 08:10:37 +00:00
Yorick Peterse a257d117a0
Fix setting of "action" for Grape transactions
Merely setting the "action" tag will only result in the transaction
itself containing a value for this tag. To ensure other metrics also
contain this tag we must set the action using Transaction#action=
instead.
2016-04-20 22:42:52 +02:00
Robert Speicher 3d4875f86a Merge branch 'license-templates-and-api-12804' into 'master'
License templates when creating/editing a LICENSE file

Closes #12804

See merge request !3660
2016-04-20 01:38:49 +00:00
Kamil Trzcinski 27e0c7723c Merge remote-tracking branch 'origin/master' into ci-commit-as-pipeline
# Conflicts:
#	db/schema.rb
2016-04-19 14:00:14 -04:00
Rémy Coutable bfa16dbcfb Merge branch 'api-fix-annotated-tags' into 'master'
API: Present an array of Gitlab::Git::Tag instead of array of rugged tags

The annotated message was always `null` because the wrong array was presented. 

The entity requires an array of `Gitlab::Git::Tags` instead an array of raw rugged tags was presented. Since a rugged tag does not respond to `message` to get the annotated message, this was always `null`. 

See merge request !3764
2016-04-19 12:31:31 +00:00
Rémy Coutable 50bee8e919
Rename License entity to RepoLicense to avoid conflict with EE
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-04-19 11:08:48 +02:00
Yorick Peterse b9698d2b45
Add "action" tag to /internal/allowed API
This allows us to re-use any other analytics that rely on the "action"
tag having a value set.
2016-04-18 17:44:24 +02:00
Felipe Artur 2366768d3b Add changelog entry 2016-04-18 11:12:28 -03:00
Felipe Artur 820c08cefd Fix documentation and improve permissions code 2016-04-18 11:12:28 -03:00
Felipe Artur ce96d482d9 Insert users check into api 2016-04-18 11:12:27 -03:00
Rémy Coutable 2f18c77e1b Update to licensee 8.0.0 and fix API specs
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-04-18 14:47:50 +02:00
Rémy Coutable 0aaaae9d05 Fix features specs (hopefully)
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-04-18 14:47:50 +02:00
Rémy Coutable 13804aba86 Continue implementation of the license template selector and /licenses API endpoint
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-04-18 14:47:50 +02:00
Anton Davydov 073c3d15c7 Initial implementation if license template selector and /licenses/:key API endpoint 2016-04-18 14:47:50 +02:00
Robert Schilling fa7d99ebd4 API: Present an array of Gitlab::Git::Tag instead of array of rugged tags 2016-04-17 11:03:10 +02:00
Kamil Trzcinski 1c5b172abb Write specs for this feature 2016-04-16 22:43:40 +02:00
Kamil Trzcinski 065e0c0fe4 Merge remote-tracking branch 'origin/master' into ci-commit-as-pipeline
# Conflicts:
#	db/schema.rb
2016-04-16 19:55:14 +02:00
Michael Greene c1467f5d97 Allow back dating notes on creation 2016-04-13 12:04:09 -05:00
Michael Greene 28a7fe25fd Allow back dating issues on update 2016-04-13 12:04:09 -05:00
Rémy Coutable c8560894f7 Merge branch 'api-subscribe-issue-mr' into 'master'
API: Subscribe and unsubscribe from issues and merge requests

* Closes #6024 

This MR is based on !3611, which must be merged first.


See merge request !3615
2016-04-13 15:54:31 +00:00
Robert Schilling a9200d93d3 Ensure that issues and merge requests are found 2016-04-13 17:15:42 +02:00
Rémy Coutable 94e130cec3 Merge branch 'api-star-project' into 'master'
API: Star and unstar a project

Add two new endpoints `POST /projects/:id/star` and `POST /projects/:id/unstar` to star and unstar a project.

* Closes #12739


See merge request !3578
2016-04-13 15:05:21 +00:00
Robert Schilling 54231aa4e0 Styling changes to code and docs 2016-04-13 16:25:24 +02:00
Kamil Trzcinski 4af0968c43 Merge remote-tracking branch 'origin/master' into ci-commit-as-pipeline 2016-04-13 15:47:18 +02:00
Dmitriy Zaporozhets ab4ea3720c Merge branch 'rs-archive-cache-worker-cron' into 'master'
Move RepositoryArchiveCacheWorker to sidekiq-cron

Closes #15105

See merge request !3663
2016-04-13 12:53:01 +00:00
Robert Schilling 3ab9ea8dae Make staring API more restful 2016-04-13 14:26:41 +02:00
Robert Schilling ea2193aaeb API: Star and unstar a project 2016-04-13 14:26:40 +02:00
Robert Schilling fa3009095f Make subscription API more RESTful 2016-04-13 13:52:13 +02:00
Robert Schilling f875189b39 API: Ability to subscribe and unsubscribe from a merge request 2016-04-13 13:45:01 +02:00
Robert Schilling bd0be13f5b API: Ability to subscribe and unsubscribe from an issue 2016-04-13 13:45:00 +02:00
Rémy Coutable cf306b17bf Merge branch 'api-group-leaking' into 'master'
API: Return 404 if user does not have access to group

Closes #15185 

After !3587 is merged, I'll update this one to also fix the return code of the tests in !3587.

See merge request !3683
2016-04-13 11:32:25 +00:00
Robert Schilling 2b036025d6 Update tests for moving issues via API 2016-04-13 11:31:50 +02:00
Robert Schilling 482f67edb4 API: Ability to move an issue 2016-04-13 11:23:42 +02:00
Robert Schilling b2f48d8c46 API: Return 404 if user does not have access to group 2016-04-13 11:11:09 +02:00
Rémy Coutable fc9e1be1fd Merge branch 'api-group-visibility' into 'master'
API: Ability to update a group

This makes it much easier to update a group after introducing the group visibility.

* Closes #14991 

See merge request !3587
2016-04-13 08:23:29 +00:00
Robert Schilling 5fb572417e Fix minor issues according development guidelines 2016-04-12 19:08:35 +02:00
Douwe Maan 4516f40dfe Merge branch 'decouple-member-notification' into 'master'
Decouple membership and notifications

This allow you to have notification setting per project even if you are member of group. 
It also creates background for having notification settings in project you are not member of. 


- [x] Make it work
- [x] Migrations
- [x] CHANGELOG
- [x] More tests
- [x] API

For #3359 

After this merge request there is still some work to be done: 

* create migration that remove duplicates in notification settings table and create uniq index (8.8 probably)
* remove notification_level field from Member model in 9.0
* make proper API for notification settings
* use `MemberCreateService` instead of Member#after_create callback for creating notification settings (after #14709) 
* maybe more tests 


Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>

See merge request !3421
2016-04-12 16:39:40 +00:00
Robert Speicher cba2c437e5 Move RepositoryArchiveCacheWorker to sidekiq-cron
Closes #15105
2016-04-12 11:12:05 -04:00
Rémy Coutable e322b993e7 Merge branch 'api-delete-note' into 'master'
Delete notes via API

Supports deleting issues, snippets, and merge requests via the API.

* Closes #14944
* Closes #14845 
* Closes #6060 

@zj I did not see that you assigned yourself in #6060. Hopefully, you did not start yet.

@rymai In #6060 this is targeted for 8.7 release. Could you review that and maybe this still lands in 8.7. 


See merge request !3557
2016-04-12 14:34:50 +00:00
Rémy Coutable a5512099ce Merge branch 'api-get-tag' into 'master'
API: Ability to retrieve a single tag

* Closes #14330

/cc @dblessing

See merge request !3577
2016-04-12 14:04:40 +00:00