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

Refactor alerts script #3615

Merged
merged 2 commits into from Oct 21, 2021
Merged

Refactor alerts script #3615

merged 2 commits into from Oct 21, 2021

Conversation

dracos
Copy link
Member

@dracos dracos commented Oct 12, 2021

This splits the big function that sends alerts into slightly smaller functions and therefore also tweaks the command line script so you can choose to send different types of alert rather than all at once.
It also fixes a small issue where "State changed to: open" is pointlessly shown in an update alert email.

@dracos dracos requested a review from davea October 12, 2021 14:58
@codecov
Copy link

codecov bot commented Oct 12, 2021

Codecov Report

Merging #3615 (96d016d) into master (078fec6) will increase coverage by 0.01%.
The diff coverage is 95.91%.

❗ Current head 96d016d differs from pull request most recent head a6e7516. Consider uploading reports for the commit a6e7516 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3615      +/-   ##
==========================================
+ Coverage   82.61%   82.62%   +0.01%     
==========================================
  Files         346      346              
  Lines       23573    23581       +8     
  Branches     3588     3589       +1     
==========================================
+ Hits        19474    19484      +10     
+ Misses       2971     2969       -2     
  Partials     1128     1128              
Impacted Files Coverage Δ
perllib/FixMyStreet/Script/Alerts.pm 91.53% <95.91%> (+0.57%) ⬆️
web/js/front.js 82.25% <0.00%> (-1.62%) ⬇️
web/cobrands/fixmystreet-uk-councils/alloy.js 90.09% <0.00%> (-1.00%) ⬇️
perllib/Open311.pm 90.09% <0.00%> (+1.59%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 078fec6...a6e7516. Read the comment docs.

Copy link
Member

@davea davea left a comment

Choose a reason for hiding this comment

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

One little question, but 👍 overall.

My previous fix did not work when the script moves from one alert ID to
another.
@dracos dracos merged commit a6e7516 into master Oct 21, 2021
@github-pages github-pages bot temporarily deployed to github-pages October 21, 2021 08:37 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants