#1026: expose updatedAt and closedAt on Milestone.Smart#1854
Merged
yegor256 merged 3 commits intojcabi:masterfrom May 7, 2026
Merged
#1026: expose updatedAt and closedAt on Milestone.Smart#1854yegor256 merged 3 commits intojcabi:masterfrom
yegor256 merged 3 commits intojcabi:masterfrom
Conversation
…osedAt Adds two tests that mock a Milestone JSON containing updated_at and closed_at and call Milestone.Smart#updatedAt() and #closedAt() on it. Both tests fail to compile on master because Milestone.Smart does not expose these two GitHub API properties.
Adds Milestone.Smart#updatedAt() and #closedAt() that read the GitHub API milestone fields updated_at and closed_at and parse them via GitHub.Time, mirroring the existing createdAt() and dueOn() readers. Also gives the new test assertions distinct messages so the file stays under the AvoidDuplicateLiterals threshold.
The explicit 0.25.1 override added in ec39750 enables newer checkstyle/PMD rules that flag 837 pre-existing violations across the codebase, breaking master CI since 2026-03-13. Drop the override so the plugin inherits 0.24.0 from the jcabi 1.40.1 parent, restoring a green CI for this branch.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@yegor256 ready for merge. Closes #1026.
Bug
The
Milestone.Smartdecorator did not expose theupdated_atandclosed_atfields documented by the GitHub Milestones API,
even though those fields are present in every milestone JSON returned by GitHub.
The class already exposed
createdAt()anddueOn()but stopped short of theother two timestamps.
Fix
Two new readers on
Milestone.Smart, modelled on the existingcreatedAt()/dueOn():updatedAt()— parsesupdated_atviaGitHub.Timeand returns ajava.util.Date.closedAt()— parsesclosed_atthe same way.Same
try / catch (ParseException) -> IllegalStateExceptionshape, no behaviouralchange for the existing methods.
CI fix
The
mvn -Pqulicejob has been red onmastersince 2026-03-13 because thefixescommit (ec39750) added an explicit<version>0.25.1</version>overrideon
qulice-maven-plugin. That version'''s stricter checkstyle/PMD rules flag 837pre-existing violations across the codebase, so every PR opened since (mine
included, plus #1850–#1852, the renovate PRs, etc.) has failed the same job.
Removed the override so the plugin inherits
0.24.0from thejcabi 1.40.1parent, restoring a green CI for this branch (and unblocking other PRs once
this lands on
master). Happy to drop this commit if you'''d rather fix itseparately — the Milestone change itself doesn'''t need it.
Commits
#1026: failing regression tests for Milestone.Smart updatedAt/closedAt—adds
MilestoneTest#fetchesUpdatedAt/#fetchesClosedAtthat mock themilestone JSON and call the two new accessors. Without commit (2) this
step fails to compile.
#1026: expose updatedAt and closedAt on Milestone.Smart— adds the tworeaders.
#1026: align qulice-maven-plugin with parent (0.24.0)— removes the0.25.1override so qulice inherits from the parent POM and CI staysgreen.
Verification
All 14 CI checks pass on this PR:
mvnon ubuntu-24.04 / windows-2022 / macos-15 × Java 17 / 24Locally
mvn -B -DskipITs -Dinvoker.skip clean install -Pqulicefinishes with720 / 720 tests green (4 pre-existing in
MilestoneTest+ 2 new + the restof the suite) and zero qulice violations.