Documentation ¶
Index ¶
- Variables
- func Confirm(ctx context.Context, client *github.Client, org string, _ *logrus.Logger) (name string, err error)
- func EnsureScopes(log *logrus.Logger, scopes []github.Scope) (err error)
- func Grant(ctx context.Context, client *github.Client, log *logrus.Logger, force bool) (token string, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Scopes 表示此 app 預設需要的 scopes Scopes = []github.Scope{github.ScopeReadOrg, github.ScopeUser, github.ScopeRepo} // ErrOauthAccessAlreadyExists 表示 token 已存在 ErrOauthAccessAlreadyExists = errors.New(`access token already exists To store a token on https://github.com/settings/tokens, use '--token' flag To re-generate a new token, use '--force' flag Use 'init --help' for more information about the command`) )
Functions ¶
func Confirm ¶
func Confirm(ctx context.Context, client *github.Client, org string, _ *logrus.Logger) (name string, err error)
Confirm 確保 token 的使用者存在於傳入的 org 中
func EnsureScopes ¶
EnsureScopes 確保當前的 token 有傳入的所有 scopes
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.