mirror of
				https://gitea.com/gitea/tea.git
				synced 2025-10-31 09:15:26 +01:00 
			
		
		
		
	Add subcomand 'pulls create' (#144)
wordings print pull URL change title required mesage inform User on push error fix body 🚀 finish impruve fix help menue of pull create refactor Add pull-request command Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Sandro Santilli <strk@kbt.io> Reviewed-on: https://gitea.com/gitea/tea/pulls/144 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Reviewed-by: lafriks <lafriks@noreply.gitea.io>
This commit is contained in:
		| @@ -175,3 +175,17 @@ func (r TeaRepo) TeaFindBranchByName(branchName, repoURL string) (b *git_config. | ||||
| 	} | ||||
| 	return b, b.Validate() | ||||
| } | ||||
|  | ||||
| // TeaGetCurrentBranchName return the name of the branch witch is currently active | ||||
| func (r TeaRepo) TeaGetCurrentBranchName() (string, error) { | ||||
| 	localHead, err := r.Head() | ||||
| 	if err != nil { | ||||
| 		return "", err | ||||
| 	} | ||||
|  | ||||
| 	if !localHead.Name().IsBranch() { | ||||
| 		return "", fmt.Errorf("active ref is no branch") | ||||
| 	} | ||||
|  | ||||
| 	return strings.TrimLeft(localHead.Name().String(), "refs/heads/"), nil | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 6543
					6543