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

feat(2719): Scheduled job stop with notification if there's no admin #32

Merged
merged 5 commits into from
Aug 18, 2022

Conversation

klu909
Copy link
Contributor

@klu909 klu909 commented Jul 15, 2022

Context

When scheduled job doesn't run, there's no build nor event for notification plugin to use

Objective

Add ability to notify user with different payload

References

screwdriver-cd/screwdriver#2719

License

I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.

index.js Outdated
* @param {String} jobData.message Message
* @param {Object} jobData.settings Notification setting
*/
function jobStatus(jobData) {
Copy link
Member

Choose a reason for hiding this comment

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

non-blocking comment: is it possible to refactor buildStatus/jobStatus methods into one method? they seem pretty similar

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thing is that they use different info to send the message, only thing we can abstract is prob the part where we send email, but that was only couple lines. If we are to makes them into same functions there would be a lot of if else branch.

@klu909 klu909 marked this pull request as ready for review August 17, 2022 15:39
@klu909 klu909 merged commit 9b9b183 into master Aug 18, 2022
@klu909 klu909 deleted the build branch August 18, 2022 21:59
@sd-buildbot
Copy link

🎉 This PR is included in version 2.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants