mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 21:28:11 +09:00 
			
		
		
		
	Validate migration files (#18203)
JSON Schema validation for data used by Gitea during migrations Discussion at https://forum.forgefriends.org/t/common-json-schema-for-repository-information/563 Co-authored-by: Loïc Dachary <loic@dachary.org>
This commit is contained in:
		
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							49dd906753
						
					
				
				
					commit
					3bb028cc46
				
			| @@ -43,6 +43,10 @@ var CmdRestoreRepository = cli.Command{ | ||||
| 			Usage: `Which items will be restored, one or more units should be separated as comma. | ||||
| wiki, issues, labels, releases, release_assets, milestones, pull_requests, comments are allowed. Empty means all units.`, | ||||
| 		}, | ||||
| 		cli.BoolFlag{ | ||||
| 			Name:  "validation", | ||||
| 			Usage: "Sanity check the content of the files before trying to load them", | ||||
| 		}, | ||||
| 	}, | ||||
| } | ||||
|  | ||||
| @@ -58,6 +62,7 @@ func runRestoreRepository(c *cli.Context) error { | ||||
| 		c.String("owner_name"), | ||||
| 		c.String("repo_name"), | ||||
| 		c.StringSlice("units"), | ||||
| 		c.Bool("validation"), | ||||
| 	) | ||||
| 	if statusCode == http.StatusOK { | ||||
| 		return nil | ||||
|   | ||||
		Reference in New Issue
	
	Block a user