github-api icon indicating copy to clipboard operation
github-api copied to clipboard

Add missing properties to GHAsset and GHRelease

Open solonovamax opened this issue 6 months ago • 4 comments

Description

Adds missing fields for the GHAsset and GHRelease classes. See: https://docs.github.com/en/rest/releases/releases?apiVersion=2022-11-28

I didn't bother adding tests because it's just new fields/getters.

Fixes #2102

Before submitting a PR:

  • [x] Changes must not break binary backwards compatibility. If you are unclear on how to make the change you think is needed while maintaining backward compatibility, CONTRIBUTING.md for details.
  • [x] Add JavaDocs and other comments explaining the behavior.
  • [ ] When adding or updating methods that fetch entities, add @link JavaDoc entries to the relevant documentation on https://docs.github.com/en/rest .
  • [ ] Add tests that cover any added or changed code. This generally requires capturing snapshot test data. See CONTRIBUTING.md for details.
  • [x] Run mvn -D enable-ci clean install site "-Dsurefire.argLine=--add-opens java.base/java.net=ALL-UNNAMED" locally. If this command doesn't succeed, your change will not pass CI.
  • [x] Push your changes to a branch other than main. You will create your PR from that branch.

When creating a PR:

  • [x] Fill in the "Description" above with clear summary of the changes. This includes:
    • [x] If this PR fixes one or more issues, include "Fixes #" lines for each issue.
    • [x] Provide links to relevant documentation on https://docs.github.com/en/rest where possible. If not including links, explain why not.
  • [x] All lines of new code should be covered by tests as reported by code coverage. Any lines that are not covered must have PR comments explaining why they cannot be covered. For example, "Reaching this particular exception is hard and is not a particular common scenario."
  • [x] Enable "Allow edits from maintainers".

solonovamax avatar Jun 15 '25 20:06 solonovamax

@solonovamax
Please fix build failures.

bitwiseman avatar Jul 24 '25 15:07 bitwiseman

@solonovamax Please fix build failures.

done

sorry that took a while

solonovamax avatar Jul 29 '25 16:07 solonovamax

Codecov Report

:x: Patch coverage is 0% with 6 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 84.95%. Comparing base (11d3ccf) to head (3d005b9).

Files with missing lines Patch % Lines
src/main/java/org/kohsuke/github/GHRelease.java 0.00% 4 Missing :warning:
src/main/java/org/kohsuke/github/GHAsset.java 0.00% 2 Missing :warning:
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2108      +/-   ##
============================================
- Coverage     85.02%   84.95%   -0.07%     
  Complexity     2494     2494              
============================================
  Files           237      237              
  Lines          7350     7356       +6     
  Branches        388      388              
============================================
  Hits           6249     6249              
- Misses          871      877       +6     
  Partials        230      230              

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

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

codecov[bot] avatar Jul 29 '25 17:07 codecov[bot]

@solonovamax
Even for getters/setters we do code coverage. Since the project is reading from JSON we've have failures even in getter/setters. Since it is get/set, the tests should be easy - add them to an existing testcase.

bitwiseman avatar Jul 30 '25 16:07 bitwiseman