Commit Graph
779 Commits
Author SHA1 Message Date
Kamil TrzcińskiandRémy Coutable ba893daf53 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-21 20:59:39 +01:00
Grzegorz BizonandRémy Coutable 62067b74c8 Merge branch 'ci/remove-builds' into 'master'
Make it possible to erase build content (artifacts, trace)

This feature makes it possible to remove build content - build artifacts and build traces.

- [x] Remove artifacts
- [x] Remove metadata
- [x] Remove build traces
- [x] Wait for https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/1942 this to be merged
- [x] Fix the permissions after the merge

Closes #3421

See merge request !2560
2016-02-19 18:22:49 +01:00
Kamil TrzcińskiandRémy Coutable 778da50251 Merge branch 'ci/api-runners' into 'master'
Add runners API

References #4264

See merge request !2640
2016-02-19 16:32:43 +01: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
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 7ea60fbfc8 Merge remote-tracking branch 'dev/master' into 'master' 2016-02-09 12:13:58 -05:00
Andrei DziahelandRémy Coutable 86d15c1e9a Expose MergeRequest::merge_status to API 2016-02-08 17:04:58 +01:00
Kirill SkachkovandRémy Coutable 81f2a9e5b0 API: Allow to set or update a merge-request's milestone 2016-02-08 15:49:35 +01:00
Kamil Trzcinski 6fea7c386f Merge remote-tracking branch 'origin/master' into ci-permissions
# Conflicts:
#	app/views/projects/builds/index.html.haml
2016-02-04 13:16:48 +01:00
Kamil Trzcinski b4c36130cc Rename allow_guest_to_access_builds to public_builds 2016-02-04 12:57:46 +01:00
Kamil Trzcinski 6a5a175d9f Expose allow_guest_to_access_builds in GitLab API 2016-02-04 11:14:12 +01:00
Robert Speicher 8a85906a74 Merge branch 'support-akismet' into 'master'
Support Akismet spam checking for creation of issues via API

Currently any spam detected by Akismet for non-members via API will
be logged in a separate table in the admin page.

Closes #5612

See merge request !2266
2016-02-03 01:26:30 +00:00
Jacob Vosmaer 752468d55b Merge branch 'git-raw-workhorse' into 'master'
Send raw Git blobs via gitlab-workhorse



See merge request !2451
2016-02-02 17:22:04 +00:00
Dmitriy Zaporozhets 30313098a0 Merge branch 'Michi302/gitlab-ce-fix/pagination-links' into 'master'
Fix add_pagination_headers to keep request parameters in Link header

Originally opened at !2321. Closes #5904. /cc @Michi302

See merge request !2674
2016-02-02 16:04:08 +00:00
Michi302andRémy Coutable c41a8be8d2 Fix add_pagination_headers to keep request parameters in Link header 2016-02-02 15:26:29 +01:00
Douglas Barbosa Alexandre a2bbf00477 Refactor spam filtering on issues API 2016-02-02 11:25:44 -02:00
Stan HuandDouglas Barbosa Alexandre d20e75a8d8 Support Akismet spam checking for creation of issues via API
Currently any spam detected by Akismet by non-members via API will be logged
in a separate table in the admin page.

Closes #5612
2016-02-02 11:25:44 -02:00
Kamil Trzcinski 055afab5c7 Make the CI permission model simpler
This MR simplifies CI permission model:
- read_build: allows to read a list of builds, artifacts and trace
- update_build: allows to cancel and retry builds
- create_build: allows to create builds from gitlab-ci.yml (not yet implemented)
- admin_build: allows to manage triggers, runners and variables
- read_commit_status: allows to read a list of commit statuses (including the overall of builds)
- create_commit_status: allows to create a new commit status using API

Remove all extra methods to manage permission.
Made all controllers to use explicitly the new permissions.
2016-02-02 09:18:08 +01:00
Jacob Vosmaer 51574d779c Merge branch 'master' of https://gitlab.com/gitlab-org/gitlab-ce into lazy-blobs 2016-02-01 13:51:05 +01:00
Jacob Vosmaer 2679ec4066 Merge branch 'master' of https://gitlab.com/gitlab-org/gitlab-ce into git-raw-workhorse 2016-02-01 11:33:36 +01:00
Jacob Vosmaer 02afa6793c Use only one header to send git blobs 2016-02-01 11:33:22 +01:00
Jacob Vosmaer 64c8ee47c9 WIP lazy blobs 2016-02-01 10:41:52 +01:00
Josh Frye 91b9cbff8d First pass at deleting projects in the background. 2016-01-29 09:14:16 -05:00
Jacob Vosmaer 26d97ac5e1 Send more raw blob data with workhorse 2016-01-28 18:04:46 +01:00
Dmitriy Zaporozhets dfb8803c1c Improve consistency and duplication for Merge Request API
* Follow REST for merge request API route
* Remove repeating comments API for MR

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-01-28 14:26:12 +01:00
Kamil Trzcinski 95d2f0fb51 Fix CI runner version not being properly updated when asking for a build
Due to broken implementation of attribute_for_keys the runner information was not updated correctly.

This MR adds test to check that such scenario will never happen again.
2016-01-27 12:04:54 +01:00
Josh Frye 11797df1af Change 'public' flag to more robust 'visibility' query. 2016-01-19 09:57:00 -05:00
Josh Frye 10669097fa Add public params to GET /projects api. Closes #3788 2016-01-19 09:57:00 -05:00
Tomasz Maczukin 768721dc58 Merge branch 'master' into ci/api-triggers
* master: (150 commits)
  fixes margin and padding
  Update mailroom/postfix documentation [ci skip]
  Fix css mess around git clone panel. Align it properly
  Fix missing padding for user/group pages
  Fix parse_gollum_tags matcher
  Update documentation on Banzai::Filter::GollumTagsFilter
  Add tests for the wiki pipeline
  Refactoring Banzai::Filter::GollumTagsFilter
  Make sure the .git is at the end on Gitlab::GithubImport::WikiFormatter
  Remove GollumTagsPipeline
  Refactoring Gitlab::GithubImport::Importer
  Remove unnecessary brackets on WIKI_SLUG_ID route constraints
  Move js function to removing accents to vendor/assets/javascripts
  Update CHANGELOG
  Use the WikiPipeline when rendering the wiki markdown content
  Add Banzai::Filter::GollumTagsFilter for parsing Gollum's tags in HTML
  Relax constraints for wiki slug
  Import GitHub wiki into GitLab
  Move Ci::Build#available_statuses to AVAILABLE_STATUSES constant in CommitStatus
  Revert changes to how the notes are paginated in the API
  ...

Conflicts:
	doc/api/README.md
	lib/api/entities.rb
2016-01-14 21:58:17 +01:00
Douwe Maan ba42b03348 Merge branch 'ci/api-builds' into 'master'
Add builds API

References #4264

See merge request !2207
2016-01-14 16:29:15 +00:00
Tomasz Maczukin 2c7d9cfa7d Move Ci::Build#available_statuses to AVAILABLE_STATUSES constant in CommitStatus 2016-01-14 14:59:04 +01:00
Rémy Coutable 1b08cd811a Merge branch 'master' of https://gitlab.com/gitlab-org/gitlab-ce into add-pagination-headers-to-api 2016-01-14 14:23:42 +01:00
Rémy Coutable c31d777c8f Revert changes to how the notes are paginated in the API 2016-01-14 14:20:21 +01:00
Grzegorz Bizon f03da18e3a Merge branch 'ci/view-build-artifacts' into 'master'
Add browser for build artifacts

Discussion in #3426, closes #3426.

See merge request !2123
2016-01-14 12:57:33 +00:00
Tomasz Maczukin 405b82af23 Merge branch 'master' into ci/api-builds
* master: (51 commits)
  Fix version
  Fix specs and rubocop warnings
  Improve the consistency of commit titles, branch names, tag names, issue/MR titles, on their respective project pages
  fixed LDAP activation on login to use new ldap_blocked state
  Fix Admin/Users view to position buttons without spacing magic
  Update to Go 1.5.3
  Fix the undefinded variable error in Project's safe_import_url method
  Update CHANGELOG [ci skip]
  Add some cosmetic changes to variables API documentation [ci skip]
  Fix misaligned edit button in milestone collection partial
  Update button styles for Milestones#show
  Modify builds API documentation style [ci skip]
  Modify :ci_variable factory
  Ensure the API doesn't return notes that the current user shouldn't see
  Add 'Build' prefix to Variables entry name in API docs index
  Fix some typos
  Add spec for Note#cross_reference_not_visible_for?
  Remove (invalid) timestamp formatting
  Move `BroadcastMessage#status` to a helper since it's presentational
  Update CHANGELOG
  ...

Conflicts:
	doc/api/README.md
	lib/api/api.rb
	lib/api/entities.rb
2016-01-14 13:30:18 +01:00
Tomasz Maczukin af3b97cdde Merge branch 'master' into ci/api-triggers
* master:
  Fix version
  Improve the consistency of commit titles, branch names, tag names, issue/MR titles, on their respective project pages
  Update CHANGELOG [ci skip]
  Add some cosmetic changes to variables API documentation [ci skip]
  Modify builds API documentation style [ci skip]
  Modify :ci_variable factory
  Add 'Build' prefix to Variables entry name in API docs index
  Fix some typos
  Add some fixes after review
  Remove blank line
  Update ./doc/api
  Change :variable_id to :key as resource ID in API
  Fix a typo in method description
  Add create feature to variables API
  Add missing 'not_found' checks in variables API
  Add delete feature to variables API
  Add update feature for variables API
  Add features for list and show details of variables in API

Conflicts:
	doc/api/README.md
	lib/api/entities.rb
2016-01-14 13:09:54 +01:00
Grzegorz Bizon 154b8ceba4 Refactor build artifacts upload API endpoint 2016-01-14 12:48:17 +01:00
Tomasz Maczukin 8eed187677 Merge branch 'master' into ci/api-triggers
* master: (32 commits)
  Fix specs and rubocop warnings
  fixed LDAP activation on login to use new ldap_blocked state
  Fix Admin/Users view to position buttons without spacing magic
  Update to Go 1.5.3
  Fix the undefinded variable error in Project's safe_import_url method
  Fix misaligned edit button in milestone collection partial
  Update button styles for Milestones#show
  Ensure the API doesn't return notes that the current user shouldn't see
  Add spec for Note#cross_reference_not_visible_for?
  Remove (invalid) timestamp formatting
  Move `BroadcastMessage#status` to a helper since it's presentational
  Update CHANGELOG
  Broadcast Messages can now be edited
  Update Broadcast Message features
  Update BroadcastMessage model
  Update broadcast_message helper
  Simplify BroadcastMessage factory
  Simplify broadcast message JS
  Remove alert_type attribute from BroadcastMessage
  Move broadcast message form to a partial
  ...
2016-01-14 12:24:20 +01:00
Rémy Coutable 3183092ca9 Add pagination headers to already paginated API resources 2016-01-14 12:10:27 +01:00
Douwe Maan 0014f19327 Merge branch 'master' into ci/api-variables 2016-01-14 12:04:28 +01:00
Douwe Maan 4d64a32c88 Merge branch 'feature/ldap-sync-edgecases' into 'master'
LDAP Sync blocked user edgecases

Allow GitLab admins to block otherwise valid GitLab LDAP users
(https://gitlab.com/gitlab-org/gitlab-ce/issues/3462)

Based on the discussion on the original issue, we are going to differentiate "normal" block operations to the ldap automatic ones in order to make some decisions when its one or the other.

Expected behavior:

- [x] "ldap_blocked" users respond to both `blocked?` and `ldap_blocked?`
- [x] "ldap_blocked" users can't be unblocked by the Admin UI
- [x] "ldap_blocked" users can't be unblocked by the API
- [x] Block operations that are originated from LDAP synchronization will flag user as "ldap_blocked"
- [x] Only "ldap_blocked" users will be automatically unblocked by LDAP synchronization
- [x] When LDAP identity is removed, we should convert `ldap_blocked` into `blocked`
 
Mockup for the Admin UI with both "ldap_blocked" and normal "blocked" users:
![image](/uploads/4f56fc17b73cb2c9e2a154a22e7ad291/image.png)

There will be another MR for the EE version.

See merge request !2242
2016-01-14 11:00:08 +00:00
Tomasz Maczukin 57a67c4fdb Merge branch '8-4-stable' into ci/api-triggers
* 8-4-stable: (280 commits)
  Add Changelog entry for build traces data integrity fix
  Update doc_styleguide.md [ci skip]
  Added hint that you can search users by name, username, or email.
  Add changelog
  Version 8.4.0.rc1
  Randomize metrics sample intervals
  Make the metrics sampler interval configurable
  Don't automatically require awesome_print
  Disable colorization if STDOUT is not a tty
  Block the reported user before destroying the record
  changes `$quote-gray` to `$secondary-text`
  makes message plural for multiple MRs and removes from loop. Duh.
  Prepare Installation and Update docs for 8.4 RC1
  Mention channel/key bug in irkerd docs
  Revert "Remove the `:coffee` and `:coffeescript` Haml filters"
  gets merge request discussion working again
  adds back in discussion.haml.html for issues commenting and closing/reopening properly.
  removing last chunk of MR ajax changes, rest will be in another MR
  reverting more MR ajax files, will appear in different commit
  reverting MR ajax changes, which will be in a different MR
  ...
2016-01-14 10:58:40 +01:00
Tomasz Maczukin 220c3a44c9 Merge branch '8-4-stable' into ci/api-variables
* 8-4-stable: (285 commits)
  Add Changelog entry for build traces data integrity fix
  Update doc_styleguide.md [ci skip]
  Added hint that you can search users by name, username, or email.
  Add changelog
  Version 8.4.0.rc1
  Randomize metrics sample intervals
  Make the metrics sampler interval configurable
  Don't automatically require awesome_print
  Disable colorization if STDOUT is not a tty
  Block the reported user before destroying the record
  changes `$quote-gray` to `$secondary-text`
  makes message plural for multiple MRs and removes from loop. Duh.
  Prepare Installation and Update docs for 8.4 RC1
  Mention channel/key bug in irkerd docs
  Revert "Remove the `:coffee` and `:coffeescript` Haml filters"
  gets merge request discussion working again
  adds back in discussion.haml.html for issues commenting and closing/reopening properly.
  removing last chunk of MR ajax changes, rest will be in another MR
  reverting more MR ajax files, will appear in different commit
  reverting MR ajax changes, which will be in a different MR
  ...
2016-01-13 23:59:00 +01:00
Tomasz Maczukin c9a1661979 Merge branch 'master' into ci/api-builds
* master: (76 commits)
  Add Changelog entry for build traces data integrity fix
  Update doc_styleguide.md [ci skip]
  Added hint that you can search users by name, username, or email.
  Add changelog
  Randomize metrics sample intervals
  Make the metrics sampler interval configurable
  Don't automatically require awesome_print
  Disable colorization if STDOUT is not a tty
  Block the reported user before destroying the record
  changes `$quote-gray` to `$secondary-text`
  makes message plural for multiple MRs and removes from loop. Duh.
  Prepare Installation and Update docs for 8.4 RC1
  Mention channel/key bug in irkerd docs
  Revert "Remove the `:coffee` and `:coffeescript` Haml filters"
  gets merge request discussion working again
  adds back in discussion.haml.html for issues commenting and closing/reopening properly.
  removing last chunk of MR ajax changes, rest will be in another MR
  reverting more MR ajax files, will appear in different commit
  reverting MR ajax changes, which will be in a different MR
  reverting _mr_title.html.haml
  ...
2016-01-13 20:53:42 +01:00
Rémy Coutable 33ea09bdf9 Merge branch 'master' of https://gitlab.com/gitlab-org/gitlab-ce into fix/private-references 2016-01-13 19:46:38 +01:00
Rémy Coutable 0c10aee596 Ensure the API doesn't return notes that the current user shouldn't see 2016-01-13 19:42:36 +01:00
Tomasz Maczukin 9e701ccd48 Fix some typos 2016-01-13 18:47:39 +01:00
Tomasz Maczukin 9733849618 Add some fixes after review 2016-01-13 15:17:59 +01:00