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

Adding alerts support for Rocket.Chat; closing Issue-#1091 #1836

Merged
merged 5 commits into from Mar 20, 2024

Conversation

oussjarrousse
Copy link
Contributor

@oussjarrousse oussjarrousse commented Mar 15, 2024

This pull-request, adds the support for alerts for Rocket.Chat https://rocket.chat/ (an open source slack alternative)
Based on the code available in the code-base that supports Slack. It addresses issue-#1091 and hopefully closes it.

The change add two new config.json variables:

"rocketchat_alert": true,
"rocketchat_url": "the_url_to_the_rocket_chat_web_hook",

The pull-request adds the following configuration to the cli/setup/setup.go:

askConfirmation("Enable Rocket.Chat alerts?", false, &conf.RocketChatAlert)
if conf.RocketChatAlert {
	askValue("Rocket.Chat Webhook URL", "", &conf.RocketChatUrl)
}	

It adds the function sendRocketChatAlert() to services/tasks/alert.go which is (almost) identical to the existing sendSlackAlert(). sendRocketChatAlert() is called from services/tasks/TaskRunner.go SetStatus() in a similar way to all other alerts (email, telegram, and slack).

It also adds a template file /templates/rocketchat.tmpl that specifies the format of the json request.content expected by Rocket.Chat web hook.

Testing is still required.

@oussjarrousse oussjarrousse changed the title Issue 1091 Adding alerts support for Rocket.Chat; closing Issue-#1091 Mar 15, 2024
@oussjarrousse
Copy link
Contributor Author

I tried to debug the issue. But I am not familiar with the project enough to figure it out.
I would appreciate your input.
Thanks

@fiftin fiftin merged commit 194b909 into semaphoreui:develop Mar 20, 2024
4 checks passed
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