Commit Graph

3540 Commits

Author SHA1 Message Date
Jan Provaznik 227d8b4445 Merge branch '58275-rename-project-entity' into 'master'
Rename ProjectEntity to IssuableEntity

Closes #58275

See merge request gitlab-org/gitlab-ce!30217
2019-07-10 05:39:44 +00:00
Douglas Barbosa Alexandre 2615265ef8
Merge branch 'master' into sathieu/gitlab-ce-project_api 2019-07-09 14:45:46 -03:00
charlie ablett 639ab5214c Remove `:graphql` feature flag
- Remove `FeatureConstrainer` call wrapping api endpoint
- Remove `Feature.enabled?(:graphql)` conditionals in back and frontend
- Modify graphql test to be graphql flag agnostic
- Remove api routing spec
- Remove frontend feature flag via `gon`
2019-07-09 12:45:23 +00:00
Alexandru Croitor dba5f3aeea Rename ProjectEntity to IssuableEntity 2019-07-09 15:41:45 +03:00
Tim Zallmann b9e52612fe Updates on success of an MR the count on top and in other tabs
New API endpoint for merge request count
Updates all open tabs at the same time with one call
Restructured API response

API response changed to 401 if no current_user

Added API + JS specs

Fix for Static Check

Updated Count on Open/Close, Assign/Unassign of MR's

Checking if MR Count is refreshed

Added # frozen_string_literal: true to spec

Added Changelog
2019-07-09 08:44:19 +00:00
sujay patel e241c89977 Adding order by to list runner jobs api. 2019-07-05 14:24:56 +05:30
Nick Thomas 381468d0cc
Allow asynchronous rebase operations to be monitored
This MR introduces tracking of the `rebase_jid` for merge requests. As
with `merge_ongoing?`, `rebase_in_progress?` will now return true if a
rebase is proceeding in sidekiq.

After one release, we should remove the Gitaly-based lookup of rebases.
It is much better to track this kind of thing via the database.
2019-07-04 08:50:55 +01:00
Rémy Coutable 9a4b5f08db Merge branch 'sh-fix-issue-63349' into 'master'
Make Housekeeping button do a full garbage collection

Closes #63349

See merge request gitlab-org/gitlab-ce!30289
2019-07-04 07:38:56 +00:00
Maneschi Romain def94f5043 Add Grafana to Admin > Monitoring menu when enabled 2019-07-03 16:09:51 +00:00
Mathieu Parent 32bbb52c19 Fix API performance problem of auto_devops query 2019-07-03 16:18:05 +02:00
Mathieu Parent e44167004d Add auto_devops_* to project API
The auto_devops object sometimes doesn't exists. We may need to create
it.
2019-07-03 16:18:05 +02:00
Mathieu Parent 5028f5d73d Add auto_cancel_pending_pipelines to project API 2019-07-03 16:18:05 +02:00
Mathieu Parent 5f04d24934 Add build_coverage_regex to project API 2019-07-03 16:18:05 +02:00
Mathieu Parent a7892e7171 Add build_timeout to project API 2019-07-03 16:18:05 +02:00
Mathieu Parent 353e68772c Add build_git_strategy attribute to project API
We map the boolean to the string 'fetch' or 'clone', to be more
explicit.
2019-07-03 16:18:05 +02:00
Mathieu Parent 26b7b47558 Add *_access_level to project API
- issues_access_level
- repository_access_level
- merge_requests_access_level
- builds_access_level
- wiki_access_level
- snippets_access_level
2019-07-03 16:18:05 +02:00
Marin Jankovski c20c9e2940
Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce 2019-07-03 11:55:56 +02:00
Jason Goodman 7ecffe2987 Show upcoming status for releases
Add released_at field to releases API
Add released_at column to releases table
Return releases to the API sorted by released_at
2019-07-03 09:12:15 +00:00
Stan Hu d48ee86053 Make Housekeeping button do a full garbage collection
Previously the Housekeeping button and API would use the counter of last
pushes to determine whether to do a full garbage collection, or whether
to do one of the less comprehensive tasks: a full repack, incremental
pack, or ref pack. This was confusing behavior, since a project owner
might have to click the button dozens of times before a full GC would be
initiated.

This commit forces a full GC each time this is initiated. Note that the
`ExclusiveLease` in `HousekeepingService` prevents users from clicking
on the button more than once a day.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/63349
2019-07-03 00:21:33 -07:00
Marin Jankovski fa77293bdc Merge branch 'security-mr-head-pipeline-leak' into 'master'
[master] Fix MR head pipeline leak

See merge request gitlab/gitlabhq!3148
2019-07-02 06:23:28 +00:00
Marin Jankovski f66169b35c Merge branch 'security-59581-related-merge-requests-count' into 'master'
Expose merge requests count based on user access

See merge request gitlab/gitlabhq!3157
2019-07-02 06:19:58 +00:00
Takuya Noguchi af5da7564e Replace 'JIRA' with 'Jira'
https://community.atlassian.com/t5/Jira-questions/Is-it-quot-JIRA-quot-or-quot-Jira-quot/qaq-p/681163

Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
2019-06-28 13:25:56 +00:00
Thong Kuah d69f9af7cf Merge branch '63212-n-1-queries-in-projects-id-boards-api' into 'master'
Remove N+1 queries in boards API

See merge request gitlab-org/gitlab-ce!29634
2019-06-28 08:14:09 +00:00
Stan Hu d6f20b55b8 Add support for creating random passwords in user creation API
To avoid having to specify an actual password to create users, admins
can now use the `force_random_password` parameter to let Devise generate
a password.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/63826
2019-06-27 13:25:37 -07:00
charlieablett 426f1c20b1 Remove N+1 query for project and group boards
- Add test for N+1 queries
- Add destroyable lists scope to Board and List
- Preload lists for both project and group boards
2019-06-26 11:47:18 +12:00
Roger Meier 946ffc67b7 refactor: remove Sentry from application settings 2019-06-25 21:17:19 +02:00
Sam Battalio 3457695b1e Change HTTP Status Code when repository disabled 2019-06-24 22:12:42 +00:00
Stan Hu f2d932268d Rename Todos.with_api_entity_associations to with_entity_associations
Since this scope is used in both the controller and the API, we rename
it to make it clear that it's used for both.
2019-06-24 10:49:13 -07:00
Lee Tickett ec66f1b5ca Add name & search parameters to project environments API 2019-06-24 12:18:40 +00:00
Douwe Maan 7821defab3 Merge branch 'sync-merge-ref-upon-mergeability-check' into 'master'
Automatically update MR merge-ref along merge status

See merge request gitlab-org/gitlab-ce!29569
2019-06-24 09:31:46 +00:00
Vladimir Shushlin 6119d5ad75 Don't show private keys for letsencrypt certs
Adds enum certificate_source to pages_domains table
with default manually_uploaded

Mark certificates as 'gitlab_provided'
if the were obtained through Let's Encrypt

Mark certificates as 'user_provided' if they were uploaded through
controller or api

Only show private key in domain edit form if it is 'user_provided'

Only show LetsEncrypt option if is enabled by application settings
(and feature flag)

Refactor and fix some specs to match new logic

Don't show Let's Encrypt certificates as well
2019-06-21 12:06:12 +00:00
Oswaldo Ferreira 3af348b6cf Automatically update MR merge-ref along merge status
This couples the code that transitions the `MergeRequest#merge_status`
and refs/merge-requests/:iid/merge ref update.

In general, instead of directly telling `MergeToRefService` to update
the merge ref, we should rely on `MergeabilityCheckService` to keep
both the merge status and merge ref synced. Now, if the merge_status is
`can_be_merged` it means the merge-ref is also updated to the latest.

We've also updated the logic to be more systematic and less user-based.
2019-06-20 11:48:30 -03:00
Michael Leopard 8cf85b4bb5 Updating CE repo to include new EE users API changes
Updated users API documentation
Moved API level changes to the service level
2019-06-19 20:27:34 +00:00
Robert Speicher ea1b24cbe0 Merge branch 'pderichs-52123' into 'master'
Use NotesFinder to get Noteable

See merge request gitlab-org/gitlab-ce!28205
2019-06-19 15:58:43 +00:00
Patrick Derichs 5469d21d02 Simplify result of find_noteable 2019-06-19 11:07:17 +02:00
Patrick Derichs 932a9a0c77 Use NotesFinder to fetch notes on API and Controllers
Fix missing iid query on NotesFinder

Changed parameters of find_noteable, 
so changes across a few files were needed.
MergeRequest also requires iid instead of id query

Make NotesFinder fail with RecordNotFound again

Add specs for target_iid

Using RSpec tablesyntax for target_iid specs

Revert "Using RSpec tablesyntax for target_iid specs"

This reverts commit ba45c7f569a.

Allow find_by! here

Fix variable name

Add readable check

Revert "Add readable check"

This reverts commit 9e3a1a7aa39.

Remove unnecessary assignment

Add required changes for EE

Fix parameter count

Reduce code duplication by extracting a noteable module method

The call to find_noteable was redundant so
multiple files and lines have changed in that
commit to use the newly introduced module
method `noteable`.

Replace casecmp with include check

Add parent_type parameter


Revert "Reduce code duplication by extracting
a noteable module method"

This reverts commit 8c0923babf.

Method is no longer needed

Check whether noteable can be read by user
2019-06-19 10:56:55 +02:00
Manoj MJ 53b17f0301 Add documentation and tests
This commit adds
 - feature specs
  - to test the ability of a user with "developer" permission
    to delete tags in repositories.
 - documentation
2019-06-19 07:08:56 +00:00
Seiji Suenaga d5d2f8fb6b 59702 Fix API notification flags for MS Teams 2019-06-18 19:45:35 -05:00
Steve Abrams 34a283f90a Add 2nd response for container api bulk delete
The bulk delete api endpoint for container registries can
only be called once per hour. If a user calls the endpoint more
than once per hour, they will now receive a 400 error with a
descriptive message.
2019-06-18 22:08:30 +00:00
Alexandru Croitor 09163e423a Expose merge requests count based on user access
Count issues related merge requests based on user access level. And
issue can have related MRs from projects where user does not have
access so the number of related merge requests should be adjusted
based on user's ability to access the related MRs.

https://gitlab.com/gitlab-org/gitlab-ce/issues/59581
2019-06-18 12:46:46 +03:00
Stan Hu 7c27155c45 Merge branch '56737-commits-and-mr-events-on-jira-api' into 'master'
Expose currently supported events properly on services API

Closes #56737

See merge request gitlab-org/gitlab-ce!29736
2019-06-17 22:43:50 +00:00
Jason Goodman a881a592d1 Allow Developer role to delete tags via container registry api
This brings the API permissions in line with the UI permissions
2019-06-17 11:13:03 +00:00
Zsolt Kovari 0a6a0a5280 56737 Expose currently supported events properly on services API 2019-06-16 17:57:38 +02:00
Kamil Trzciński 991976642f Merge branch 'expose-project-git-depth-via-api' into 'master'
Expose default_git_depth via project API

Closes #62908

See merge request gitlab-org/gitlab-ce!29353
2019-06-12 11:02:36 +00:00
Fabio Pitino 3ac527b488 Expose ci_default_git_depth via project API
Enable Get and Update of ci_default_git_depth for
Project API.

Renaming Project#default_git_depth to :ci_default_git_depth
to give more context through the API usage.

Add API documentation
2019-06-12 09:51:45 +01:00
Jan Provaznik a17a15562d API issues - minor cleanup of permission check
Adds `set_issue_updated_at` similar to `set_issue_created_at`
permission and cleans up the related permission check in issues
API.
2019-06-11 23:12:21 +00:00
Oswaldo Ferreira 00a273d3a9 Revert "Automatically update MR merge-ref along merge status" 2019-06-11 13:08:25 -03:00
Matija Čupić 5f0687d07a
Gate MR head_pipeline behind read_pipeline ability 2019-06-08 18:13:31 +02:00
Patrick Derichs b70d23c25a Add task count and completed count to responses of Issue and MR
Add spec for task_completion_status

Add test cases for task_completion_status result

Extracted shared samples

Add new spec file for task completion status response

Fix style errors

Add changelog entry

Changed samples to Hashes

Remove test for successful request

Remove not nil expectation

Add task_completion_status to api documentation for issues

Add task_completion_status to api documentation for merge_requests

Refactor spec so it just requests one specific item

Add task_completion_status to Taskable

Simplified task completion status in entities

Refactor spec so it separates status code check and content check

Fix spec description text and field name
2019-06-07 11:15:55 +02:00
Rémy Coutable a1088c7a31
Include the port in the URLs of the API Link headers
Signed-off-by: Rémy Coutable <remy@rymai.me>
2019-06-06 15:11:48 +02:00