Closed stianst closed 7 months ago
Hey @stianst ,
Yeah, you usually need access to the test org when recording testing as it's easier for them to be reproduced by others when something needs a change.
You need @bitwiseman for that.
As for the error you have when running the tests, the test runs by default with an HTTP Client that is not compatible with Java 17+. Run them with Java 11 and things should work better.
Ah, actually, good news, I forgot I had the permission to do that.
I added you to the test org. You should have received an invite.
@bitwiseman Stian is a colleague from Red Hat leading the Keycloak project.
Ah also, do not record things for all the tests, doing:
rm -rf src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssue/
mvn install -Dtest.github.takeSnapshot -Dtest=GHIssueTest#closeIssue
rm -rf src/test/resources/org/kohsuke/github/GHIssueTest/wiremock/closeIssueNotPlanned/
mvn install -Dtest.github.takeSnapshot -Dtest=GHIssueTest#closeIssueNotPlanned
will be better.
Then you should add the new snapshots to your commit.
Got the test working eventually (well, okay I only spent 30 min, so this wasn't too bad ;)), but used an org I created for the purpose. Will try with the official org and update the data.
@gsmet @bitwiseman would it be okay to enable fine-grained personal access tokens for the org (https://github.com/organizations/hub4j-test-org/settings/personal-access-tokens-onboarding). They are a bit nicer than the legacy tokens as you can limit to a specific org/repo.
Should be ready to go now
@gsmet @bitwiseman would it be okay to enable fine-grained personal access tokens for the org (https://github.com/organizations/hub4j-test-org/settings/personal-access-tokens-onboarding). They are a bit nicer than the legacy tokens as you can limit to a specific org/repo.
Enabled the fine-grained PATs.
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
be00e51
) 80.64% compared to head (ddaec5f
) 80.69%. Report is 4 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Fixed the last issue with using EnumUtils.getNullableEnumOrDefault
and added Javadocs to GHIssueStateReason
since the site
job complained about that.
@bitwiseman hi, sorry to ping you on this as I'm sure you're busy with other stuff. Just wondering a bit on when/if this could be merged and what the plans are for a new release? I'm a bit blocked on this for some automation for the Keycloak project.
Hi, first of thanks for providing this library. I'm using it quite a lot, but finding a few things that are missing for my needs, and trying to contribute those, with the first one being supporting closing issues as not planned.
Trying to figure out how to work with the testsuite, but having a few issues.
When running
mvn install -Dtest.github.org=false -Dtest=GHIssueTest
I'm getting the following exception:Another thing is the test is hardwired to
hub4j-test-org
which I don't have access to, so guess I need to use my own repository somehow.Closes #1792