From 9248d4ce2b32c8887dd8f23eebc547c629636117 Mon Sep 17 00:00:00 2001 From: p-zielinski <82354717+p-zielinski@users.noreply.github.com> Date: Tue, 17 Oct 2023 16:31:36 +0200 Subject: [PATCH] minor changes --- CONTRIBUTING.md | 6 +++--- scripts/manage-project.ts | 36 ++++++++++++++++-------------------- 2 files changed, 19 insertions(+), 23 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1436a5d58..53f009d51 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -110,9 +110,9 @@ Good practices: - Run `npm run manage-project -- --vt={your name}-{pull request number or tag number} --create` - this will create new version project with your tag number. - Visit url provided at the end of the script run to test changes using preview on readme.io - If you need to make a change: - - Do changes... - - Run `npm run manage-project -- --vt={your name}-{pull request number or tag number} --update`- this will update your version. - - Test changes using preview on readme.io + - Do changes... + - Run `npm run manage-project -- --vt={your name}-{pull request number or tag number} --update`- this will update your version. + - Test changes using preview on readme.io - If changes are fine, then: - Add a note in the changelog. - `git commit; git push` diff --git a/scripts/manage-project.ts b/scripts/manage-project.ts index d871a1ee9..91568583b 100644 --- a/scripts/manage-project.ts +++ b/scripts/manage-project.ts @@ -168,26 +168,22 @@ const updateReferenceDocs = async (version) => { const createNewVersion = async (version) => { //create fork try { - const response = await fetch( - ` -https://dash.readme.com/api/v1/version`, - { - method: "POST", - headers: { - authorization: "Basic " + btoa(process.env.README_IO_AUTH + ":"), - "content-type": "application/json", - accept: "application/json", - }, - body: JSON.stringify({ - is_beta: false, - is_stable: false, - is_hidden: true, - is_deprecated: false, - from: mainVersion, - version, - }), - } - ); + const response = await fetch(`https://dash.readme.com/api/v1/version`, { + method: "POST", + headers: { + authorization: "Basic " + btoa(process.env.README_IO_AUTH + ":"), + "content-type": "application/json", + accept: "application/json", + }, + body: JSON.stringify({ + is_beta: false, + is_stable: false, + is_hidden: true, + is_deprecated: false, + from: mainVersion, + version, + }), + }); if (response.status !== 200) { throw new Error( `Response status: ${response.status}, maybe this versionTag is already created?`