-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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 ref links in issue overviews for tags #8742
Conversation
Tags used to not generate correct URLs (src/branch/tags/1.0.0 instead of src/tags/1.0.0). Also cleans up some code around it with the created helper functions.
Codecov Report
@@ Coverage Diff @@
## master #8742 +/- ##
=========================================
Coverage ? 41.13%
=========================================
Files ? 549
Lines ? 71450
Branches ? 0
=========================================
Hits ? 29393
Misses ? 38345
Partials ? 3712
Continue to review full report at Codecov.
|
Could someone restart the test-mysql8 test? It seems to have failed randomly |
Restarted |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prefent Truncated incorrect DOUBLE value: 'refs/heads/' if migration is running twice (this should not happen but if you downgrade without restore the database it will
The XSS test failed again... |
@lunny need your approval |
Any updates? |
ping LG-TM |
Looks like this breaks mysql installations:
|
I was able to fix it in my installation by running
I'll send a pr.- |
PR is up: #11419 |
The migration introduced in #8742 breaks mysql installations. This pr fixes that by correctly using CONCAT. Signed-off-by: kolaente <[email protected]>
* Properly generate ref URLs Tags used to not generate correct URLs (src/branch/tags/1.0.0 instead of src/tags/1.0.0). Also cleans up some code around it with the created helper functions. * Fix formatting and create migration * Add copyright head to utils_test * Use a raw query for the ref migration * Remove semicolon * Quote column and table names in migration SQL * Change || to CONCAT, since MSSQL does not support || * Make migration engine aware * Add missing import * Move ref EndName and URL to the issue service * Fix tests * Add test for commit refs * Update issue.go * Use the right command for building JavaScript bundles * Prepare for merge * Check for refs/* before prepending in migration * Update services/issue/issue_test.go * Update modules/git/utils_test.go Co-authored-by: techknowlogick <[email protected]> Co-authored-by: techknowlogick <[email protected]>
The migration introduced in go-gitea#8742 breaks mysql installations. This pr fixes that by correctly using CONCAT. Signed-off-by: kolaente <[email protected]>
I changed
Issue.Ref
to store the actual ref instead of (what Gitea assumes to be) the branch name, and modified all templates to deal with this. This ultimately fixes #8085.To do this, I created a few helper functions to generate the URL (and updated
SlackLinkToRef
to them, since that's where I got them from).This is my first PR for Gitea, so I hope I did not make any dumb mistakes.