Skip to content

Commit 479ef66

Browse files
author
github-actions
committed
chore(automated): Lint commit and format
1 parent b1c883f commit 479ef66

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

dist/index.js

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113816,33 +113816,41 @@ const push = async (coverageDirectory) => {
113816113816
console.error("Unable to check if there are changes", e);
113817113817
}
113818113818
(0, core_1.endGroup)();
113819+
(0, core_1.startGroup)("Parse changes and remove coverage directory");
113819113820
const changes = stdout.split("\n").filter((line) => line.trim() !== "");
113820113821
if (changes.length === 1 && changes[0].includes(coverageDirectory)) {
113821113822
changes.pop();
113822113823
}
113824+
(0, core_1.endGroup)();
113823113825
if (changes.length > 0) {
113824113826
try {
113825-
(0, core_1.startGroup)("Push changes");
113827+
(0, core_1.startGroup)("Set up git");
113826113828
await (0, exec_1.exec)('git config --global user.name "github-actions"');
113827113829
await (0, exec_1.exec)('git config --global user.email "[email protected]"');
113830+
(0, core_1.endGroup)();
113828113831
try {
113832+
(0, core_1.startGroup)("Stage files");
113829113833
await (0, exec_1.exec)(`git add -A -- :!${coverageDirectory}/`);
113830113834
await (0, exec_1.exec)(`git add -A -- :!${coverageDirectory}/*`);
113831113835
}
113832113836
catch (e) {
113833113837
console.error("Unable to add files", e);
113834113838
}
113839+
finally {
113840+
(0, core_1.endGroup)();
113841+
}
113842+
(0, core_1.startGroup)("Commit changes");
113835113843
(0, child_process_1.execSync)(`git commit -m 'chore(automated): Lint commit and format' `);
113844+
(0, core_1.endGroup)();
113845+
(0, core_1.startGroup)("Push changes");
113836113846
await (0, exec_1.exec)("git push -f");
113837113847
(0, core_2.debug)("Changes pushed onto branch");
113848+
(0, core_1.endGroup)();
113838113849
}
113839113850
catch (e) {
113840113851
console.error("Unable to push changes", e);
113841113852
(0, core_1.setFailed)("Unable to push changes to branch");
113842113853
}
113843-
finally {
113844-
(0, core_1.endGroup)();
113845-
}
113846113854
}
113847113855
};
113848113856
exports.push = push;

0 commit comments

Comments
 (0)