-
Notifications
You must be signed in to change notification settings - Fork 371
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
chore: Add Mailgun send email action #1210
Conversation
83f4405
to
83d133c
Compare
da65665
to
e2f17d3
Compare
Note: |
e2f17d3
to
fc5f294
Compare
.github/actions/send-email/index.js
Outdated
}); | ||
|
||
let from = core.getInput('from'); | ||
const cc = core.getInput('cc'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably do not need cc
filed. I am open to remove it and keep this action as simple as possible if we need.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good. A few thoughts for improvement.
Thanks, @hiranya911! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple of readability nits. And remember to update the binary every time you push a code change.
.github/actions/send-email/index.js
Outdated
|
||
function validate(config) { | ||
for (param in config) { | ||
if (['cc', 'text', 'html'].includes(param)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const optionalFields = ['cc', 'text', 'html'];
.github/actions/send-email/index.js
Outdated
} | ||
} | ||
|
||
function validateParameter(value, name) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
validateRequiredParameter
Thanks @hiranya911! Updated the binary. |
mailgun.js
npm module.