Skip to content

Conversation

@lahirumaramba
Copy link
Member

@lahirumaramba lahirumaramba commented Mar 29, 2021

  • Add GitHub Action to send email using mailgun.js npm module.
  • Update nightly workflow to use the send email action.
  • Add a failing integration test to trigger the email notification workflow (this test will be removed once we confirm the email notifications be working as expected).

@lahirumaramba
Copy link
Member Author

lahirumaramba commented Mar 30, 2021

Note: release:stage is added to trigger the integration tests. Integration tests should fail with the added test in this PR. This new test will trigger the send email workflow once merged to master.

});

let from = core.getInput('from');
const cc = core.getInput('cc');
Copy link
Member Author

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.

Copy link
Contributor

@hiranya911 hiranya911 left a 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.

@lahirumaramba
Copy link
Member Author

Thanks, @hiranya911!
Used a bit of a lazy approach to validate all the required fields. Kept cc, text, html, as optional. If html is provided and not text the API extracts the text content from the html. Let me know what you think.

Copy link
Contributor

@hiranya911 hiranya911 left a 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.


function validate(config) {
for (param in config) {
if (['cc', 'text', 'html'].includes(param)) {
Copy link
Contributor

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'];

}
}

function validateParameter(value, name) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

validateRequiredParameter

@lahirumaramba
Copy link
Member Author

Thanks @hiranya911! Updated the binary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release:stage Stage a release candidate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants