-
Notifications
You must be signed in to change notification settings - Fork 736
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to fork default branch only #1995
base: main
Are you sure you want to change the base?
Conversation
I've run into a testing issue with GHRepositoryForkBuilderTest. The tests are failing when using the personal account because the mock server can't handle branch API requests. Here's the error:
I've seen a similar issue before with owner validation. After removing that check, this error appeared instead. Now I can either skip the branch validation (but then we won't properly test the defaultBranchOnly feature) or add mock responses for my account (which seems like an awkward solution). I noticed in the docs that using hub4j-test-org is the recommended way to run tests. Could I get access to that organization? This seems like it would solve the problem and follow the project's testing guidelines. Let me know if there are other approaches I should consider. Thanks for your guidance! |
Invite sent. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1995 +/- ##
============================================
+ Coverage 83.23% 83.56% +0.32%
- Complexity 2352 2373 +21
============================================
Files 233 234 +1
Lines 7225 7245 +20
Branches 379 382 +3
============================================
+ Hits 6014 6054 +40
+ Misses 973 956 -17
+ Partials 238 235 -3 ☔ View full report in Codecov by Sentry. |
You're doing great with this PR. I like the builder and you have working tests, you're most of the way there. Thanks for sticking with it! Regarding code coverage: First, you can make Second, to get line 92 and 94, you're going to need to:
Does this make sense? |
I have the same kind of problems in #1994. |
No problem, @Alaurant knows your codebase much better than I do. |
@gounthar |
No worries. I had discussed this with @gounthar earlier and offered to help with the implementation. Just for providing another option to get this done. |
Description
Fixes #1993 , based on Repository create a fork API
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.When creating a PR: