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

Add polymorphic deserialization for event account.

Open bloslo opened this issue 3 years ago • 5 comments

Description

Add polymorphic deserialization for the GHAppInstallation account field. Fixes #1497

Before submitting a PR:

  • [ ] 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.
  • [ ] Add JavaDocs and other comments as appropriate. Consider including links in comments to 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.
  • [ ] Run mvn -D enable-ci clean install site locally. If this command doesn't succeed, your change will not pass CI.
  • [ ] Push your changes to a branch other than main. You will create your PR from that branch.

When creating a PR:

  • [ ] Fill in the "Description" above with clear summary of the changes. This includes:
    • [ ] If this PR fixes one or more issues, include "Fixes #" lines for each issue.
    • [ ] Provide links to relevant documentation on https://docs.github.com/en/rest where possible.
  • [ ] 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."
  • [ ] Enable "Allow edits from maintainers".

bloslo avatar Sep 18 '22 18:09 bloslo

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 79.89%. Comparing base (5380f59) to head (1581500). Report is 298 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #1522   +/-   ##
=========================================
  Coverage     79.89%   79.89%           
  Complexity     2197     2197           
=========================================
  Files           209      209           
  Lines          6670     6670           
  Branches        364      364           
=========================================
  Hits           5329     5329           
  Misses         1127     1127           
  Partials        214      214           

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

codecov[bot] avatar Sep 18 '22 19:09 codecov[bot]

@bitwiseman Can you review my changes? I know checks are breaking, but this is because I change a method signature. I don't see how this can be avoided.

P.S. I used the StackOverflow link you referenced in the issue as a source to implement the changes.

bloslo avatar Sep 30 '22 16:09 bloslo

@bloslo To address API breaks, you'll need to use WithBridgeMethods annotations. They preserve binary compatibility while letting you update the source API. Usage is described in the source file and there are plenty of examples in this project.

bitwiseman avatar Oct 01 '22 19:10 bitwiseman

@bitwiseman is there a chance to get this merged in?

Haarolean avatar May 20 '23 11:05 Haarolean

@Haarolean See my previous comment. There are API breaking changes that need to be addressed (using bridge methods) before this can be merged.

bitwiseman avatar May 22 '23 16:05 bitwiseman