From 8ead1a42062f485b835a58cf727dd815a9ba4799 Mon Sep 17 00:00:00 2001 From: phyleria Date: Thu, 28 Nov 2024 09:58:44 +0300 Subject: [PATCH] Revert "typo in yml file" This reverts commit 5d1b69fe54fceb004366b6231c588c7da73879e4. --- .github/scripts/badge-automation.js | 4 ++-- .github/workflows/badge-automation.yml | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/scripts/badge-automation.js b/.github/scripts/badge-automation.js index 4f4e3a65..6532ffcd 100644 --- a/.github/scripts/badge-automation.js +++ b/.github/scripts/badge-automation.js @@ -77,9 +77,9 @@ async function sendEmail(email, message, badgeInfo) { async function getUserEmail(username) { try { const { data: user } = await octokit.users.getByUsername({ username }); - return user.email || null; + return user.email; } catch (error) { - console.error(`Error fetching email for ${username}:`, error.message); + console.error(`Error fetching email for ${username}:`, error); return null; } } diff --git a/.github/workflows/badge-automation.yml b/.github/workflows/badge-automation.yml index 39cfea42..0cbecd24 100644 --- a/.github/workflows/badge-automation.yml +++ b/.github/workflows/badge-automation.yml @@ -18,11 +18,12 @@ jobs: node-version: "16.x" - name: Install dependencies - run: npm install @octokit/rest nodemailer + run: npm install @octokdit/rest nodemailer - name: Run badge automation script env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} EMAIL_USER: ${{ secrets.EMAIL_USER }} EMAIL_PASS: ${{ secrets.EMAIL_PASS }} - run: node .github/scripts/badge-automation.js + run: | + node .github/scripts/badge-automation.js