Skip to content

Commit

Permalink
fix post
Browse files Browse the repository at this point in the history
  • Loading branch information
DE7924 committed Dec 20, 2024
1 parent 2caead7 commit a49d64e
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 9 deletions.
12 changes: 8 additions & 4 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,12 @@ export async function run(): Promise<void> {
command: "npm i --ignore-scripts",
});

// run Static Analysis
const cemStr: StepResponse | undefined = await commandComment({
label: "Custom Elements Manifest",
command: "npm run analyze",
});

// run Static Analysis
const eslintStr: StepResponse | undefined = doStaticAnalysis
? await eslint({ label: "ESLint", command: "npm run lint" })
: undefined;
Expand All @@ -173,14 +173,14 @@ export async function run(): Promise<void> {
? await commandComment({ label: "Prettier", command: "npm run prettier" })
: undefined;

// run Tests
const playwrightStr: StepResponse | undefined = doTests
? await playwright({
label: "Install PlayWright Browsers",
command: "npx playwright install --with-deps",
})
: undefined;

// run Tests
const testingStr: StepResponse | undefined = doTests
? await testing({
label: "Testing",
Expand All @@ -199,6 +199,7 @@ export async function run(): Promise<void> {
'echo "modified=$(if [ -n "$(git status --porcelain)" ]; then echo "true"; else echo "false"; fi)" >> $GITHUB_ENV',
});

// TODO: THIS DIDN't fail
const updateChangesStr: StepResponse | undefined = await updateChanges({
label: "Update changes in GitHub repository",
command: "",
Expand All @@ -207,8 +208,7 @@ export async function run(): Promise<void> {
'git config --global user.email "[email protected]"',
"git add -A",
'git commit -m "[automated commit] lint format and import sort"',
"git brokenSTRING push",
// "git push",
"git wiugfeiuwegf push",
],
});

Expand Down
7 changes: 7 additions & 0 deletions src/scripts/post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ export const updateChanges = async (
return;
});
}
} else {
response.error = true;
response = await buildComment(
response,
"process.env.MODIFIED == false",
command.label,
);
}

if (response.error === false) {
Expand Down

0 comments on commit a49d64e

Please sign in to comment.