mirror of
				https://codeberg.org/forgejo/forgejo.git
				synced 2025-10-31 14:31:02 +00:00 
			
		
		
		
	This allows syncing a branch of a fork with a branch of the base repo. It looks like this:  This is only possible, if the fork don't have commits that are not in the main repo. The feature is already working, but it is missing Finetuning, a better API, translations and tests, so this is currently WIP. It is also not tested with go-git. <!--start release-notes-assistant--> ## Release notes <!--URL:https://codeberg.org/forgejo/forgejo--> - Features - [PR](https://codeberg.org/forgejo/forgejo/pulls/2364): <!--number 2364 --><!--line 0 --><!--description c3luYyBmb3Jrcw==-->sync forks<!--description--> <!--end release-notes-assistant--> Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2364 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org> Co-authored-by: JakobDev <jakobdev@gmx.de> Co-committed-by: JakobDev <jakobdev@gmx.de>
		
			
				
	
	
		
			20 lines
		
	
	
	
		
			600 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
	
		
			600 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| // Copyright 2016 The Gitea Authors. All rights reserved.
 | |
| // SPDX-License-Identifier: MIT
 | |
| 
 | |
| package structs
 | |
| 
 | |
| // CreateForkOption options for creating a fork
 | |
| type CreateForkOption struct {
 | |
| 	// organization name, if forking into an organization
 | |
| 	Organization *string `json:"organization"`
 | |
| 	// name of the forked repository
 | |
| 	Name *string `json:"name"`
 | |
| }
 | |
| 
 | |
| // SyncForkInfo information about syncing a fork
 | |
| type SyncForkInfo struct {
 | |
| 	Allowed       bool   `json:"allowed"`
 | |
| 	ForkCommit    string `json:"fork_commit"`
 | |
| 	BaseCommit    string `json:"base_commit"`
 | |
| 	CommitsBehind int    `json:"commits_behind"`
 | |
| }
 |