Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "typo in yml file" #477

Merged
merged 1 commit into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/scripts/badge-automation.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/badge-automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading