Skip to content

Commit bb9720c

Browse files
committed
Improve logs
1 parent 1176651 commit bb9720c

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

github/src/main/java/eu/solven/cleanthat/github/event/GithubRefCleaner.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public Optional<String> prepareRefToClean(IExternalWebhookRelevancyResult result
9999
}).findAny();
100100

101101
if (matchingBase.isEmpty()) {
102-
LOGGER.info("Not a single base with open RR matches cleanable branch={}", cleanableBranchRegex);
102+
LOGGER.info("Not a single base with open RR matches cleanableBranchRegex={}", cleanableBranchRegex);
103103
return false;
104104
} else {
105105
LOGGER.info("We have a match for ruleBranch={} eventBaseBranch={}",
@@ -141,7 +141,10 @@ public Optional<String> prepareRefToClean(IExternalWebhookRelevancyResult result
141141
// TODO Should we handle this specifically when opening the actual branch?
142142
return Optional.of(newBranchRef);
143143
} else {
144-
LOGGER.info("This branch seems not cleanable: {}", ref);
144+
LOGGER.info("This branch seems not cleanable: {}. Regex: {}. eventBaseBranches: {}",
145+
ref,
146+
cleanableBranchRegexes,
147+
eventBaseBranches);
145148
return Optional.empty();
146149
}
147150
}

lambda/src/main/java/eu/solven/cleanthat/lambda/AWebhooksLambdaFunction.java

+3
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,9 @@ public IWebhookEvent wrapAsEvent(Map<String, ?> input) {
160160
});
161161

162162
asMap = InternalUtils.toSimpleMapValue(dynamoDbAttributes);
163+
164+
LOGGER.info("Processing X-GitHub-Delivery={}",
165+
PepperMapHelper.getRequiredString(asMap, "X-GitHub-Delivery"));
163166
}
164167
return asMap;
165168
}

0 commit comments

Comments
 (0)