mirror of
https://github.com/tiennm99/is-a-good-dev.git
synced 2026-06-03 18:13:32 +00:00
22 lines
604 B
JavaScript
22 lines
604 B
JavaScript
const fetch = require('node-fetch');
|
|
const core = require('@actions/core');
|
|
|
|
async function checkEmail(email) {
|
|
console.log(`Checking: ${email}`)
|
|
const url = `http://email-check.ext.talosbot.xyz/index.php?key=6lPyUV2dX8&email=${encodeURIComponent(email)}`;
|
|
const options = {
|
|
method: 'GET'
|
|
};
|
|
const res = await fetch(url, options).then(res => res.json());
|
|
console.log(res);
|
|
core.setOutput('infoReason', res.reason);
|
|
if (res.data.valid == true) return true;
|
|
return false;
|
|
}
|
|
|
|
async function checkInfo(data) {
|
|
return await checkEmail(data.owner.email);
|
|
}
|
|
|
|
module.exports = checkInfo;
|