-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Fix PR creation on forked repositories #31863
Conversation
3021f2a
to
eb4fc98
Compare
@lunny It's not entirely clear to me what changes should still be made to this PR. Would you mind clarifying your previous comment? |
The logic looks right. Could you have a test for that change? |
I've added a test which should test the new logic I added. I found it quite complicated to work our exactly how the test suite works, since I could not get single tests to run without getting this error: Running tool: /usr/local/go/bin/go test -timeout 30s -tags 'sqlite sqlite_unlock_notify' -run ^TestPullCreatePrFromBaseToFork$ code.gitea.io/gitea/tests/integration -v
Environment variable $GITEA_CONF not set, use default: tests/sqlite.ini
sqlite3 requires: import _ "github.com/mattn/go-sqlite3" or -tags sqlite,sqlite_unlock_notify
FAIL code.gitea.io/gitea/tests/integration 0.069s The test as I've set it up right now is about the best that I could figure out. In case it doesn't quite work as intended, I have added a description of what I tried to make in the comment above the newly added test. |
You can use |
@lunny I've added a test which should cover the changes I've made. If you've got any comments or questions, please let me know 📨 |
Congrats on your first PR to the codebase, thanks so much! |
I was unable to create a backport for 1.22. @LordChunk, please send one manually. 🍵
|
Resolves #20475