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

Sound alerts #39

Closed
aborderon opened this issue Oct 4, 2018 · 23 comments
Closed

Sound alerts #39

aborderon opened this issue Oct 4, 2018 · 23 comments
Labels
enhancement New feature or request

Comments

@aborderon
Copy link

Hello,
Your project is very interesting. After going around the features, I think there is one missing ..: p

Indeed, it would be very favorable to be able to integrate the sound alerts from the browsers.

We use gitlab-monitor on a TV in our company but we do not always have eyes on it. A sound alert would be very interesting in the case of an error (build failed etc ...)

@timoschwarzer
Copy link
Owner

Hi @aborderon!

I think this is very doable. But this should be configurable. I'm thinking of:

  • Disabling all sounds by default, because I think most people won't use it.
  • Specify sounds for success/warning/failure per job and per pipeline.

@aborderon
Copy link
Author

I'm glad this idea interests you.
Let's say it's the functionality we miss ;)

I agree with you, disable the default sound alerts.
Leave the choice to the user to activate or not the alerts on the different statuses / pipelines.

@T-vK
Copy link

T-vK commented Oct 11, 2018

Notifications would be pretty cool as well. I mean something like:

Notification.requestPermission().then(function(result) {
    if (result === 'granted')
        new Notification("Project A", {body:'Job "test" failed...'});
});

@timoschwarzer
Copy link
Owner

@T-vK As far as I know, GitLab has Web Notifications built into its web interface out of the box.

@aborderon
Copy link
Author

Yes, you should simply add a web notification using the browser when changing status on the pipeline.

@T-vK
Copy link

T-vK commented Oct 12, 2018

Are you sure? I couldn't find a setting for that and related issues are still open.

@aborderon
Copy link
Author

Indeed, I may have spoken too fast.
After verification, he seems to have two possibilities.

  1. Play a sound (sound.mp3) when changing status on the pipeline.
  2. Or use a firefox or chrome extension in addition to web notifications for sound alerts (ex: https://addons.mozilla.org/en/firefox/addon/notification-sound/)

@T-vK
Copy link

T-vK commented Oct 13, 2018

From all I know, Gitlab CI still doesn't have notification support (other than email), so that addon wouldn't do anything.

@timoschwarzer I'm not sure if I misunderstood you, but I'm talking about desktop notifications which are visible even if the tab is not in the foreground. I know that Gitlab has it's own notification system which informs you about issues and such, but that system is not used by Gitlab CI (afaik) and it doesn't push desktop notifications anyway.

@T-vK
Copy link

T-vK commented Oct 13, 2018

I'm not familiar with gitlab's source code. All I can say is that I don't get desktop notifications, only emails. I checked the project settings as well as the global settings and I was not able to find a setting to enable it. And issues like this one are still open.

@timoschwarzer
Copy link
Owner

@T-vK
Can you try to enable notifications for your GitLab instance manually in your browser and then look, whether you get notifications or not?

@T-vK
Copy link

T-vK commented Oct 14, 2018

I only see options to enable email notifications. I already manually enabled them for pipelines.
Do you actually get desktop notifications?

@aborderon
Copy link
Author

I do not know if that can help. But a competing project "Node build monitor" has already implemented sound notifications with GitLab (https://github.com/marcells/node-build-monitor)
It uses a file woop.mp3 which is launched at the status change in the pipeline.
It's an observable based on the local code and not directly on the GitLab API (https://github.com/marcells/node-build-monitor/search?utf8=%E2%9C%93&q=sound&type =).

I do not know the source code of gitlab-monitor, but I imagine that you can play a sound file at the change of status of the pipeline in recover the event?

@timoschwarzer
Copy link
Owner

Yes, should definitely be possible. I'm currently just short on time because university is starting for me this week... 😅

@timoschwarzer timoschwarzer added the enhancement New feature or request label Nov 8, 2018
avocadomaster added a commit to avocadomaster/gitlab-monitor that referenced this issue Jan 9, 2019
@aborderon
Copy link
Author

New for this feature?

Thank ;)

@timoschwarzer
Copy link
Owner

Hi! I didn't notice that you referenced this issue in a commit...
Can you open a PR for me taking a look at it? Thanks!

@v1-wizard
Copy link

Hi, guys. @aborderon, what about PR? I really enjoy your feature and I am waiting it. Could you also add changes in documentation with explanation: "how is it work?"?

@aborderon
Copy link
Author

Hi, sorry for being late, I do not have much time to finish fix this feature right now, I take care of doing the PR as soon as possible.

@timoschwarzer
Copy link
Owner

You can also open a WIP-PR so we can help you with finishing the implementation. 😉

@aborderon
Copy link
Author

I just saw that the feature was added by avocadomaster.
See the commit : #avocadomaster@bbf84d2
@timoschwarzer , when do you think ?

@timoschwarzer
Copy link
Owner

It would be great if @avocadomaster could propose a PR... :)

avocadomaster added a commit to avocadomaster/gitlab-monitor that referenced this issue Mar 11, 2019
@avocadomaster
Copy link
Contributor

avocadomaster commented Mar 11, 2019

I made a PR (#63) for my quick fix implementation. Did not make sense for me to build a mute function to comply with Chrome's Autoplay Policy. I disabled this policy for chrome on my machine to allow it to restart without any input.

timoschwarzer pushed a commit that referenced this issue Mar 11, 2019
* feat: quick fix to play sound alert when default branch failes (#39)

* doc: linkToFailureSound & Chrome Autoplay (#39)

* Code cleanup
@timoschwarzer
Copy link
Owner

@avocadomaster Thank you! The PR is merged. I, too, think it doesn't make sense to comply with Chrome's autoplay policy as the workaround is documented in the docs.

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

No branches or pull requests

5 participants