diff --git a/package-lock.json b/package-lock.json index 6f78261..9785fe3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@co-digital/api-sdk", - "version": "1.0.5", + "version": "1.0.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@co-digital/api-sdk", - "version": "1.0.5", + "version": "1.0.6", "license": "MIT", "dependencies": { "axios": "^1.6.0" diff --git a/package.json b/package.json index 53d7d51..0da9379 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@co-digital/api-sdk", - "version": "1.0.5", + "version": "1.0.6", "description": "An API SDK for Node.JS applications in CO Digital.", "homepage": "https://github.com/cabinetoffice/node-api-sdk#README.md", "main": "./lib/index.js", diff --git a/src/api-sdk/github/github.ts b/src/api-sdk/github/github.ts index 5e397a5..1ad195a 100644 --- a/src/api-sdk/github/github.ts +++ b/src/api-sdk/github/github.ts @@ -31,7 +31,7 @@ export class Github { // Create Issue on defined repo public async postIssue (url: string, body: GitHubIssueRequest): Promise | ApiErrorResponse> { - const response = await this.request.httpPost(url, body); + const response = await this.request.httpPost(url, JSON.stringify(body)); return this.responseHandler(response); } diff --git a/src/api-sdk/github/type.ts b/src/api-sdk/github/type.ts index bbea37e..ba5986d 100644 --- a/src/api-sdk/github/type.ts +++ b/src/api-sdk/github/type.ts @@ -44,7 +44,6 @@ export interface GitHubCollaboratorsPerRepo { export interface GitHubIssueRequest { title: string, body: string, - milestone: number, assignees: string[], labels: string[] } diff --git a/test/mock/data.mock.ts b/test/mock/data.mock.ts index 9423cda..cd99525 100644 --- a/test/mock/data.mock.ts +++ b/test/mock/data.mock.ts @@ -157,7 +157,6 @@ export const MOCK_ISSUE_BODY = { title: "Add member to the team", body: "Add member Bob to the team Alice.", assignees: ["IDC TEAM"], - milestone: 1, labels: ["GIT"] };