Closed jbenaventem closed 4 months ago
Attention: Patch coverage is 57.14286%
with 3 lines
in your changes are missing coverage. Please review.
Project coverage is 80.71%. Comparing base (
1aa7178
) to head (2105263
). Report is 4 commits behind head on main.:exclamation: Current head 2105263 differs from pull request most recent head 88cfdad. Consider uploading reports for the commit 88cfdad to get more accurate results
Files | Patch % | Lines |
---|---|---|
src/main/java/org/kohsuke/github/GHRepository.java | 50.00% | 2 Missing :warning: |
...n/java/org/kohsuke/github/GHRepositoryBuilder.java | 0.00% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@gsmet Thank you for the review. I've resolved almost comments. About this comment
Also I suspect you will have to inject the root in the repository, unless it's done automatically by Jackson. In any case, adding a test to test that you can actually execute an operation on the repository after getting it would be better.
I'm not sure if with this solution provided is enought or you're waiting something more.....
/**
* Test get repository created from a template repository
*
* @throws Exception
* the exception
*/
@Test
public void testGetRepositoryWithTemplateRepositoryInfo() throws Exception {
GHRepository testRepo = gitHub.getRepositoryById(repo.getId());
assertThat(testRepo.getTemplateRepository(), notNullValue());
assertThat(testRepo.getTemplateRepository().getOwnerName(), equalTo("octocat"));
assertThat(testRepo.getTemplateRepository().isTemplate(), equalTo(true));
}
Description
Add Support for Retrieving Template Repository Information for a Repository #1812
Before submitting a PR:
@link
JavaDoc entries to the relevant documentation on https://docs.github.com/en/rest .mvn -D enable-ci clean install site
locally. If this command doesn't succeed, your change will not pass CI.main
. You will create your PR from that branch.