-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Developer notifications
: Slack bot with weekly post (#129)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Felix T.J. Dietrich <[email protected]> Co-authored-by: Felix T.J. Dietrich <[email protected]>
- Loading branch information
1 parent
ee0d907
commit 13bf668
Showing
24 changed files
with
490 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
server/application-server/src/main/java/de/tum/in/www1/hephaestus/config/SlackAppConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package de.tum.in.www1.hephaestus.config; | ||
|
||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
import com.slack.api.bolt.App; | ||
import com.slack.api.bolt.AppConfig; | ||
|
||
@Configuration | ||
public class SlackAppConfig { | ||
@Value("${slack.token}") | ||
private String botToken; | ||
|
||
@Value("${slack.signing-secret}") | ||
private String signingSecret; | ||
|
||
@Bean | ||
public App initSlackApp() { | ||
if (botToken == null || signingSecret == null || botToken.isEmpty() || signingSecret.isEmpty()) { | ||
return new App(); | ||
} | ||
return new App(AppConfig.builder().singleTeamBotToken(botToken).signingSecret(signingSecret).build()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.