Commit Graph
1066 Commits
Author SHA1 Message Date
Douwe Maan 6ce25e7b4c Rename MergeRequest methods that return commits or shas to be more clear and consistent 2016-07-06 18:50:58 -04:00
Patricio Cano 7735ef86f0 Only allow Git Access on the allowed protocol 2016-07-05 16:54:22 -05:00
Grzegorz Bizon 9e211091a8 Enable Style/EmptyLines cop, remove redundant ones 2016-07-01 21:56:17 +02:00
Rémy Coutable 557ca2b31f Merge branch 'todos-api' into 'master'
Add Todos API

* Closes #14068
* Closes #14675 

- [x] Implementation
- [x]  Tests
- [x] Documentation
- [x] Changelog

See merge request !3188
2016-07-01 15:36:05 +00:00
Rémy Coutable 984698dc96 Merge branch 'refactor-tags-branches-api' into 'master'
Ensure that branch and tag names are given in API

## What does this MR do?

It ensures that the tag or branch name is given. @rymai We talked in an earlier MR about this.

See merge request !5012
2016-07-01 15:25:23 +00:00
Robert Schilling 87ac9c9850 Support creating a todo on issuables via API 2016-07-01 14:52:04 +02:00
Robert Schilling 3942621329 Expose target, filter by state as string 2016-07-01 14:52:04 +02:00
Robert Schilling fd9cd5ae8c Add todos API documentation and changelog 2016-07-01 14:51:59 +02:00
Robert Schilling 40c685c510 pass paginated array when deleting notes 2016-07-01 10:49:34 +02:00
Robert Schilling 631765748e Expose action_name 2016-07-01 10:49:34 +02:00
Robert Schilling f3abd18c9c Add user to project to see todos 2016-07-01 10:49:34 +02:00
Robert Schilling 39e6f504fc Move to helper, no instance variables 2016-07-01 10:49:34 +02:00
Robert Schilling 25dcd05137 Fix rebase 2016-07-01 10:49:34 +02:00
Douglas Barbosa AlexandreandRobert Schilling a1f224d3f7 Add Todos API 2016-07-01 10:49:34 +02:00
Robert Schilling cc324eb4ab Ensure that branch and tag names are given in API 2016-06-30 13:46:35 +02:00
Alejandro Rodríguez 4a8a69837a Add Application Setting to configure default Repository Path for new projects 2016-06-29 23:35:00 -04:00
Alejandro Rodríguez 86359ec854 Refactor repository paths handling to allow multiple git mount points 2016-06-29 22:30:31 -04:00
Grzegorz Bizon 28bafd5354 Enable Style/SpaceAfterComma Rubocop cop 2016-06-29 15:23:44 +02:00
Grzegorz Bizon 2b8f04a669 Remove redundant check in commit builds API endpoint 2016-06-28 17:15:38 +02:00
Grzegorz Bizon b9b95a9f19 Improve commit builds API endpoint RESTful behavior
1. Return 404 if commit is not found (RESTful resource not found)
2. Return an empty array if pipeline is not found (resource present, no
   associated builds found)
3. Return an empty array if pipeline found but no builds there (resource
   present, no associated builds)
2016-06-28 12:22:31 +02:00
Grzegorz Bizon 8e66618749 Find all builds for commit if multiple pipelines 2016-06-28 11:34:49 +02:00
Drew Blessing 1910fd05ae Rename Licenses API to License Templates API 2016-06-27 14:42:05 -05:00
Marc Siegfriedt 6587feba65 gitlab-org/gitlab-ce#17818 - add api call for issues by group
rely only on IssuesFinder
docs and changelog
2016-06-23 16:31:48 +00:00
Grzegorz Bizon dd08202a24 Fix builds API response not including commit data 2016-06-21 14:26:57 +02:00
Jacob Schatz 0d287b06a6 Merge branch '17521-gitlab-ci-yml-templates' into 'master'
GitLab CI Yaml template dropdown

## What does this MR do?
Make it possible to select a dropdown for an easy start with GitLab CI.

## What are the relevant issue numbers?
Closes #17521

## TODO
- [ ] Backend
  - [x] CHANGELOG item
  - [x] Fix rubocop failure
  - [x] API Support
  - [x] New tests
  - [x] Add disclaimer to the top of the gitlab-ci.yml
- [ ] Frontend
  - [x] New tests

See merge request !4411
2016-06-21 10:56:41 +00:00
Rémy Coutable f90c8c624d Merge branch 'feature/runner-lock-on-project' into 'master'
Make it possible to lock runner on a specific project

Make it possible to lock runner on a specific project.

![Screen_Shot_2016-06-20_at_4.03.08_PM](/uploads/186378643a20106ff0b67b6fd8bd7f28/Screen_Shot_2016-06-20_at_4.03.08_PM.png)

----

![Screen_Shot_2016-06-20_at_9.54.52_PM](/uploads/c479abdffaf19f383bb6b5a42bdd6cc3/Screen_Shot_2016-06-20_at_9.54.52_PM.png)

----

![Screen_Shot_2016-06-20_at_9.56.26_PM](/uploads/6ad838679b0c28a1fe2e20e9224387ea/Screen_Shot_2016-06-20_at_9.56.26_PM.png)

Closes #3407

See merge request !4093
2016-06-21 10:08:42 +00:00
Z.J. van de WegandAlfredo Sumaran bbfd62bc34 fixup! override content method 2016-06-20 14:48:28 -05:00
Z.J. van de WegandAlfredo Sumaran 483dc62eaa Incorporate review 2016-06-20 14:48:28 -05:00
Z.J. van de WegandAlfredo Sumaran 620d014aef Implement backend gitlab ci dropdown
This commit builds on the groundwork in
ee008e300b1ec0abcc90e6a30816ec0754cea0dd, which refactored the backend
so the same code could be used for new dropdowns. In this commit its
used for templates for the `.gitlab-ci.yml` files.
2016-06-20 14:48:28 -05:00
ZJ van de WegandAlfredo Sumaran 27bf7ae59e Refactor Gitlab::Gitignores 2016-06-20 14:48:28 -05:00
Lin Jen-Shin aeb24ee872 Merge remote-tracking branch 'upstream/master' into feature/runner-lock-on-project
* upstream/master: (353 commits)
  Put some admin settings in dropdown
  Add styleguide on configuration settings documentation
  Remove Duplicated keys add UNIQUE index to fingerprint
  Avoid autoload issue such as 'Mail::Parsers::AddressStruct'
  Move appearance settings as sub tab to application settings
  use rails root join
  fixed a couple of errors spotted in production
  Fix RangeError exceptions when referring to issues or merge requests outside of max database values
  Fix bug in `WikiLinkFilter`.
  Grammar and typographic changes to artifacts documentation
  Tweak grammar
  Small frontend code fixes and restore 8a2d88f commit
  Warn about admin privilege to disable GitHub Webhooks
  Listing GH Webhooks doesn't stop import process for non GH admin users
  fixup! updated docs for api endpoint award emoji
  Update CHANGELOG
  Ensure Todos counters doesn't count Todos for projects pending delete
  Add endpoints for award emoji on notes
  Sort API endpoints and implement feedback
  Add endpoints for Award Emoji
  ...
2016-06-20 14:04:14 +00:00
Paco Guzman 11f37a9302 Remove explicit Gitlab::Metrics.action assignments, are already automatic. 2016-06-18 07:33:50 +02:00
Z.J. van de Weg 05a4a586b5 Add endpoints for award emoji on notes
Docs also added.
2016-06-17 21:02:51 +02:00
Z.J. van de Weg 34558315d9 Sort API endpoints and implement feedback 2016-06-17 20:08:16 +02:00
Z.J. van de Weg 3f88221c2d Add endpoints for Award Emoji
This only supports Issues and MergeRequests right now because of the
consistency of the routes those models provide.
2016-06-17 20:07:17 +02:00
Patricio Cano 23457cba44 Added missing mount point for Sidekiq Metrics API, after it got lost on rebase. 2016-06-17 11:49:27 -05:00
Patricio Cano 8ad1884505 Fixed Rubocop error 2016-06-17 11:16:25 -05:00
Lin Jen-Shin 5174d6c146 Merge remote-tracking branch 'upstream/master' into feature/runner-lock-on-project
* upstream/master: (337 commits)
  Update CHANGELOG for !4659
  Center the header logo for all Devise emails
  Add previews for all customized Devise emails
  Customize the Devise `unlock_instructions` email
  Customize the Devise `reset_password_instructions` email
  Customize the Devise `password_change` emails
  Use gitlab-git 10.2.0
  Use Git cached counters on project show page
  Fix indentation scss-lint errors
  Added title attribute to enties in tree view Closes #18353
  Banzai::Filter::ExternalLinkFilter use XPath
  Reduce queries in IssueReferenceFilter
  Use gitlab_git 10.1.4
  Fixed ordering in Project.find_with_namespace
  Fix images in emails
  Banzai::Filter::UploadLinkFilter use XPath
  Turn Group#owners into a has_many association
  Make project_id nullable
  CHANGELOG [ci skip]
  CHANGELOG [ci skip]
  ...
2016-06-17 19:52:55 +08:00
Timothy Andrew 90bba2bc46 Merge remote-tracking branch 'origin/master' into 2979-personal-access-tokens 2016-06-16 08:27:37 +05:30
Timothy Andrew 7ee0898a9e Implement @DouweM's feedback.
- Extract a duplicated `redirect_to`
- Fix a typo: "token", not "certificate"
- Have the "Expires at" datepicker be attached to a text field, not inline
- Have both private tokens and personal access tokens verified in a
  single "authenticate_from_private_token" method, both in the
  application and API. Move relevant logic to
  `User#find_by_personal_access_token`
- Remove unnecessary constants relating to API auth. We don't need a
  separate constant for personal access tokens since the param is the
  same as for private tokens.
2016-06-16 08:24:13 +05:30
Rémy Coutable be09845914 Merge branch 'environments-and-deployments' into 'master'
Add environments and deployments

This MR is a continuation of https://gitlab.com/gitlab-org/gitlab-ce/issues/17009.

The current implementation is as follow:
1. We have two new tables: `environments` and `deployments`.
2. We have a new tab: `Environments` under `Pipelines` where you can see all you environments and add a new one.
3. We add a new option to `.gitlab-ci.yml` to track where we should create a deployment for environment.
4. If environment in `.gitlab-ci.yml` is specified it will create a deployment. **If environment does not exist it will be created.** (this got changed)
5. The deployment is always successful and shows the time of the action, in that case a build that presumably should do deployment. In the future we could extend deployment with statuses: success, failure. We could extend deployments with information that this is partial or full deployment.
6. User have to create environments that he will track first.
7. User can remove environments.
8. User can retry/rollback past deployment (in that case we retry past build). The new build when succeeds it will create a new deployment.
9. Currently environment have only one parameter: `name`. In the future it should have: `variables`, `credentials` and possibly `runners` and maybe other resources.
10. Currently deployment have this parameters: `sha`, `ref`, `deployable (in this case a build)`, `user (who triggered a deployment)`, `created_at`.

The `.gitlab-ci.yml`:
```
deploy to production:
  stage: deploy
  script: dpl travis...
  environment: production
```

What needs to be done:
- [x] Write initial implementation
- [x] Improve implementation (@ayufan)
- [x] Write tests (@ayufan)
- [x] Improve UX of the forms (cc @markpundsack) - reviewed by @markpundsack
- [x] Improve implementation of the views (cc @jschatz1) - done by @iamphill 
- [x] Write .gitlab-ci.yml documentation for `environments` - done by @ayufan
- [ ] Write user documentation (@ayufan and @markpundsack)

See merge request !4605
2016-06-15 13:48:09 +00:00
Patricio Cano 6023dc356a Revert "Added API endpoint for Sidekiq Metrics"
This reverts commit 06e0ef07bc
2016-06-14 16:46:53 +00:00
Patricio Cano 06e0ef07bc Added API endpoint for Sidekiq Metrics 2016-06-14 11:45:45 -05:00
Lin Jen-Shin 9cf45b0586 Return the association and check it in controller instead:
Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4641#note_12444891
2016-06-14 23:11:43 +08:00
Lin Jen-Shin 6c500034f4 Merge branch 'prefer-assign_to' into feature/runner-lock-on-project
* prefer-assign_to:
  Give 409 Conflict whenever the runner was already enabled
  We're checking return value rather than rescuing exceptions
  Prefer Runner#assign_to instead of creating directly
2016-06-14 23:05:33 +08:00
Lin Jen-Shin fd285f71d8 Merge branch 'master' into feature/runner-lock-on-project
* master: (147 commits)
  Update CHANGELOG
  Remove deprecated issues_tracker and issues_tracker_id from project
  Schema doesn’t reflect the changes of the last 3 migrations
  Revert CHANGELOG
  Also rename "find" in the specs
  Change to new Notes styleguide
  Add guide on changing a document's location
  Change logs.md location in README
  Move logs/logs.md to administration/logs.md
  Make "four phase test"
  Only show branches for revert / cherry-pick
  Instrument all Banzai::ReferenceParser classes
  Removed old comment from update_column_in_batches
  Update columns in batches until no rows are left
  Remove counters from Pipeline navigation
  Handle NULL migration errors in migration helpers
  Fix typo causing related branches to Error 500
  Improved SVG sanitizer specs to include smoke tests for clean.
  Refactored SVG sanitizer
  Added SVG sanitizer fix to the changelog
  ...
2016-06-14 23:05:26 +08:00
Lin Jen-Shin 1b8f52d920 Avoid enabling locked runners. Give 403 in this case 2016-06-14 22:58:38 +08:00
Lin Jen-Shin f74f423860 Give 409 Conflict whenever the runner was already enabled 2016-06-14 22:25:11 +08:00
Douwe Maan 9413d1c2e9 Merge branch 'master' into 13948-access-request-to-projects-and-groups
# Conflicts:
#	app/views/layouts/nav/_project.html.haml
2016-06-14 16:23:16 +02:00
Kamil Trzcinski 006b650988 Merge remote-tracking branch 'origin/master' into environments-and-deployments
# Conflicts:
#	db/schema.rb
2016-06-14 16:19:29 +02:00