Skip to content

Commit

Permalink
fix: modify default configuration to prevent service launch fails
Browse files Browse the repository at this point in the history
  • Loading branch information
m-rudyk committed Sep 8, 2023
1 parent b560674 commit 9bf7806
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.7.10</version>
<version>2.7.15</version>
</parent>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ public class GitHubWebhooksController {

private String GITHUB_SECRET;

@Autowired
ApplicationContext applicationContext;

/**
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/com/lpvs/service/LPVSGitHubService.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,15 @@ public LPVSGitHubService(@Value("${" + GITHUB_LOGIN_PROP_NAME + "}") String GITH
}

@PostConstruct
@Profile("!test")
private void checks() throws Exception {
if (this.GITHUB_AUTH_TOKEN.isEmpty()) {
log.error(GITHUB_AUTH_TOKEN_ENV_VAR_NAME + "(" + GITHUB_AUTH_TOKEN_PROP_NAME + ") is not set.");
exitHandler.exit(-1);
}
if (this.GITHUB_LOGIN.isEmpty()) {
log.error(GITHUB_LOGIN_ENV_VAR_NAME + "(" + GITHUB_LOGIN_PROP_NAME + ") is not set.");
exitHandler.exit(-1);
}
}

private static GitHub gitHub;
Expand Down
8 changes: 7 additions & 1 deletion src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ github.secret=LPVS
# Used Core Pool Size
lpvs.cores=8
# Number of scan attempts
lpvs.attempts=4
lpvs.attempts=4cd

# DB Configuration
spring.jpa.open-in-view=true
Expand All @@ -42,3 +42,9 @@ spring.datasource.url=jdbc:mysql://localhost:3306/lpvs
spring.datasource.username=
spring.datasource.password=

# Custom DB components name configuration
app.table.detectedLicenseName=detected_license
app.table.detectedLicenseSchema=soshub
app.table.diffFileName=code_licenses
app.table.pullRequestsName=lpvs_pull_requests
app.table.queueName=queue

0 comments on commit 9bf7806

Please sign in to comment.