Skip to content

Handle missing milestone state in issue events - #2316

Open
subotac wants to merge 1 commit into
hub4j:mainfrom
subotac:fix/null-milestone-state
Open

Handle missing milestone state in issue events#2316
subotac wants to merge 1 commit into
hub4j:mainfrom
subotac:fix/null-milestone-state

Conversation

@subotac

@subotac subotac commented Aug 6, 2026

Copy link
Copy Markdown

Description

Handle partial issue-event milestone payloads that omit state. Missing values now return null, while unknown non-null values use GHMilestoneState.UNKNOWN through EnumUtils.

Includes a regression using the existing issue-event WireMock fixture.

Fixes #2028.

REST schema: https://docs.github.com/en/rest/issues/events?apiVersion=2022-11-28#list-issue-events

Before submitting a PR

  • Binary backwards compatibility checked with japicmp
  • JavaDocs describe the nullable return value
  • Added tests covering the changed behavior
  • mvn -D enable-ci clean install passes, including SpotBugs and JaCoCo checks
  • Local site generation exceeded a 20-minute timeout while downloading its cold reporting dependency graph; all preceding build gates passed
  • Changes are on a branch other than main

When creating a PR

  • Includes Fixes #2028 and the relevant REST schema link
  • Changed lines are covered by tests
  • Allow edits from maintainers is enabled

@codecov

codecov Bot commented Aug 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.41%. Comparing base (79e0fc6) to head (5ee500d).

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #2316   +/-   ##
=========================================
  Coverage     85.41%   85.41%           
  Complexity     2568     2568           
=========================================
  Files           242      242           
  Lines          7576     7577    +1     
  Branches        399      399           
=========================================
+ Hits           6471     6472    +1     
  Misses          869      869           
  Partials        236      236           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

GHMilestone throws NPE on null state

1 participant