RFR: Add support for marking PR body content with an expiration time
Erik Helin
ehelin at openjdk.java.net
Tue Oct 6 13:33:47 UTC 2020
On Tue, 6 Oct 2020 13:16:27 GMT, Robin Westberg <rwestberg at openjdk.org> wrote:
> For information in the PR body that is calculated using data from external sources (like Jira, another personal fork,
> etc.) we need to perform a periodical refresh, as our normal way of detecting updates cannot be used (the updatedAt
> field of a pull request).
Looks good, just a small suggestion to simplify returning a random string
bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckWorkItem.java line 71:
> 69: var hasExpired = ExpirationTracker.hasExpired(body);
> 70: if (hasExpired) {
> 71: return
> Base64.getUrlEncoder().encodeToString(UUID.randomUUID().toString().getBytes(StandardCharsets.UTF_8));
Suggestion:
return String.valueOf(Math.random());
-------------
Marked as reviewed by ehelin (Reviewer).
PR: https://git.openjdk.java.net/skara/pull/862
More information about the skara-dev
mailing list