-
Notifications
You must be signed in to change notification settings - Fork 291
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
Add Discord support #268
Add Discord support #268
Conversation
eb04291
to
a1adfee
Compare
@codenio can we add integration tests? |
1861b0b
to
86f0612
Compare
added discord configs into all yaml files |
@codenio The CI job is failing with
I think the docker dep you added needs gcc. Can you please update travis config to add gcc dep? |
c5efd84
to
b7f39af
Compare
@PrasadG193, resolved the build issue and rebased this PR to develop. |
b7f39af
to
a3ff62f
Compare
I guess this has to be rebased again soon? |
0934042
to
4e0e433
Compare
rebased and resolved issues |
Can this PR get reviewed again or/and merged? I'm using it on my own k8s cluster and it's working pretty well! @codenio Seriously good job. |
I just found an odd bug. @codenio Could you try to replicate the bug by sending a ping to your botkube from your Android Discord client? |
How would i install the version of the PR onto a kube cluster? |
I tried to get it to run, But gettings this error... panic: http: multiple registrations for /metrics goroutine 38 [running]: |
@kingdevnl I think something is broken in the develop branch of botkube. I have a docker image already built with that commit if you want to test:
|
@PrasadG193 are unit tests really holding up adding new notifier integrations, specifically this one? I understand tests are important, however they can always be added later on. |
2a33846
to
b5b3a25
Compare
resolved it. can you check now..? |
Yes it's working without any error. Thank you! |
Working great on mobile now too with @unixfox docker image. Thanks you two! |
Any update here from the maintainers? I've been using a docker image built from this PR for a month now and it works great. @PrasadG193 MS team support was merged without integration tests, can this be too, please? |
@codenio We can target and get this in in upcoming release. Could you please take a stab at adding documentation? We use hugo for hosting docs. The docs repo is: https://github.com/infracloudio/botkube-docs |
We have improved test coverage for the notifier interface. For discord bot interface tests, we can revisit this later. |
b5b3a25
to
f748cf2
Compare
@PrasadG193 will certainly add corresponding docs, can we get this PR merged now..? |
f748cf2
to
a59ef56
Compare
8d1e519
to
dc5aeaf
Compare
5ed968f
to
d1c864b
Compare
This commit, - adds discord bot - adds discord notifier - adds required discord configurations into comm_config.yaml - adds discordgo module into go.mod - adds discord configs into all yaml files - adds apk add build-base into dockerfile Build Env
d1c864b
to
80522a4
Compare
🙏 , feeling relieved., @ALL thanks for the extended support, thanks @PrasadG193 and @sanketsudake for the reviews and feedbacks. |
Thanks for all the hard work and patience @codenio |
Realy thanks man <3 |
#### ISSUE TYPE <!--- Pick one below and delete the rest: --> - Feature Pull Request ##### SUMMARY <!--- Describe the change, including rationale and design decisions --> **Add support for Discord:** This PR, - adds discord bot - adds discord notifier - adds required discord configurations into comm_config.yaml - adds discordgo module into go.mod - adds discord configs into all yaml files <!--- If you are fixing an existing issue, please include "Fixes #nnn" in your PR comment; and describe briefly what the change does. --> <!--- Please list dependencies added with your change also --> Fixes kubeshop#97 ### Steps For Creation and Integration: 1. Reach https://discordapp.com/developers/applications 2. Create New Application named Botkube and add a bot named **Botkube** into the Application 3. Copy the Application **CLIENT ID** and place it under _Dischord.botid_ in comm-config.yaml 4. Copy Bot **TOKEN** and place it under _Dischord.token_ in comm-config.yaml 5. Generate the URL with suitable permissions using the OAuth2 URL Generator available under OAuth2 section to the add bot to your Discord server ``` https://discordapp.com/oauth2/authorize?&client_id=<YOUR_CLIENT_ID>&scope=bot&permissions=<SET_OF_PERMISSIONS> ``` 6. Paste the generated URL in a new tab, select the discord sever to which you want to add the bot and Authorise Bot addition. 7. Create a new channel and/or copy the **CHANNEL ID** of an existing one that you want to use and place it under _Dischord.channel_ ```yaml # Settings for Discord discord: enabled: true token: 'DISCORD_TOKEN' # BotKube Bot Token botid: 'DISCORD_BOT_ID' # BotKube Application Client ID channel: 'DISCORD_CHANNEL_ID' # Discord Channel id for receiving BotKube alerts notiftype: short # Change notification type short/long you want to receive. notiftype is optional and Default notification type is short (if not specified) ``` #### Note: Follow the first 4 mins of this [Video Tutorial](https://youtu.be/8o25pRbXdFw) to understand the process visually. ### Preview: ![ping](https://user-images.githubusercontent.com/30741615/80600577-3931cf00-8a4a-11ea-9215-a725a0b17256.png) ![pod-create-short](https://user-images.githubusercontent.com/30741615/80600638-55357080-8a4a-11ea-976f-b91e823c93bd.png) ![pod-error-long](https://user-images.githubusercontent.com/30741615/80600803-8dd54a00-8a4a-11ea-90e4-a205e93aba5f.png) ![file-attachment](https://user-images.githubusercontent.com/30741615/80600724-75fdc600-8a4a-11ea-9b10-1b5ac0e79548.png)
ISSUE TYPE
SUMMARY
Add support for Discord:
This PR,
Fixes #97
Steps For Creation and Integration:
Reach https://discordapp.com/developers/applications
Create New Application named Botkube and add a bot named Botkube into the Application
Copy the Application CLIENT ID and place it under Dischord.botid in comm-config.yaml
Copy Bot TOKEN and place it under Dischord.token in comm-config.yaml
Generate the URL with suitable permissions using the OAuth2 URL Generator available under OAuth2 section to the add bot to your Discord server
Note: Follow the first 4 mins of this Video Tutorial to understand the process visually.
Preview: