Skip to content

Commit

Permalink
Fix public QA
Browse files Browse the repository at this point in the history
  • Loading branch information
widoz committed Aug 15, 2024
1 parent 3906ff8 commit 5b3ee1a
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"build": "tsc --outDir build && ncc -m build -o dist ./index.ts",
"prettify": "prettier --write src/**/*.ts index.ts",
"lint": "eslint ./src --ext .ts",
"lint:test": "eslint --config ./tests/.eslintrc.js ./tests --ext .ts",
"lint:test": "eslint ./tests --ext .ts",
"prepare": "husky",
"test": "jest --config ./tests/jest.config.ts",
"qa": "yarn lint && yarn lint:test && yarn test"
Expand Down
8 changes: 4 additions & 4 deletions src/create-git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ type PossibleValue = boolean | string | number | Array<unknown> | undefined | nu

let git: SimpleGit | null = null;

export function createGit(): SimpleGit {
export async function createGit(): Promise<SimpleGit> {
if (git) {
return git;
}
Expand All @@ -21,11 +21,11 @@ export function createGit(): SimpleGit {

git = gitFactory({ baseDir: workingDirectory });

git
await git
.addConfig('user.name', userName)
.addConfig('user.email', userEmail)
.addConfig('advice.addIgnoredFile', 'false');
} catch (error: Error | unknown) {
} catch (error: unknown) {
const message = String(error instanceof Error ? error.message : error);
console.warn(`Warning: ${message}`);
}
Expand All @@ -35,7 +35,7 @@ export function createGit(): SimpleGit {
return git;
}

function assertGit(git: unknown | null): asserts git is SimpleGit {
function assertGit(git: unknown): asserts git is SimpleGit {
if (git === null) {
throw new Error('Git is not initialized.');
}
Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Configuration } from './configuration';
async function main(): Promise<void> {
const configuration = new Configuration(core.getInput.bind(core));

const git = createGit();
const git = await createGit();
const tags = new Tags(git);
const artifacts = new Artifacts(git, tags, configuration);
const temporaryBranch = new TemporaryBranch(git);
Expand Down
2 changes: 1 addition & 1 deletion src/model/artifacts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class Artifacts {
await this.tags.collect();
await this.deploy();
await this.tags.move();
} catch (error: Error | unknown) {
} catch (error: unknown) {
core.endGroup();
const message = String(error instanceof Error ? error.message : error);
throw new Error(`Failed creating artifacts: ${message}`);
Expand Down

0 comments on commit 5b3ee1a

Please sign in to comment.