Skip to content

Commit 7e84d3a

Browse files
authored
build: in release notes script, do not assume electron dirname (electron#24927)
1 parent 29a7b8f commit 7e84d3a

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

script/release/notes/notes.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const octokit = new Octokit({
1111
auth: process.env.ELECTRON_GITHUB_TOKEN
1212
});
1313

14-
const { SRC_DIR } = require('../../lib/utils');
14+
const { ELECTRON_DIR } = require('../../lib/utils');
1515

1616
const MAX_FAIL_COUNT = 3;
1717
const CHECK_INTERVAL = 5000;
@@ -387,13 +387,12 @@ const getNotes = async (fromRef, toRef, newVersion) => {
387387
}
388388

389389
const pool = new Pool();
390-
const electronDir = path.resolve(SRC_DIR, 'electron');
391-
const toBranch = await getBranchNameOfRef(toRef, electronDir);
390+
const toBranch = await getBranchNameOfRef(toRef, ELECTRON_DIR);
392391

393392
console.log(`Generating release notes between ${fromRef} and ${toRef} for version ${newVersion} in branch ${toBranch}`);
394393

395394
// get the electron/electron commits
396-
const electron = { owner: 'electron', repo: 'electron', dir: electronDir };
395+
const electron = { owner: 'electron', repo: 'electron', dir: ELECTRON_DIR };
397396
await addRepoToPool(pool, electron, fromRef, toRef);
398397

399398
// remove any old commits

0 commit comments

Comments
 (0)