Skip to content

Commit 28b7f58

Browse files
committed
Update PR relesae note script
1 parent 08db3f7 commit 28b7f58

File tree

1 file changed

+22
-5
lines changed

1 file changed

+22
-5
lines changed

scripts/prRelesaeNotes.js

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,31 @@ const fs = require('fs');
22
const _ = require('lodash');
33
const childProcess = require('child_process');
44
const fetch = require('node-fetch');
5+
const readline = require('readline');
56

6-
const GITHUB_TOKEN = 'bbb2a40e413ca175fc2a91f2aec8e46586da5279';
7-
const LATEST_VERSION = '5.14.0';
8-
const NEW_VERSION = '5.15.0';
9-
7+
const GITHUB_TOKEN = 'a0e1c50d4d4859bf5007453335c64e9f66d13ece';
8+
let LATEST_VERSION = '5.14.0';
9+
let NEW_VERSION = '5.15.0';
1010
let releaseNotes;
1111

12-
run();
12+
const rl = readline.createInterface({
13+
input: process.stdin,
14+
output: process.stdout
15+
});
16+
17+
rl.question(`What is the current version? `, currentVersion => {
18+
rl.question('What is the next version for release? ', newVersion => {
19+
LATEST_VERSION = currentVersion;
20+
NEW_VERSION = newVersion;
21+
rl.close();
22+
});
23+
});
24+
25+
rl.on('close', () => {
26+
console.info(`Current latest version is v${LATEST_VERSION}`);
27+
console.info(`Generating release notes out or PRs for v${NEW_VERSION}`);
28+
run();
29+
});
1330

1431
async function run() {
1532
const latestReleaseDate = await fetchLatestReleaseDate(LATEST_VERSION);

0 commit comments

Comments
 (0)