open-build-service icon indicating copy to clipboard operation
open-build-service copied to clipboard

System notifications (proof of concept)

Open rubhanazeem opened this issue 3 years ago • 3 comments

This PR is just a proposal for adding system notifications to OBS using the Notifications API and ActionCable.

To test the notifications open the rails console and try to broadcast for the logged-in user.

NotificationsChannel.broadcast_to(User.first, {title: 'Title', body: 'Body'})

Be sure to replace User.first with a logged-in user.

rubhanazeem avatar Feb 16 '22 09:02 rubhanazeem

What about creating a rake task to send the test notification?

danidoni avatar Feb 17 '22 13:02 danidoni

What about creating a rake task to send the test notification?

We don't need one atm. For now, we'll just go with rails c. Thanks for pointing that out, I've added the test instructions in the description.

rubhanazeem avatar Feb 17 '22 13:02 rubhanazeem

Codecov Report

Merging #12213 (39196c0) into master (29fe2bf) will increase coverage by 3.13%. The diff coverage is 100.00%.

:exclamation: Current head 39196c0 differs from pull request most recent head 52245d9. Consider uploading reports for the commit 52245d9 to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #12213      +/-   ##
==========================================
+ Coverage   88.21%   91.35%   +3.13%     
==========================================
  Files         702      660      -42     
  Lines       24091    23090    -1001     
==========================================
- Hits        21253    21093     -160     
+ Misses       2838     1997     -841     

codecov[bot] avatar Feb 21 '22 10:02 codecov[bot]