Skip to content

Commit 300b176

Browse files
authored
chore: remove push and local changes check (#457)
1 parent 798dde9 commit 300b176

File tree

1 file changed

+3
-16
lines changed

1 file changed

+3
-16
lines changed

scripts/release/create-release-issue.ts

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import dotenv from 'dotenv';
33
import semver from 'semver';
44

5-
import { getNbGitDiff } from '../ci/utils';
65
import {
76
LANGUAGES,
87
ROOT_ENV_PATH,
@@ -196,25 +195,13 @@ async function createReleaseIssue(): Promise<void> {
196195
);
197196
}
198197

199-
if (
200-
(await getNbGitDiff({
201-
head: null,
202-
})) !== 0
203-
) {
204-
throw new Error(
205-
'Working directory is not clean. Commit all the changes first.'
206-
);
207-
}
208-
209198
await run(`git rev-parse --verify refs/tags/${RELEASED_TAG}`, {
210199
errorMessage: '`released` tag is missing in this repository.',
211200
});
212201

213202
console.log('Pulling from origin...');
214-
run(`git pull`);
215-
216-
console.log('Pushing to origin...');
217-
run(`git push`);
203+
await run('git fetch origin');
204+
await run('git pull');
218205

219206
const commitsWithUnknownLanguageScope: string[] = [];
220207
const commitsWithoutLanguageScope: string[] = [];
@@ -295,7 +282,7 @@ async function createReleaseIssue(): Promise<void> {
295282
TEXT.approval,
296283
].join('\n\n');
297284

298-
const octokit = getOctokit(process.env.GITHUB_TOKEN!);
285+
const octokit = getOctokit(process.env.GITHUB_TOKEN);
299286

300287
octokit.rest.issues
301288
.create({

0 commit comments

Comments
 (0)