chore: optimise code style
This commit is contained in:
+1
-1
@@ -64,7 +64,7 @@ public class GitHubWebhookInterceptor implements HandlerInterceptor {
|
||||
|
||||
var body = req.getBodyString();
|
||||
try {
|
||||
var computed = "sha256=" + CryptoUtil.hmacSha256(secret, body);
|
||||
var computed = "sha256=" + CryptoUtil.hmacSha256(body, secret);
|
||||
|
||||
if (!MessageDigest.isEqual(
|
||||
computed.getBytes(StandardCharsets.UTF_8),
|
||||
|
||||
@@ -73,8 +73,7 @@ public class WebhookService {
|
||||
return;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
var data = (Map<String, Object>) yaml.load(parsedYaml);
|
||||
var data = yaml.<Map<String, Object>>load(parsedYaml);
|
||||
if (data == null) {
|
||||
log.warn("Empty YAML block in issue #{}", issue.number());
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user