Skip to content

Commit

Permalink
Add APPLICATION_SERVER_URL
Browse files Browse the repository at this point in the history
  • Loading branch information
GODrums committed Nov 4, 2024
1 parent cac1a7f commit 1680856
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ public class SlackMessageService {
@Value("${slack.runScheduledMessage}")
private boolean runScheduledMessage;

@Value("${spring.url:localhost:8080}")
private String hephaestusUrl;

@Autowired
private App slackApp;

Expand Down Expand Up @@ -105,7 +108,9 @@ public void sendScheduledLeaderboard() {
context(context -> context
.elements(List.of(markdownText("*" + currentDate + "*")))),
section(section -> section.text(markdownText(
"Another *review leaderboard* has concluded. You can check out your placement at <https://hephaestus.ase.cit.tum.de/|hephaestus.ase.cit.tum.de>."))),
"Another *review leaderboard* has concluded. You can check out your placement at "
+ hephaestusUrl
+ "."))),
section(section -> section.text(markdownText(
"Special thanks to our top 3 reviewers of last week:"))),
section(section -> section.text(markdownText(
Expand All @@ -131,6 +136,7 @@ public void run() {
logger.info("Slack scheduled messages are disabled, skipping Slack app init test.");
return;
}
logger.info("Testing Slack app initialization...");
AuthTestResponse response;
try {
response = slackApp.client().authTest(r -> r);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ spring:
hibernate:
# TODO: Change to none and use liquibase
ddl-auto: update
url: ${APPLICATION_SERVER_URL}

security:
oauth2:
Expand Down

0 comments on commit 1680856

Please sign in to comment.