RFR: 1885: Add method deleteDeployKeys to HostedRepository [v2]

Erik Joelsson erikj at openjdk.org
Wed Apr 19 22:17:48 UTC 2023


On Wed, 19 Apr 2023 22:03:57 GMT, Zhao Song <zsong at openjdk.org> wrote:

>> The method deleteDeployKeys is designed to delete deploy keys from this repository.
>
> Zhao Song has updated the pull request incrementally with one additional commit since the last revision:
> 
>   use duration

forge/src/main/java/org/openjdk/skara/forge/gitlab/GitLabRepository.java line 837:

> 835:                 .stream()
> 836:                 .filter(key -> ZonedDateTime.parse(key.get("created_at").asString())
> 837:                         .isBefore(ZonedDateTime.now().minusSeconds(duration.toSeconds())))

No need to convert to seconds when using `Duration`. It implements `TemporalAmount` so you can just:
Suggestion:

                        .isBefore(ZonedDateTime.now().minus(duration)))

-------------

PR Review Comment: https://git.openjdk.org/skara/pull/1505#discussion_r1171902836


More information about the skara-dev mailing list