node-gitlab-api
Advanced tools
Comparing version 3.0.0-rc.4 to 3.0.0-rc.5
@@ -13,7 +13,7 @@ "use strict"; | ||
var _exportNames = { | ||
GroupNamespace: true, | ||
UserNamespace: true, | ||
ProjectNamespace: true | ||
GroupsBundle: true, | ||
UsersBundle: true, | ||
ProjectsBundle: true | ||
}; | ||
exports.default = exports.ProjectNamespace = exports.UserNamespace = exports.GroupNamespace = void 0; | ||
exports.default = exports.ProjectsBundle = exports.UsersBundle = exports.GroupsBundle = void 0; | ||
@@ -45,3 +45,3 @@ var APIServices = _interopRequireWildcard(require("./services")); | ||
GroupVariables = APIServices.GroupVariables; | ||
var GroupNamespace = (0, _Namespace.init)({ | ||
var GroupsBundle = (0, _Namespace.init)({ | ||
Groups: Groups, | ||
@@ -56,3 +56,3 @@ GroupAccessRequests: GroupAccessRequests, | ||
exports.GroupNamespace = GroupNamespace; | ||
exports.GroupsBundle = GroupsBundle; | ||
var Users = APIServices.Users, | ||
@@ -63,3 +63,3 @@ UserEmails = APIServices.UserEmails, | ||
UserGPGKeys = APIServices.UserGPGKeys; | ||
var UserNamespace = (0, _Namespace.init)({ | ||
var UsersBundle = (0, _Namespace.init)({ | ||
Users: Users, | ||
@@ -72,3 +72,3 @@ UserEmails: UserEmails, | ||
exports.UserNamespace = UserNamespace; | ||
exports.UsersBundle = UsersBundle; | ||
var Branches = APIServices.Branches, | ||
@@ -99,3 +99,3 @@ Commits = APIServices.Commits, | ||
Triggers = APIServices.Triggers; | ||
var ProjectNamespace = (0, _Namespace.init)({ | ||
var ProjectsBundle = (0, _Namespace.init)({ | ||
Branches: Branches, | ||
@@ -128,3 +128,3 @@ Commits: Commits, | ||
exports.ProjectNamespace = ProjectNamespace; | ||
exports.ProjectsBundle = ProjectsBundle; | ||
@@ -131,0 +131,0 @@ var _default = (0, _Namespace.init)(APIServices); |
@@ -10,2 +10,4 @@ "use strict"; | ||
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray")); | ||
var _getPrototypeOf = _interopRequireDefault(require("@babel/runtime/core-js/object/get-prototype-of")); | ||
@@ -39,2 +41,38 @@ | ||
} | ||
}, { | ||
key: "create", | ||
value: function create(projectId, options) { | ||
var pId = encodeURIComponent(projectId); | ||
return _infrastructure.RequestHelper.put(this, "projects/".concat(pId, "/environments"), options); | ||
} | ||
}, { | ||
key: "edit", | ||
value: function edit(projectId, environmentId, options) { | ||
var _map = [projectId, environmentId].map(encodeURIComponent), | ||
_map2 = (0, _slicedToArray2.default)(_map, 2), | ||
pId = _map2[0], | ||
eId = _map2[1]; | ||
return _infrastructure.RequestHelper.put(this, "projects/".concat(pId, "/environments/").concat(eId), options); | ||
} | ||
}, { | ||
key: "remove", | ||
value: function remove(projectId, environmentId) { | ||
var _map3 = [projectId, environmentId].map(encodeURIComponent), | ||
_map4 = (0, _slicedToArray2.default)(_map3, 2), | ||
pId = _map4[0], | ||
eId = _map4[1]; | ||
return _infrastructure.RequestHelper.delete(this, "projects/".concat(pId, "/environments/").concat(eId)); | ||
} | ||
}, { | ||
key: "stop", | ||
value: function stop(projectId, environmentId) { | ||
var _map5 = [projectId, environmentId].map(encodeURIComponent), | ||
_map6 = (0, _slicedToArray2.default)(_map5, 2), | ||
pId = _map6[0], | ||
eId = _map6[1]; | ||
return _infrastructure.RequestHelper.post(this, "projects/".concat(pId, "/environments/").concat(eId, "/stop")); | ||
} | ||
}]); | ||
@@ -41,0 +79,0 @@ return Environments; |
@@ -224,2 +224,8 @@ "use strict"; | ||
}); | ||
Object.defineProperty(exports, "Todos", { | ||
enumerable: true, | ||
get: function get() { | ||
return _Todos2.default; | ||
} | ||
}); | ||
Object.defineProperty(exports, "Triggers", { | ||
@@ -316,2 +322,4 @@ enumerable: true, | ||
var _Todos2 = _interopRequireDefault(require("/Todos")); | ||
var _Triggers2 = _interopRequireDefault(require("./Triggers")); | ||
@@ -318,0 +326,0 @@ |
@@ -134,4 +134,4 @@ "use strict"; | ||
}, { | ||
key: "createTodo", | ||
value: function createTodo(projectId, mergerequestId) { | ||
key: "edit", | ||
value: function edit(projectId, mergerequestId, options) { | ||
var _map13 = [projectId, mergerequestId].map(encodeURIComponent), | ||
@@ -142,12 +142,2 @@ _map14 = (0, _slicedToArray2.default)(_map13, 2), | ||
return _infrastructure.RequestHelper.post(this, "projects/".concat(pId, "/merge_requests/").concat(mId, "/todo")); | ||
} | ||
}, { | ||
key: "edit", | ||
value: function edit(projectId, mergerequestId, options) { | ||
var _map15 = [projectId, mergerequestId].map(encodeURIComponent), | ||
_map16 = (0, _slicedToArray2.default)(_map15, 2), | ||
pId = _map16[0], | ||
mId = _map16[1]; | ||
return _infrastructure.RequestHelper.put(this, "projects/".concat(pId, "/merge_requests/").concat(mId), options); | ||
@@ -176,2 +166,12 @@ } | ||
value: function remove(projectId, mergerequestId) { | ||
var _map15 = [projectId, mergerequestId].map(encodeURIComponent), | ||
_map16 = (0, _slicedToArray2.default)(_map15, 2), | ||
pId = _map16[0], | ||
mId = _map16[1]; | ||
return _infrastructure.RequestHelper.delete(this, "projects/".concat(pId, "/merge_requests/").concat(mId)); | ||
} | ||
}, { | ||
key: "show", | ||
value: function show(projectId, mergerequestId) { | ||
var _map17 = [projectId, mergerequestId].map(encodeURIComponent), | ||
@@ -182,7 +182,7 @@ _map18 = (0, _slicedToArray2.default)(_map17, 2), | ||
return _infrastructure.RequestHelper.delete(this, "projects/".concat(pId, "/merge_requests/").concat(mId)); | ||
return _infrastructure.RequestHelper.get(this, "projects/".concat(pId, "/merge_requests/").concat(mId)); | ||
} | ||
}, { | ||
key: "show", | ||
value: function show(projectId, mergerequestId) { | ||
key: "subscribe", | ||
value: function subscribe(projectId, mergerequestId, options) { | ||
var _map19 = [projectId, mergerequestId].map(encodeURIComponent), | ||
@@ -193,7 +193,7 @@ _map20 = (0, _slicedToArray2.default)(_map19, 2), | ||
return _infrastructure.RequestHelper.get(this, "projects/".concat(pId, "/merge_requests/").concat(mId)); | ||
return _infrastructure.RequestHelper.post(this, "projects/".concat(pId, "/merge_requests/").concat(mId, "/subscribe"), options); | ||
} | ||
}, { | ||
key: "subscribe", | ||
value: function subscribe(projectId, mergerequestId, options) { | ||
key: "resetSpentTime", | ||
value: function resetSpentTime(projectId, mergerequestId) { | ||
var _map21 = [projectId, mergerequestId].map(encodeURIComponent), | ||
@@ -204,7 +204,7 @@ _map22 = (0, _slicedToArray2.default)(_map21, 2), | ||
return _infrastructure.RequestHelper.post(this, "projects/".concat(pId, "/merge_requests/").concat(mId, "/subscribe"), options); | ||
return _infrastructure.RequestHelper.post(this, "projects/".concat(pId, "/merge_requests/").concat(mId, "/reset_spent_time")); | ||
} | ||
}, { | ||
key: "resetSpentTime", | ||
value: function resetSpentTime(projectId, mergerequestId) { | ||
key: "resetTimeEstimate", | ||
value: function resetTimeEstimate(projectId, mergerequestId) { | ||
var _map23 = [projectId, mergerequestId].map(encodeURIComponent), | ||
@@ -215,7 +215,7 @@ _map24 = (0, _slicedToArray2.default)(_map23, 2), | ||
return _infrastructure.RequestHelper.post(this, "projects/".concat(pId, "/merge_requests/").concat(mId, "/reset_spent_time")); | ||
return _infrastructure.RequestHelper.post(this, "projects/".concat(pId, "/merge_requests/").concat(mId, "/reset_time_estimate")); | ||
} | ||
}, { | ||
key: "resetTimeEstimate", | ||
value: function resetTimeEstimate(projectId, mergerequestId) { | ||
key: "spentTime", | ||
value: function spentTime(projectId, mergerequestId, duration) { | ||
var _map25 = [projectId, mergerequestId].map(encodeURIComponent), | ||
@@ -226,7 +226,9 @@ _map26 = (0, _slicedToArray2.default)(_map25, 2), | ||
return _infrastructure.RequestHelper.post(this, "projects/".concat(pId, "/merge_requests/").concat(mId, "/reset_time_estimate")); | ||
return _infrastructure.RequestHelper.post(this, "projects/".concat(pId, "/merge_requests/").concat(mId, "/add_spent_time"), { | ||
duration: duration | ||
}); | ||
} | ||
}, { | ||
key: "spentTime", | ||
value: function spentTime(projectId, mergerequestId, duration) { | ||
key: "timeEstimate", | ||
value: function timeEstimate(projectId, mergerequestId, duration) { | ||
var _map27 = [projectId, mergerequestId].map(encodeURIComponent), | ||
@@ -237,3 +239,3 @@ _map28 = (0, _slicedToArray2.default)(_map27, 2), | ||
return _infrastructure.RequestHelper.post(this, "projects/".concat(pId, "/merge_requests/").concat(mId, "/add_spent_time"), { | ||
return _infrastructure.RequestHelper.post(this, "projects/".concat(pId, "/merge_requests/").concat(mId, "/time_estimate"), { | ||
duration: duration | ||
@@ -243,4 +245,4 @@ }); | ||
}, { | ||
key: "timeEstimate", | ||
value: function timeEstimate(projectId, mergerequestId, duration) { | ||
key: "timeStats", | ||
value: function timeStats(projectId, mergerequestId) { | ||
var _map29 = [projectId, mergerequestId].map(encodeURIComponent), | ||
@@ -251,14 +253,2 @@ _map30 = (0, _slicedToArray2.default)(_map29, 2), | ||
return _infrastructure.RequestHelper.post(this, "projects/".concat(pId, "/merge_requests/").concat(mId, "/time_estimate"), { | ||
duration: duration | ||
}); | ||
} | ||
}, { | ||
key: "timeStats", | ||
value: function timeStats(projectId, mergerequestId) { | ||
var _map31 = [projectId, mergerequestId].map(encodeURIComponent), | ||
_map32 = (0, _slicedToArray2.default)(_map31, 2), | ||
pId = _map32[0], | ||
mId = _map32[1]; | ||
return _infrastructure.RequestHelper.get(this, "projects/".concat(pId, "/merge_requests/").concat(mId, "/time_stats")); | ||
@@ -269,7 +259,7 @@ } | ||
value: function version(projectId, mergerequestId, versionId) { | ||
var _map33 = [projectId, mergerequestId, versionId].map(encodeURIComponent), | ||
_map34 = (0, _slicedToArray2.default)(_map33, 3), | ||
pId = _map34[0], | ||
mId = _map34[1], | ||
vId = _map34[2]; | ||
var _map31 = [projectId, mergerequestId, versionId].map(encodeURIComponent), | ||
_map32 = (0, _slicedToArray2.default)(_map31, 3), | ||
pId = _map32[0], | ||
mId = _map32[1], | ||
vId = _map32[2]; | ||
@@ -281,6 +271,6 @@ return _infrastructure.RequestHelper.get(this, "projects/".concat(pId, "/merge_requests/").concat(mId, "/versions/").concat(vId)); | ||
value: function versions(projectId, mergerequestId) { | ||
var _map35 = [projectId, mergerequestId].map(encodeURIComponent), | ||
_map36 = (0, _slicedToArray2.default)(_map35, 2), | ||
pId = _map36[0], | ||
mId = _map36[1]; | ||
var _map33 = [projectId, mergerequestId].map(encodeURIComponent), | ||
_map34 = (0, _slicedToArray2.default)(_map33, 2), | ||
pId = _map34[0], | ||
mId = _map34[1]; | ||
@@ -292,6 +282,6 @@ return _infrastructure.RequestHelper.get(this, "projects/".concat(pId, "/merge_requests/").concat(mId, "/versions")); | ||
value: function unapprove(projectId, mergerequestId) { | ||
var _map37 = [projectId, mergerequestId].map(encodeURIComponent), | ||
_map38 = (0, _slicedToArray2.default)(_map37, 2), | ||
pId = _map38[0], | ||
mId = _map38[1]; | ||
var _map35 = [projectId, mergerequestId].map(encodeURIComponent), | ||
_map36 = (0, _slicedToArray2.default)(_map35, 2), | ||
pId = _map36[0], | ||
mId = _map36[1]; | ||
@@ -303,6 +293,6 @@ return _infrastructure.RequestHelper.post(this, "projects/".concat(pId, "/merge_requests/").concat(mId, "/approve")); | ||
value: function unsubscribe(projectId, mergerequestId) { | ||
var _map39 = [projectId, mergerequestId].map(encodeURIComponent), | ||
_map40 = (0, _slicedToArray2.default)(_map39, 2), | ||
pId = _map40[0], | ||
mId = _map40[1]; | ||
var _map37 = [projectId, mergerequestId].map(encodeURIComponent), | ||
_map38 = (0, _slicedToArray2.default)(_map37, 2), | ||
pId = _map38[0], | ||
mId = _map38[1]; | ||
@@ -309,0 +299,0 @@ return _infrastructure.RequestHelper.delete(this, "projects/".concat(pId, "/merge_requests/").concat(mId, "/unsubscribe")); |
@@ -10,2 +10,4 @@ "use strict"; | ||
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray")); | ||
var _getPrototypeOf = _interopRequireDefault(require("@babel/runtime/core-js/object/get-prototype-of")); | ||
@@ -48,4 +50,8 @@ | ||
value: function remove(projectId, tagName) { | ||
var pId = encodeURIComponent(projectId); | ||
return _infrastructure.RequestHelper.delete(this, "projects/".concat(pId, "/repository/tags/").concat(encodeURI(tagName))); | ||
var _map = [projectId, tagName].map(encodeURIComponent), | ||
_map2 = (0, _slicedToArray2.default)(_map, 2), | ||
pId = _map2[0], | ||
tId = _map2[1]; | ||
return _infrastructure.RequestHelper.delete(this, "projects/".concat(pId, "/repository/tags/").concat(tId)); | ||
} | ||
@@ -55,4 +61,8 @@ }, { | ||
value: function show(projectId, tagName) { | ||
var pId = encodeURIComponent(projectId); | ||
return _infrastructure.RequestHelper.get(this, "projects/".concat(pId, "/repository/tags/").concat(encodeURI(tagName))); | ||
var _map3 = [projectId, tagName].map(encodeURIComponent), | ||
_map4 = (0, _slicedToArray2.default)(_map3, 2), | ||
pId = _map4[0], | ||
tId = _map4[1]; | ||
return _infrastructure.RequestHelper.get(this, "projects/".concat(pId, "/repository/tags/").concat(tId)); | ||
} | ||
@@ -59,0 +69,0 @@ }]); |
@@ -7,7 +7,7 @@ "use strict"; | ||
var _exportNames = { | ||
GroupNamespace: true, | ||
UserNamespace: true, | ||
ProjectNamespace: true | ||
GroupsBundle: true, | ||
UsersBundle: true, | ||
ProjectsBundle: true | ||
}; | ||
exports.default = exports.ProjectNamespace = exports.UserNamespace = exports.GroupNamespace = void 0; | ||
exports.default = exports.ProjectsBundle = exports.UsersBundle = exports.GroupsBundle = void 0; | ||
@@ -42,3 +42,3 @@ var APIServices = _interopRequireWildcard(require("./services")); | ||
} = APIServices; | ||
const GroupNamespace = (0, _Namespace.init)({ | ||
const GroupsBundle = (0, _Namespace.init)({ | ||
Groups, | ||
@@ -53,3 +53,3 @@ GroupAccessRequests, | ||
exports.GroupNamespace = GroupNamespace; | ||
exports.GroupsBundle = GroupsBundle; | ||
const { | ||
@@ -62,3 +62,3 @@ Users, | ||
} = APIServices; | ||
const UserNamespace = (0, _Namespace.init)({ | ||
const UsersBundle = (0, _Namespace.init)({ | ||
Users, | ||
@@ -71,3 +71,3 @@ UserEmails, | ||
exports.UserNamespace = UserNamespace; | ||
exports.UsersBundle = UsersBundle; | ||
const { | ||
@@ -100,3 +100,3 @@ Branches, | ||
} = APIServices; | ||
const ProjectNamespace = (0, _Namespace.init)({ | ||
const ProjectsBundle = (0, _Namespace.init)({ | ||
Branches, | ||
@@ -129,3 +129,3 @@ Commits, | ||
exports.ProjectNamespace = ProjectNamespace; | ||
exports.ProjectsBundle = ProjectsBundle; | ||
@@ -132,0 +132,0 @@ var _default = (0, _Namespace.init)(APIServices); |
@@ -16,2 +16,22 @@ "use strict"; | ||
create(projectId, options) { | ||
const pId = encodeURIComponent(projectId); | ||
return _infrastructure.RequestHelper.put(this, `projects/${pId}/environments`, options); | ||
} | ||
edit(projectId, environmentId, options) { | ||
const [pId, eId] = [projectId, environmentId].map(encodeURIComponent); | ||
return _infrastructure.RequestHelper.put(this, `projects/${pId}/environments/${eId}`, options); | ||
} | ||
remove(projectId, environmentId) { | ||
const [pId, eId] = [projectId, environmentId].map(encodeURIComponent); | ||
return _infrastructure.RequestHelper.delete(this, `projects/${pId}/environments/${eId}`); | ||
} | ||
stop(projectId, environmentId) { | ||
const [pId, eId] = [projectId, environmentId].map(encodeURIComponent); | ||
return _infrastructure.RequestHelper.post(this, `projects/${pId}/environments/${eId}/stop`); | ||
} | ||
} | ||
@@ -18,0 +38,0 @@ |
@@ -222,2 +222,8 @@ "use strict"; | ||
}); | ||
Object.defineProperty(exports, "Todos", { | ||
enumerable: true, | ||
get: function () { | ||
return _Todos2.default; | ||
} | ||
}); | ||
Object.defineProperty(exports, "Triggers", { | ||
@@ -314,2 +320,4 @@ enumerable: true, | ||
var _Todos2 = _interopRequireDefault(require("/Todos")); | ||
var _Triggers2 = _interopRequireDefault(require("./Triggers")); | ||
@@ -316,0 +324,0 @@ |
@@ -79,7 +79,2 @@ "use strict"; | ||
createTodo(projectId, mergerequestId) { | ||
const [pId, mId] = [projectId, mergerequestId].map(encodeURIComponent); | ||
return _infrastructure.RequestHelper.post(this, `projects/${pId}/merge_requests/${mId}/todo`); | ||
} | ||
edit(projectId, mergerequestId, options) { | ||
@@ -86,0 +81,0 @@ const [pId, mId] = [projectId, mergerequestId].map(encodeURIComponent); |
@@ -22,9 +22,9 @@ "use strict"; | ||
remove(projectId, tagName) { | ||
const pId = encodeURIComponent(projectId); | ||
return _infrastructure.RequestHelper.delete(this, `projects/${pId}/repository/tags/${encodeURI(tagName)}`); | ||
const [pId, tId] = [projectId, tagName].map(encodeURIComponent); | ||
return _infrastructure.RequestHelper.delete(this, `projects/${pId}/repository/tags/${tId}`); | ||
} | ||
show(projectId, tagName) { | ||
const pId = encodeURIComponent(projectId); | ||
return _infrastructure.RequestHelper.get(this, `projects/${pId}/repository/tags/${encodeURI(tagName)}`); | ||
const [pId, tId] = [projectId, tagName].map(encodeURIComponent); | ||
return _infrastructure.RequestHelper.get(this, `projects/${pId}/repository/tags/${tId}`); | ||
} | ||
@@ -31,0 +31,0 @@ |
{ | ||
"name": "node-gitlab-api", | ||
"version": "3.0.0-rc.4", | ||
"version": "3.0.0-rc.5", | ||
"description": "Full NodeJS implementation of the GitLab API. Supports Promises, Async/Await.", | ||
@@ -5,0 +5,0 @@ "main": "dist/latest/index.js", |
@@ -19,3 +19,3 @@ [![dependencies Status](https://david-dm.org/jdalrymple/node-gitlab-api/status.svg)](https://david-dm.org/jdalrymple/node-gitlab-api)[![devDependencies Status](https://david-dm.org/jdalrymple/node-gitlab-api/dev-status.svg)](https://david-dm.org/jdalrymple/node-gitlab-api?type=dev)[![Code Climate](https://codeclimate.com/github/jdalrymple/node-gitlab-api/badges/gpa.svg)](https://codeclimate.com/github/jdalrymple/node-gitlab-api)[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) | ||
* [Specific Imports](#specific-imports) | ||
* [Namespace Imports](#namespace-imports) | ||
* [Bundle Imports](#bundle-imports) | ||
* [Examples](#examples) | ||
@@ -87,4 +87,5 @@ * [Pagination](#pagination) | ||
// General | ||
Events | ||
SystemHooks | ||
Events | ||
Todos | ||
@@ -135,11 +136,11 @@ ``` | ||
#### Namespace Imports | ||
#### Bundle Imports | ||
It can be annoying to have to import all the API's pertaining to a specific resource. For example, the Projects resource is composed of many API's, Projects, Issues, Labels, MergeRequests, etc. For convience, there is a Namespace export for importing and instantiating all these related API's at once. | ||
It can be annoying to have to import all the API's pertaining to a specific resource. For example, the Projects resource is composed of many API's, Projects, Issues, Labels, MergeRequests, etc. For convience, there is a Bundle export for importing and instantiating all these related API's at once. | ||
```javascript | ||
import { ProjectsNamespace } from 'node-gitlab-api'; | ||
import { ProjectsBundle } from 'node-gitlab-api'; | ||
const services = new ProjectsNamespace({ | ||
const services = new ProjectsBundle({ | ||
url: 'http://example.com', // Defaults to http://gitlab.com | ||
@@ -155,4 +156,4 @@ token: 'abcdefghij123456' //Can be created in your profile. | ||
Currently there are three Namespaces: | ||
1. ProjectsNamespace which includes: | ||
Currently there are three Bundles: | ||
1. ProjectsBundle which includes: | ||
``` | ||
@@ -186,3 +187,3 @@ Branches, | ||
2. UsersNamespace which includes: | ||
2. UsersBundle which includes: | ||
``` | ||
@@ -196,3 +197,3 @@ Users, | ||
3. GroupsNamespace which includes: | ||
3. GroupsBundle which includes: | ||
``` | ||
@@ -320,3 +321,3 @@ Groups, | ||
- Exporting all services seperatly ie. const { Projects } from 'node-gitlab-api'; as well as the usual default export: const Gitlab from 'node-gitlab-api' | ||
- Exporting namespaces which are groups of related API's. These include: ProjectsNamespace, UsersNamespace and GroupsNamespace | ||
- Exporting bunbles which are groups of related API's. These include: ProjectsBundle, UsersBundle and GroupsBundle | ||
- Added activies support to the Users service | ||
@@ -333,2 +334,4 @@ - Added events support to the Projects, and Users | ||
- Fixed problem with .all() functions where only the some of the results were being returned | ||
- Added full support for Enviroments | ||
- Added support for Todos | ||
@@ -344,3 +347,3 @@ ### Breaking Changes between 2.2.6 and 3.0.0 | ||
``` | ||
- Moved createTodo function from MergeRequests API to Todos API | ||
- Many services have been renamed: | ||
@@ -347,0 +350,0 @@ ``` |
@@ -18,3 +18,3 @@ import * as APIServices from './services'; | ||
export const GroupNamespace = init({ | ||
export const GroupsBundle = init({ | ||
Groups, | ||
@@ -32,3 +32,3 @@ GroupAccessRequests, | ||
export const UserNamespace = init({ | ||
export const UsersBundle = init({ | ||
Users, | ||
@@ -70,3 +70,3 @@ UserEmails, | ||
export const ProjectNamespace = init({ | ||
export const ProjectsBundle = init({ | ||
Branches, | ||
@@ -73,0 +73,0 @@ Commits, |
@@ -9,4 +9,28 @@ import { BaseService, RequestHelper } from '../infrastructure'; | ||
} | ||
create(projectId, options) { | ||
const pId = encodeURIComponent(projectId); | ||
return RequestHelper.put(this, `projects/${pId}/environments`, options); | ||
} | ||
edit(projectId, environmentId, options) { | ||
const [pId, eId] = [projectId, environmentId].map(encodeURIComponent); | ||
return RequestHelper.put(this, `projects/${pId}/environments/${eId}`, options); | ||
} | ||
remove(projectId, environmentId) { | ||
const [pId, eId] = [projectId, environmentId].map(encodeURIComponent); | ||
return RequestHelper.delete(this, `projects/${pId}/environments/${eId}`); | ||
} | ||
stop(projectId, environmentId) { | ||
const [pId, eId] = [projectId, environmentId].map(encodeURIComponent); | ||
return RequestHelper.post(this, `projects/${pId}/environments/${eId}/stop`); | ||
} | ||
} | ||
export default Environments; |
@@ -42,2 +42,3 @@ // Groups | ||
export Tags from './Tags'; | ||
export Todos from '/Todos'; | ||
export Triggers from './Triggers'; | ||
@@ -44,0 +45,0 @@ |
@@ -72,8 +72,2 @@ import { BaseService, RequestHelper } from '../infrastructure'; | ||
createTodo(projectId, mergerequestId) { | ||
const [pId, mId] = [projectId, mergerequestId].map(encodeURIComponent); | ||
return RequestHelper.post(this, `projects/${pId}/merge_requests/${mId}/todo`); | ||
} | ||
edit(projectId, mergerequestId, options) { | ||
@@ -80,0 +74,0 @@ const [pId, mId] = [projectId, mergerequestId].map(encodeURIComponent); |
@@ -17,17 +17,11 @@ import { BaseService, RequestHelper } from '../infrastructure'; | ||
remove(projectId, tagName) { | ||
const pId = encodeURIComponent(projectId); | ||
const [pId, tId] = [projectId, tagName].map(encodeURIComponent); | ||
return RequestHelper.delete( | ||
this, | ||
`projects/${pId}/repository/tags/${encodeURI(tagName)}`, | ||
); | ||
return RequestHelper.delete(this, `projects/${pId}/repository/tags/${tId}`); | ||
} | ||
show(projectId, tagName) { | ||
const pId = encodeURIComponent(projectId); | ||
const [pId, tId] = [projectId, tagName].map(encodeURIComponent); | ||
return RequestHelper.get( | ||
this, | ||
`projects/${pId}/repository/tags/${encodeURI(tagName)}`, | ||
); | ||
return RequestHelper.get(this, `projects/${pId}/repository/tags/${tId}`); | ||
} | ||
@@ -34,0 +28,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
330077
184
6803
601