summaryrefslogtreecommitdiffstats
path: root/modules/validation
Commit message (Collapse)AuthorAgeFilesLines
* Implement webhook branch filter (#7791)WGH2019-09-093-2/+90
| | | | | | | | * Fix validate() function to handle errors in embedded anon structs * Implement webhook branch filter See #2025, #3998.
* Use gitea forked macaron (#7933)Tamal Saha2019-08-235-7/+7
| | | Signed-off-by: Tamal Saha <tamal@appscode.com>
* Fix lax comparison in validation tests (#7815)WGH2019-08-121-2/+6
| | | | | | | | | | | | | | | | | If you add t.Logf("%+v %+v", actual, testCase.expectedErrors) to the test code, you'll notice that only Errors' Messages are being compared: --- PASS: Test_ValidURLValidation/Invalid_schema (0.00s) binding_test.go:43: [Url] [Url] FieldNames and Classification are ignored in comparison. Moreover, an Errors slice with a single Error with empty message is formatted as '[]' (the same as empty slice), which is also error-prone. I discovered this when working on #7791 when one test which was not supposed to pass did pass. https://play.golang.org/p/qC4wVLrm4NG This commit changes the test to do the comparison properly.
* Add golangci (#6418)kolaente2019-06-121-6/+0
|
* Validate External Tracker URL Format (#7089)mrsdizzie2019-05-312-0/+86
| | | | | | | | | | | | | | | | | | * Validate External Tracker URL Format Add some validation checks for external tracker URL format. Fixes #7068 * Don't make {index} a hard requirement * Fix Description * make fmt * move regex to package level * fix copyright date
* Clean up ref name rules (#6437)mrsdizzie2019-03-262-2/+129
| | | | | | | | | | | | | | | | | * Clean up ref name rules Clean up checks on reference names to better conform to the guideline here: https://git-scm.com/docs/git-check-ref-format This fixes half of #6321 * Update branch create integration test According to: https://git-scm.com/docs/git-check-ref-format And: git check-ref-format "master/feature=test1" This is a valid branch name and we should not be testing for it to fail.
* Improve URL validation for external wiki and external issues (#4710)Lauris BH2018-08-153-8/+170
| | | | | | * Improve URL validation for external wiki and external issues * Do not allow also localhost address for external URLs
* Add tag check to release draft creation (#3729)Bwko2018-06-041-1/+1
|
* Create new branch from branch selection dropdown (#2130)Lauris BH2017-10-151-3/+9
| | | | | | | | | | * Create new branch from branch selection dropdown and rewrite it to VueJS * Make updateLocalCopyToCommit as not exported * Move branch name validation to model * Fix possible race condition
* Better URL validation (#1507)Lauris BH2017-04-194-0/+417
* Add correct git branch name validation * Change git refname validation error constant name * Implement URL validation based on GoLang url.Parse method * Backward compatibility with older Go compiler * Add git reference name validation unit tests * Remove unused variable in unit test * Implement URL validation based on GoLang url.Parse method * Backward compatibility with older Go compiler * Add url validation unit tests