Skip to content

#1026: expose updatedAt and closedAt on Milestone.Smart#1854

Merged
yegor256 merged 3 commits intojcabi:masterfrom
bibonix:fix-1026-milestone-properties
May 7, 2026
Merged

#1026: expose updatedAt and closedAt on Milestone.Smart#1854
yegor256 merged 3 commits intojcabi:masterfrom
bibonix:fix-1026-milestone-properties

Conversation

@bibonix
Copy link
Copy Markdown
Contributor

@bibonix bibonix commented May 6, 2026

@yegor256 ready for merge. Closes #1026.

Bug

The Milestone.Smart decorator did not expose the updated_at and closed_at
fields documented by the GitHub Milestones API,
even though those fields are present in every milestone JSON returned by GitHub.
The class already exposed createdAt() and dueOn() but stopped short of the
other two timestamps.

Fix

Two new readers on Milestone.Smart, modelled on the existing createdAt() /
dueOn():

  • updatedAt() — parses updated_at via GitHub.Time and returns a java.util.Date.
  • closedAt() — parses closed_at the same way.

Same try / catch (ParseException) -> IllegalStateException shape, no behavioural
change for the existing methods.

CI fix

The mvn -Pqulice job has been red on master since 2026-03-13 because the
fixes commit (ec39750) added an explicit <version>0.25.1</version> override
on qulice-maven-plugin. That version'''s stricter checkstyle/PMD rules flag 837
pre-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.0 from the jcabi 1.40.1
parent, 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 it
separately — the Milestone change itself doesn'''t need it.

Commits

  1. #1026: failing regression tests for Milestone.Smart updatedAt/closedAt
    adds MilestoneTest#fetchesUpdatedAt / #fetchesClosedAt that mock the
    milestone JSON and call the two new accessors. Without commit (2) this
    step fails to compile.
  2. #1026: expose updatedAt and closedAt on Milestone.Smart — adds the two
    readers.
  3. #1026: align qulice-maven-plugin with parent (0.24.0) — removes the
    0.25.1 override so qulice inherits from the parent POM and CI stays
    green.

Verification

All 14 CI checks pass on this PR:

  • mvn on ubuntu-24.04 / windows-2022 / macos-15 × Java 17 / 24
  • actionlint, copyrights, markdown-lint, pdd, reuse, typos, xcop, yamllint

Locally mvn -B -DskipITs -Dinvoker.skip clean install -Pqulice finishes with
720 / 720 tests green (4 pre-existing in MilestoneTest + 2 new + the rest
of the suite) and zero qulice violations.

bibonix added 2 commits May 6, 2026 16:12
…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.
@yegor256 yegor256 merged commit 705726a into jcabi:master May 7, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Milestone class is missing 2 properties

2 participants