Commit 9bda4b8d authored by Petheo Bence's avatar Petheo Bence

Added service API endpoint to retrieve service parameters

parent 1c3c3ba5
...@@ -43,6 +43,7 @@ v 8.0.0 (unreleased) ...@@ -43,6 +43,7 @@ v 8.0.0 (unreleased)
- Add support for Crowd - Add support for Crowd
- Global Labels that are available to all projects - Global Labels that are available to all projects
- Fix highlighting of deleted lines in diffs. - Fix highlighting of deleted lines in diffs.
- Added service API endpoint to retrieve service parameters (Petheő Bence)
v 7.14.1 v 7.14.1
- Improve abuse reports management from admin area - Improve abuse reports management from admin area
......
...@@ -27,6 +27,14 @@ Delete Asana service for a project. ...@@ -27,6 +27,14 @@ Delete Asana service for a project.
DELETE /projects/:id/services/asana DELETE /projects/:id/services/asana
``` ```
### Get Asana service settings
Get Asana service settings for a project.
```
GET /projects/:id/services/asana
```
## Assembla ## Assembla
Project Management Software (Source Commits Endpoint) Project Management Software (Source Commits Endpoint)
...@@ -52,6 +60,14 @@ Delete Assembla service for a project. ...@@ -52,6 +60,14 @@ Delete Assembla service for a project.
DELETE /projects/:id/services/assembla DELETE /projects/:id/services/assembla
``` ```
### Get Assembla service settings
Get Assembla service settings for a project.
```
GET /projects/:id/services/assembla
```
## Atlassian Bamboo CI ## Atlassian Bamboo CI
A continuous integration and build server A continuous integration and build server
...@@ -81,6 +97,14 @@ Delete Atlassian Bamboo CI service for a project. ...@@ -81,6 +97,14 @@ Delete Atlassian Bamboo CI service for a project.
DELETE /projects/:id/services/bamboo DELETE /projects/:id/services/bamboo
``` ```
### Get Atlassian Bamboo CI service settings
Get Atlassian Bamboo CI service settings for a project.
```
GET /projects/:id/services/bamboo
```
## Buildkite ## Buildkite
Continuous integration and deployments Continuous integration and deployments
...@@ -107,6 +131,14 @@ Delete Buildkite service for a project. ...@@ -107,6 +131,14 @@ Delete Buildkite service for a project.
DELETE /projects/:id/services/buildkite DELETE /projects/:id/services/buildkite
``` ```
### Get Buildkite service settings
Get Buildkite service settings for a project.
```
GET /projects/:id/services/buildkite
```
## Campfire ## Campfire
Simple web-based real-time group chat Simple web-based real-time group chat
...@@ -133,6 +165,14 @@ Delete Campfire service for a project. ...@@ -133,6 +165,14 @@ Delete Campfire service for a project.
DELETE /projects/:id/services/campfire DELETE /projects/:id/services/campfire
``` ```
### Get Campfire service settings
Get Campfire service settings for a project.
```
GET /projects/:id/services/campfire
```
## Custom Issue Tracker ## Custom Issue Tracker
Custom issue tracker Custom issue tracker
...@@ -161,6 +201,14 @@ Delete Custom Issue Tracker service for a project. ...@@ -161,6 +201,14 @@ Delete Custom Issue Tracker service for a project.
DELETE /projects/:id/services/custom-issue-tracker DELETE /projects/:id/services/custom-issue-tracker
``` ```
### Get Custom Issue Tracker service settings
Get Custom Issue Tracker service settings for a project.
```
GET /projects/:id/services/custom-issue-tracker
```
## Drone CI ## Drone CI
Drone is a Continuous Integration platform built on Docker, written in Go Drone is a Continuous Integration platform built on Docker, written in Go
...@@ -187,6 +235,14 @@ Delete Drone CI service for a project. ...@@ -187,6 +235,14 @@ Delete Drone CI service for a project.
DELETE /projects/:id/services/drone-ci DELETE /projects/:id/services/drone-ci
``` ```
### Get Drone CI service settings
Get Drone CI service settings for a project.
```
GET /projects/:id/services/drone-ci
```
## Emails on push ## Emails on push
Email the commits and diff of each push to a list of recipients. Email the commits and diff of each push to a list of recipients.
...@@ -213,6 +269,14 @@ Delete Emails on push service for a project. ...@@ -213,6 +269,14 @@ Delete Emails on push service for a project.
DELETE /projects/:id/services/emails-on-push DELETE /projects/:id/services/emails-on-push
``` ```
### Get Emails on push service settings
Get Emails on push service settings for a project.
```
GET /projects/:id/services/emails-on-push
```
## External Wiki ## External Wiki
Replaces the link to the internal wiki with a link to an external wiki. Replaces the link to the internal wiki with a link to an external wiki.
...@@ -237,6 +301,14 @@ Delete External Wiki service for a project. ...@@ -237,6 +301,14 @@ Delete External Wiki service for a project.
DELETE /projects/:id/services/external-wiki DELETE /projects/:id/services/external-wiki
``` ```
### Get External Wiki service settings
Get External Wiki service settings for a project.
```
GET /projects/:id/services/external-wiki
```
## Flowdock ## Flowdock
Flowdock is a collaboration web app for technical teams. Flowdock is a collaboration web app for technical teams.
...@@ -261,6 +333,14 @@ Delete Flowdock service for a project. ...@@ -261,6 +333,14 @@ Delete Flowdock service for a project.
DELETE /projects/:id/services/flowdock DELETE /projects/:id/services/flowdock
``` ```
### Get Flowdock service settings
Get Flowdock service settings for a project.
```
GET /projects/:id/services/flowdock
```
## Gemnasium ## Gemnasium
Gemnasium monitors your project dependencies and alerts you about updates and security vulnerabilities. Gemnasium monitors your project dependencies and alerts you about updates and security vulnerabilities.
...@@ -286,6 +366,14 @@ Delete Gemnasium service for a project. ...@@ -286,6 +366,14 @@ Delete Gemnasium service for a project.
DELETE /projects/:id/services/gemnasium DELETE /projects/:id/services/gemnasium
``` ```
### Get Gemnasium service settings
Get Gemnasium service settings for a project.
```
GET /projects/:id/services/gemnasium
```
## GitLab CI ## GitLab CI
Continuous integration server from GitLab Continuous integration server from GitLab
...@@ -312,6 +400,14 @@ Delete GitLab CI service for a project. ...@@ -312,6 +400,14 @@ Delete GitLab CI service for a project.
DELETE /projects/:id/services/gitlab-ci DELETE /projects/:id/services/gitlab-ci
``` ```
### Get GitLab CI service settings
Get GitLab CI service settings for a project.
```
GET /projects/:id/services/gitlab-ci
```
## HipChat ## HipChat
Private group chat and IM Private group chat and IM
...@@ -341,6 +437,14 @@ Delete HipChat service for a project. ...@@ -341,6 +437,14 @@ Delete HipChat service for a project.
DELETE /projects/:id/services/hipchat DELETE /projects/:id/services/hipchat
``` ```
### Get HipChat service settings
Get HipChat service settings for a project.
```
GET /projects/:id/services/hipchat
```
## Irker (IRC gateway) ## Irker (IRC gateway)
Send IRC messages, on update, to a list of recipients through an Irker gateway. Send IRC messages, on update, to a list of recipients through an Irker gateway.
...@@ -371,6 +475,14 @@ Delete Irker (IRC gateway) service for a project. ...@@ -371,6 +475,14 @@ Delete Irker (IRC gateway) service for a project.
DELETE /projects/:id/services/irker DELETE /projects/:id/services/irker
``` ```
### Get Irker (IRC gateway) service settings
Get Irker (IRC gateway) service settings for a project.
```
GET /projects/:id/services/irker
```
## JIRA ## JIRA
Jira issue tracker Jira issue tracker
...@@ -400,6 +512,14 @@ Delete JIRA service for a project. ...@@ -400,6 +512,14 @@ Delete JIRA service for a project.
DELETE /projects/:id/services/jira DELETE /projects/:id/services/jira
``` ```
### Get JIRA service settings
Get JIRA service settings for a project.
```
GET /projects/:id/services/jira
```
## PivotalTracker ## PivotalTracker
Project Management Software (Source Commits Endpoint) Project Management Software (Source Commits Endpoint)
...@@ -424,6 +544,14 @@ Delete PivotalTracker service for a project. ...@@ -424,6 +544,14 @@ Delete PivotalTracker service for a project.
DELETE /projects/:id/services/pivotaltracker DELETE /projects/:id/services/pivotaltracker
``` ```
### Get PivotalTracker service settings
Get PivotalTracker service settings for a project.
```
GET /projects/:id/services/pivotaltracker
```
## Pushover ## Pushover
Pushover makes it easy to get real-time notifications on your Android device, iPhone, iPad, and Desktop. Pushover makes it easy to get real-time notifications on your Android device, iPhone, iPad, and Desktop.
...@@ -452,6 +580,14 @@ Delete Pushover service for a project. ...@@ -452,6 +580,14 @@ Delete Pushover service for a project.
DELETE /projects/:id/services/pushover DELETE /projects/:id/services/pushover
``` ```
### Get Pushover service settings
Get Pushover service settings for a project.
```
GET /projects/:id/services/pushover
```
## Redmine ## Redmine
Redmine issue tracker Redmine issue tracker
...@@ -479,6 +615,14 @@ Delete Redmine service for a project. ...@@ -479,6 +615,14 @@ Delete Redmine service for a project.
DELETE /projects/:id/services/redmine DELETE /projects/:id/services/redmine
``` ```
### Get Redmine service settings
Get Redmine service settings for a project.
```
GET /projects/:id/services/redmine
```
## Slack ## Slack
A team communication tool for the 21st century A team communication tool for the 21st century
...@@ -505,6 +649,14 @@ Delete Slack service for a project. ...@@ -505,6 +649,14 @@ Delete Slack service for a project.
DELETE /projects/:id/services/slack DELETE /projects/:id/services/slack
``` ```
### Get Slack service settings
Get Slack service settings for a project.
```
GET /projects/:id/services/slack
```
## JetBrains TeamCity CI ## JetBrains TeamCity CI
A continuous integration and build server A continuous integration and build server
...@@ -534,3 +686,11 @@ Delete JetBrains TeamCity CI service for a project. ...@@ -534,3 +686,11 @@ Delete JetBrains TeamCity CI service for a project.
DELETE /projects/:id/services/teamcity DELETE /projects/:id/services/teamcity
``` ```
### Get JetBrains TeamCity CI service settings
Get JetBrains TeamCity CI service settings for a project.
```
GET /projects/:id/services/teamcity
```
...@@ -49,6 +49,16 @@ module API ...@@ -49,6 +49,16 @@ module API
end end
end end
end end
# Get <service_slug> service settings for project
#
# Example Request:
#
# GET /project/:id/services/gitlab-ci
#
get ':id/services/:service_slug' do
present project_service
end
end end
end end
end end
...@@ -40,6 +40,15 @@ DELETE /projects/:id/services/<%= service[:dashed_name] %> ...@@ -40,6 +40,15 @@ DELETE /projects/:id/services/<%= service[:dashed_name] %>
``` ```
### Get <%= service[:title] %> service settings
Get <%= service[:title] %> service settings for a project.
```
GET /projects/:id/services/<%= service[:dashed_name] %>
```
<% end %> <% end %>
ERB ERB
......
...@@ -47,5 +47,15 @@ describe API::API, api: true do ...@@ -47,5 +47,15 @@ describe API::API, api: true do
expect(project.send(service_method).activated?).to be_falsey expect(project.send(service_method).activated?).to be_falsey
end end
end end
describe "GET /projects/:id/services/#{service.dasherize}" do
include_context service
it "should get #{service} settings" do
get api("/projects/#{project.id}/services/#{dashed_service}", user)
expect(response.status).to eq(200)
end
end
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment