Skip to content

Commit

Permalink
fix(manage-merge-queue): throw if github email not found (#640)
Browse files Browse the repository at this point in the history
* fix(manage-merge-queue): throw if github email not found

* update error msg

* update error msg
  • Loading branch information
danadajian authored Jul 16, 2024
1 parent 5e0cab2 commit 3339447
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
3 changes: 1 addition & 2 deletions dist/153.index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/153.index.js.map

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions dist/676.index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/676.index.js.map

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions src/utils/notify-user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ export const notifyUser = async ({ login, pull_number, slack_webhook_url }: Noti
data: { email }
} = await octokit.users.getByUsername({ username: login });
if (!email) {
core.info(`No github email found for user ${login}. Ensure you have set your email to be publicly visible on your Github profile.`);
return;
throw new Error(
`Email not found for user ${login}. Please add an email to your Github account!\nhttps://docs.github.com/en/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/adding-an-email-address-to-your-github-account`
);
}
const {
data: { title, html_url }
Expand Down

0 comments on commit 3339447

Please sign in to comment.