-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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. 🍵
|
* giteaofficial/main: [skip ci] Updated translations via Crowdin Allow filtering PRs by poster in the ListPullRequests API (go-gitea#32209) Fix bug when there are multiple triggers with workflow dispatch (go-gitea#32200) [skip ci] Updated licenses and gitignores [skip ci] Updated translations via Crowdin Upgrade htmx to 2.0.3 (go-gitea#32192) Enhance USER_DISABLED_FEATURES to allow disabling change username or full name (go-gitea#31959) [skip ci] Updated translations via Crowdin Add support for searching users by email (go-gitea#30908) Fix PR creation on forked repositories (go-gitea#31863) [skip ci] Updated translations via Crowdin Fixed race condition when deleting documents by repoId in ElasticSearch (go-gitea#32185) add {{TEST_MINIO_ENDPOINT}} for local testing "with/without" docker + fix pgsql testing doc (go-gitea#32105) [skip ci] Updated translations via Crowdin
Resolves #20475