Skip to content

Commit da8a595

Browse files
authored
Merge branch 'master' into feature/useXMLHttpRequest
2 parents b792d22 + 027d2c4 commit da8a595

8 files changed

Lines changed: 25 additions & 27 deletions

File tree

README.md

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -373,26 +373,36 @@ This started off as a fork from [node-gitlab](https://github.com/node-gitlab/nod
373373
- [Claude Abounegm](https://github.com/claude-abounegm)
374374
- [Stefan Hall](https://github.com/Marethyu1)
375375
- [Jordan Wallet](https://github.com/Mr-Wallet)
376+
- [Ev Haus](https://github.com/EvHaus)
377+
- [zhao0](https://github.com/zhao0)
376378
- [Joshua Grosso](https://github.com/jgrosso)
377379

378-
379380
## License
380381

381382
[MIT](https://github.com/jdalrymple/node-gitlab-api/blob/master/LICENSE.md)
382383

383384
## Changelog
384385

386+
[3.0.4](https://github.com/jdalrymple/node-gitlab-api/tags/3.0.4) (2018-4-13)
387+
------------------
388+
- Fixed endpoint for MergeRequestNotes thanks to [Ev Haus](https://github.com/EvHaus) in PR [#63](https://github.com/jdalrymple/node-gitlab-api/pull/63)
389+
- Fixed Commits.editStatus method thanks to [zhao0](https://github.com/zhao0) in PR [#65](https://github.com/jdalrymple/node-gitlab-api/pull/65)
390+
391+
[3.0.3](https://github.com/jdalrymple/node-gitlab-api/tags/3.0.3) (2018-4-5)
392+
------------------
393+
- Fixed the problem with the validation of Event resource options
394+
385395
[3.0.0](https://github.com/jdalrymple/node-gitlab-api/tags/3.0.0) (2018-4-2)
386396
------------------
387397
- Exporting all services seperatly ie. const { Projects } from 'node-gitlab-api'; as well as the usual default export: const Gitlab from 'node-gitlab-api'
388398
- Exporting bunbles which are groups of related API's. These include: ProjectsBundle, UsersBundle and GroupsBundle
389399
- Added events support to the Projects, and Users
390400
- Added full support for ProjectVariables and GroupVariables
391401
- Added support for Events. This is also exposed in Projects and Users under the events function
392-
- Fixed the missing options parameter for the ProjectMembers and GroupMemebers APIs in PR [#45] thanks to [Stefan Hall](https://github.com/Marethyu1)
402+
- Fixed the missing options parameter for the ProjectMembers and GroupMemebers APIs in PR [#45](https://github.com/jdalrymple/node-gitlab-api/pull/45) thanks to [Stefan Hall](https://github.com/Marethyu1)
393403
- Supporting both camelCase and snake_case option properties: `projects.all({perPage:5}) === projects.all({per_page: 5})`
394404
- Fixed problem with .all() functions where only the some of the results were being returned
395-
- Completed support for all Gitlab APIs, #49, #53
405+
- Completed support for all Gitlab APIs, [#49](https://github.com/jdalrymple/node-gitlab-api/pull/49), [#53](https://github.com/jdalrymple/node-gitlab-api/pull/53)
396406

397407
### Breaking Changes between 2.2.6 and 3.0.0
398408
- Instantiation of the API must use the new operator consistently. See usage above.
@@ -441,23 +451,11 @@ Runners = ProjectRunners + Runners. ProjectId is optional for all()
441451
------------------
442452
- Fixed #48 - Problem with trailing `\` in url
443453

444-
[2.2.4](https://github.com/jdalrymple/node-gitlab-api/5d7c031ca2b833b28633647195560379d88ba5b3) (2018-2-12)
445-
------------------
446-
- Fixing babel runtime
447-
448-
[2.2.6](https://github.com/jdalrymple/node-gitlab-api/tags/2.2.6) (2018-3-15)
449-
------------------
450-
- Fixed more issues within the url concatenation
451-
452-
[2.2.5](https://github.com/jdalrymple/node-gitlab-api/tags/2.2.5) (2018-3-15)
453-
------------------
454-
- Fixed #48 - Problem with trailing `\` in url
455-
456454
[2.2.4](https://github.com/jdalrymple/node-gitlab-api/ce7f17693168b5dec3b36eb1d5ab796c9374613f) (2018-2-3)
457455
------------------
458456
- Fixed #33 - Bug within the es5 transpilling configuration
459-
- Fixed the missing options for tags.all #40
460-
- Added delete key method to UserKeys.js #41 thanks to [Claude Abounegm](https://github.com/claude-abounegm)
457+
- Fixed the missing options for tags.all [#40](https://github.com/jdalrymple/node-gitlab-api/pull/40)
458+
- Added delete key method to UserKeys.js [#41](https://github.com/jdalrymple/node-gitlab-api/pull/41) thanks to [Claude Abounegm](https://github.com/claude-abounegm)
461459

462460
[2.2.3](https://github.com/jdalrymple/node-gitlab-api/ce7f17693168b5dec3b36eb1d5ab796c9374613f) (2018-2-3)
463461
------------------
@@ -608,7 +606,7 @@ inferred from the file path
608606

609607
[1.0.10](https://github.com/jdalrymple/node-gitlab-api/commit/c4a55aba89d83fda1552b3d5688b090b0c2b60aa) (2017-07-13)
610608
------------------
611-
- Fixing Issues #1, #2, and #3
609+
- Fixing Issues [#1](https://github.com/jdalrymple/node-gitlab-api/pull/1), [#2](https://github.com/jdalrymple/node-gitlab-api/pull/3), and [#3](https://github.com/jdalrymple/node-gitlab-api/pull/3)
612610

613611
[1.0.9](https://github.com/jdalrymple/node-gitlab-api/commit/7a90dbb6354fe956fff37c56f938a833e3fc5ea1) (2017-07-06)
614612
------------------

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gitlab",
3-
"version": "3.0.1",
3+
"version": "3.0.4",
44
"description": "Full NodeJS implementation of the GitLab API. Supports Promises, Async/Await.",
55
"main": "dist/latest/index.js",
66
"engines": {

src/services/Commits.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class Commits extends BaseService {
4848
editStatus(projectId, sha, options) {
4949
const pId = encodeURIComponent(projectId);
5050

51-
return RequestHelper.get(this, `projects/${pId}/repository/commits/${sha}/statuses`, options);
51+
return RequestHelper.post(this, `projects/${pId}/statuses/${sha}`, options);
5252
}
5353

5454
references(projectId, sha) {

src/services/Events.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ const TARGET_TYPES = [
2525
];
2626

2727
function validateEventOptions(action, target) {
28-
if (!ACTION_TYPES.includes(action)) {
28+
if (action && !ACTION_TYPES.includes(action)) {
2929
throw new Error(`This action is not supported. Pleased use one of following options: ${ACTION_TYPES}`);
3030
}
3131

32-
if (!TARGET_TYPES.includes(target)) {
32+
if (target && !TARGET_TYPES.includes(target)) {
3333
throw new Error(`This target is not supported. Pleased use one of following options: ${TARGET_TYPES}`);
3434
}
3535
}

src/services/MergeRequestNotes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { ResourceNotes } from '../templates';
22

33
class MergeRequestNotes extends ResourceNotes {
44
constructor(options) {
5-
super('projects', 'mergerequests', options);
5+
super('projects', 'merge_requests', options);
66
}
77
}
88

src/services/UserEmails.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { BaseService, RequestHelper } from '../infrastructure';
22

3-
const url = userId => (userId ? `users/${encodeURIComponent(userId)}/emails` : 'users/emails');
3+
const url = userId => (userId ? `users/${encodeURIComponent(userId)}/emails` : 'user/emails');
44

55
class UserEmails extends BaseService {
66
all({ userId } = {}) {
@@ -16,7 +16,7 @@ class UserEmails extends BaseService {
1616
show(emailId) {
1717
const eId = encodeURIComponent(emailId);
1818

19-
return RequestHelper.get(this, `users/emails/${eId}`);
19+
return RequestHelper.get(this, `user/emails/${eId}`);
2020
}
2121

2222
remove(emailId, { userId } = {}) {

src/services/UserKeys.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { BaseService, RequestHelper } from '../infrastructure';
22

3-
const url = userId => (userId ? `users/${encodeURIComponent(userId)}/keys` : 'users/keys');
3+
const url = userId => (userId ? `users/${encodeURIComponent(userId)}/keys` : 'user/keys');
44

55
class UserKeys extends BaseService {
66
all({ userId }) {

0 commit comments

Comments
 (0)