From fe0a94174591471e2a21de08d4b865d77ba5483a Mon Sep 17 00:00:00 2001 From: Justin Date: Fri, 1 Jun 2018 22:15:34 -0400 Subject: [PATCH] Updating changelog and adding CommitDiscussions support --- CHANGELOG.md | 1 + README.md | 1 + src/index.js | 1 + src/services/CommitDiscussions.js | 9 +++++++++ src/services/index.js | 1 + test/tests/bundles/ProjectsBundle.js | 2 ++ 6 files changed, 15 insertions(+) create mode 100644 src/services/CommitDiscussions.js diff --git a/CHANGELOG.md b/CHANGELOG.md index 4de3844b0..50bed4c63 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ------------------ - Seperated out changelog - Adding ability to view pagination information, [#94](https://github.com/jdalrymple/node-gitlab/issues/94), via the showPagination option +- Adding CommitDiscussions and MergeRequestDiscussions support [3.4.0](https://github.com/jdalrymple/node-gitlab/tags/3.4.0) (2018-5-24) ------------------ diff --git a/README.md b/README.md index 5cc2af728..b8ced9aaa 100644 --- a/README.md +++ b/README.md @@ -188,6 +188,7 @@ Currently there are three Bundles: ``` Branches Commits +CommitDiscussions Deployments DeployKeys Environments diff --git a/src/index.js b/src/index.js index 3414875f6..a56a1e1eb 100644 --- a/src/index.js +++ b/src/index.js @@ -36,6 +36,7 @@ export const UsersBundle = Bundler(Pick(APIServices, [ export const ProjectsBundle = Bundler(Pick(APIServices, [ 'Branches', 'Commits', + 'CommitDiscussions', 'DeployKeys', 'Deployments', 'Environments', diff --git a/src/services/CommitDiscussions.js b/src/services/CommitDiscussions.js new file mode 100644 index 000000000..f0e04efeb --- /dev/null +++ b/src/services/CommitDiscussions.js @@ -0,0 +1,9 @@ +import { ResourceDiscussions } from '../templates'; + +class CommitDiscussions extends ResourceDiscussions { + constructor(options) { + super('projects', 'commits', options); + } +} + +export default CommitDiscussions; diff --git a/src/services/index.js b/src/services/index.js index 4726f7deb..14d48ac2d 100644 --- a/src/services/index.js +++ b/src/services/index.js @@ -24,6 +24,7 @@ export { default as UserGPGKeys } from './UserGPGKeys'; // Projects export { default as Branches } from './Branches'; export { default as Commits } from './Commits'; +export { default as CommitDiscussions } from './CommitDiscussions'; export { default as Deployments } from './Deployments'; export { default as DeployKeys } from './DeployKeys'; export { default as Environments } from './Environments'; diff --git a/test/tests/bundles/ProjectsBundle.js b/test/tests/bundles/ProjectsBundle.js index b37502aaf..5547622ae 100644 --- a/test/tests/bundles/ProjectsBundle.js +++ b/test/tests/bundles/ProjectsBundle.js @@ -6,6 +6,7 @@ test('All the correct service keys are included in the projects bundle', async ( const services = [ 'Branches', 'Commits', + 'CommitDiscussions', 'DeployKeys', 'Deployments', 'Environments', @@ -17,6 +18,7 @@ test('All the correct service keys are included in the projects bundle', async ( 'Labels', 'MergeRequests', 'MergeRequestAwardEmojis', + 'MergeRequestDiscussions', 'MergeRequestNotes', 'Pipelines', 'PipelineSchedules',