Skip to content

Commit 5b3ee1a

Browse files
committed
Fix public QA
1 parent 3906ff8 commit 5b3ee1a

5 files changed

Lines changed: 8 additions & 8 deletions

File tree

dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"build": "tsc --outDir build && ncc -m build -o dist ./index.ts",
2929
"prettify": "prettier --write src/**/*.ts index.ts",
3030
"lint": "eslint ./src --ext .ts",
31-
"lint:test": "eslint --config ./tests/.eslintrc.js ./tests --ext .ts",
31+
"lint:test": "eslint ./tests --ext .ts",
3232
"prepare": "husky",
3333
"test": "jest --config ./tests/jest.config.ts",
3434
"qa": "yarn lint && yarn lint:test && yarn test"

src/create-git.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ type PossibleValue = boolean | string | number | Array<unknown> | undefined | nu
55

66
let git: SimpleGit | null = null;
77

8-
export function createGit(): SimpleGit {
8+
export async function createGit(): Promise<SimpleGit> {
99
if (git) {
1010
return git;
1111
}
@@ -21,11 +21,11 @@ export function createGit(): SimpleGit {
2121

2222
git = gitFactory({ baseDir: workingDirectory });
2323

24-
git
24+
await git
2525
.addConfig('user.name', userName)
2626
.addConfig('user.email', userEmail)
2727
.addConfig('advice.addIgnoredFile', 'false');
28-
} catch (error: Error | unknown) {
28+
} catch (error: unknown) {
2929
const message = String(error instanceof Error ? error.message : error);
3030
console.warn(`Warning: ${message}`);
3131
}
@@ -35,7 +35,7 @@ export function createGit(): SimpleGit {
3535
return git;
3636
}
3737

38-
function assertGit(git: unknown | null): asserts git is SimpleGit {
38+
function assertGit(git: unknown): asserts git is SimpleGit {
3939
if (git === null) {
4040
throw new Error('Git is not initialized.');
4141
}

src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { Configuration } from './configuration';
88
async function main(): Promise<void> {
99
const configuration = new Configuration(core.getInput.bind(core));
1010

11-
const git = createGit();
11+
const git = await createGit();
1212
const tags = new Tags(git);
1313
const artifacts = new Artifacts(git, tags, configuration);
1414
const temporaryBranch = new TemporaryBranch(git);

src/model/artifacts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export class Artifacts {
1919
await this.tags.collect();
2020
await this.deploy();
2121
await this.tags.move();
22-
} catch (error: Error | unknown) {
22+
} catch (error: unknown) {
2323
core.endGroup();
2424
const message = String(error instanceof Error ? error.message : error);
2525
throw new Error(`Failed creating artifacts: ${message}`);

0 commit comments

Comments
 (0)