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
Recognize more characters in crossreferenced repo name #3413
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3413 +/- ##
=========================================
Coverage ? 35.64%
=========================================
Files ? 281
Lines ? 40552
Branches ? 0
=========================================
Hits ? 14456
Misses ? 23962
Partials ? 2134
Continue to review full report at Codecov.
|
@@ -43,7 +43,7 @@ var ( | |||
IssueAlphanumericPattern = regexp.MustCompile(`( |^|\()[A-Z]{1,10}-[1-9][0-9]*\b`) | |||
// CrossReferenceIssueNumericPattern matches string that references a numeric issue in a different repository | |||
// e.g. gogits/gogs#12345 | |||
CrossReferenceIssueNumericPattern = regexp.MustCompile(`( |^)[0-9a-zA-Z]+/[0-9a-zA-Z]+#[0-9]+\b`) | |||
CrossReferenceIssueNumericPattern = regexp.MustCompile(`( |^)[0-9a-zA-Z-_\.]+/[0-9a-zA-Z-_\.]+#[0-9]+\b`) |
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.
Before anyone researches this: did that already - both RegisterForm and CreateRepoForm in modules/auth use AlphaDashDot as a rule in the binding field, which in turn inside macaron is converted into "Every string that matches this should be rejected".
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.
LGTM
LGTM. (Off topic: why the CI Successfully this PR?) |
@lunny it does succeed time to time :) |
Fixes #3412