diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml new file mode 100644 index 0000000..c637988 --- /dev/null +++ b/.github/workflows/pull_request.yml @@ -0,0 +1,17 @@ +name: Code quality + +on: + pull_request: + +jobs: + quality: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Biome + uses: biomejs/setup-biome@v2 + with: + version: latest + - name: Run Biome + run: biome ci ./src diff --git a/src/server.ts b/src/server.ts index 9982069..8b343d1 100644 --- a/src/server.ts +++ b/src/server.ts @@ -71,14 +71,14 @@ client.on(Events.MessageCreate, async (message) => { .map((message) => message.author.id === env.DISCORD_CLIENT_ID ? { - role: "assistant", - content: message.content, - } + role: "assistant", + content: message.content, + } : { - role: "user", - content: message.content, - name: message.author.username, - }, + role: "user", + content: message.content, + name: message.author.username, + }, ), ];