From 9e2e3f5c840f31b2e8250925c36894b5fd317f3d Mon Sep 17 00:00:00 2001 From: harshithad0703 Date: Mon, 12 Aug 2024 14:13:43 +0530 Subject: [PATCH] Fix file upload function in sanity report file --- CHANGELOG.md | 4 ++++ package-lock.json | 4 ++-- package.json | 2 +- sanity-report.js | 4 ++-- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f9a476a..9ea9f4f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## Change log +### Version: 3.20.4 +#### Date: August-16-2024 +##### Fix: + - Fix file upload function in sanity report file ### Version: 3.20.3 #### Date: August-02-2024 diff --git a/package-lock.json b/package-lock.json index ae9debb3..9e0c2223 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "contentstack", - "version": "3.20.3", + "version": "3.20.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "contentstack", - "version": "3.20.3", + "version": "3.20.4", "license": "MIT", "dependencies": { "@contentstack/utils": "^1.3.10", diff --git a/package.json b/package.json index 997508a3..e78239a9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "contentstack", - "version": "3.20.3", + "version": "3.20.4", "description": "Contentstack Javascript SDK", "homepage": "https://www.contentstack.com/", "author": { diff --git a/sanity-report.js b/sanity-report.js index 020b5801..6189bf9a 100644 --- a/sanity-report.js +++ b/sanity-report.js @@ -50,9 +50,9 @@ async function publishMessage (text, report) { channel: process.env.SLACK_CHANNEL, text: text }) - await app.client.files.upload({ + await app.client.files.uploadV2({ token: process.env.SLACK_BOT_TOKEN, - channels: process.env.SLACK_CHANNEL, + channel_id: process.env.SLACK_CHANNEL_ID, initial_comment: '*Here is the report generated*', filetype: 'html', filename: 'tap-html.html',