mirror of
				https://gitea.com/gitea/tea.git
				synced 2025-10-31 09:15:26 +01:00 
			
		
		
		
	Fix lint
This commit is contained in:
		| @@ -19,7 +19,8 @@ import ( | ||||
| 	"github.com/urfave/cli/v3" | ||||
| ) | ||||
|  | ||||
| var ErrNotAGiteaRepo = errors.New("No Gitea login found. You might want to specify --repo (and --login) to work outside of a repository") | ||||
| // ErrNotAGiteaRepo is returned when no Gitea login could be found for a local git repo | ||||
| var ErrNotAGiteaRepo = errors.New("no Gitea login found. You might want to specify --repo (and --login) to work outside of a repository") | ||||
|  | ||||
| // TeaContext contains all context derived during command initialization and wraps cli.Context | ||||
| type TeaContext struct { | ||||
| @@ -60,8 +61,8 @@ type CtxRequirement struct { | ||||
| 	RemoteRepo bool | ||||
| } | ||||
|  | ||||
| // ContextFromLocalRepo discovers login & repo slug from the default branch remote of the given local repo | ||||
| func ContextFromLocalRepo(repoPath, remoteValue string) (*git.TeaRepo, *config.Login, string, error) { | ||||
| // FromLocalRepo discovers login & repo slug from the default branch remote of the given local repo | ||||
| func FromLocalRepo(repoPath, remoteValue string) (*git.TeaRepo, *config.Login, string, error) { | ||||
| 	repo, err := git.RepoFromPath(repoPath) | ||||
| 	if err != nil { | ||||
| 		return nil, nil, "", err | ||||
|   | ||||
| @@ -307,6 +307,7 @@ var tokenScopeOpts = []string{ | ||||
| 	string(gitea.AccessTokenScopeSudo), | ||||
| } | ||||
|  | ||||
| // LoginSelect prompts the user to select a login if multiple are configured | ||||
| func LoginSelect() (*config.Login, error) { | ||||
| 	logins, err := config.GetLogins() | ||||
| 	if err != nil { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Lunny Xiao
					Lunny Xiao