Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

GH action: prettier fix instead of check (#177)

Marc Klingen43218d311cf2
diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml
index 4ffd7e60bf..5ffc2db5ef 100644
--- a/.github/workflows/prettier.yml
+++ b/.github/workflows/prettier.yml
@@ -7,15 +7,23 @@ on:
- "main"
jobs:
- prettier-check:
+ prettier-fix:
runs-on: ubuntu-latest
+
steps:
- - uses: actions/checkout@v3
+ - name: Checkout
+ uses: actions/checkout@v3
+ with:
+ # Make sure the actual branch is checked out when running on pull requests
+ ref: ${{ github.head_ref }}
- uses: actions/setup-node@v3
with:
node-version: 18
- name: install dependencies
run: |
npm ci
- - name: prettier check
- run: npx prettier --check ./src *.{ts,js} --ignore-path .gitignore
+ - name: Prettify code
+ uses: creyD/[email protected]
+ with:
+ prettier_options: --write ./src *.{ts,js} --ignore-path .gitignore
+ commit_message: "Applied prettier formatting"
diff --git a/cron.js b/cron.js
index 49a39f3291..68d82b79c4 100644
--- a/cron.js
+++ b/cron.js
@@ -23,9 +23,9 @@ if (
if (ip) {
var job = new CronJob("*/5 * * * *", function () {
// PORT set to 3000 by Dockerfile, can be overridden by env
- fetch(`http://${ip}:${process.env.PORT ?? 3000}/api/cron/telemetry`).catch((err) =>
- console.log(err),
- );
+ fetch(
+ `http://${ip}:${process.env.PORT ?? 3000}/api/cron/telemetry`,
+ ).catch((err) => console.log(err));
});
job.start();