Skip to content

Commit

Permalink
Merge pull request #414 from gsmet/develocity-config
Browse files Browse the repository at this point in the history
Add Develocity config
  • Loading branch information
gsmet authored Feb 22, 2024
2 parents a590778 + be8792f commit e278780
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/main/java/io/quarkus/bot/AnalyzeWorkflowRunResults.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ void analyzeWorkflowResults(@WorkflowRun.Completed @WorkflowRun.Requested GHEven
.dryRun(quarkusBotConfig.isDryRun())
.monitoredWorkflows(quarkusBotConfigFile.workflowRunAnalysis.workflows)
.workflowJobComparator(QuarkusWorkflowJobComparator.INSTANCE)
.enableDevelocity(true)
.enableDevelocity(quarkusBotConfigFile.develocity.enabled)
.develocityUrl(quarkusBotConfigFile.develocity.url)
.build();

buildReporterEventHandler.handle(workflowRunPayload, buildReporterConfig, gitHub, gitHubGraphQLClient);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package io.quarkus.bot.config;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.TreeSet;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;

public class QuarkusGitHubBotConfigFile {

@JsonDeserialize(as = HashSet.class)
Expand All @@ -23,6 +23,8 @@ public class QuarkusGitHubBotConfigFile {

public Workflows workflows = new Workflows();

public Develocity develocity = new Develocity();

public static class TriageConfig {

public List<TriageRule> rules = new ArrayList<>();
Expand Down Expand Up @@ -140,6 +142,13 @@ public static class UserRule {
public Integer minContributions;
}

public static class Develocity {

public boolean enabled = false;

public String url;
}

boolean isFeatureEnabled(Feature feature) {
return features.contains(Feature.ALL) || features.contains(feature);
}
Expand Down

0 comments on commit e278780

Please sign in to comment.