mirror of
https://github.com/go-gitea/gitea.git
synced 2025-09-05 17:58:14 +00:00

- ~Upgrade golang to 1.25~ blocked by the issue https://github.com/go-swagger/go-swagger/issues/3220 - Upgrade minor versions of most dependencies - Upgrade github.com/google/go-github version to v74 - Fix meilisearch because of sdk interface change - Use github.com/Necoro/html2text which is a fork instead of html2text because of https://github.com/jaytaylor/html2text/issues/67 which resulted in complie failure. - Fix some deprecated methods of gitlab go client.
27 lines
703 B
Go
27 lines
703 B
Go
// Copyright 2019 The Gitea Authors. All rights reserved.
|
|
// Copyright 2018 Jonas Franz. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package migrations
|
|
|
|
import (
|
|
"errors"
|
|
|
|
"github.com/google/go-github/v74/github"
|
|
)
|
|
|
|
// ErrRepoNotCreated returns the error that repository not created
|
|
var ErrRepoNotCreated = errors.New("repository is not created yet")
|
|
|
|
// IsRateLimitError returns true if the err is github.RateLimitError
|
|
func IsRateLimitError(err error) bool {
|
|
_, ok := err.(*github.RateLimitError)
|
|
return ok
|
|
}
|
|
|
|
// IsTwoFactorAuthError returns true if the err is github.TwoFactorAuthError
|
|
func IsTwoFactorAuthError(err error) bool {
|
|
_, ok := err.(*github.TwoFactorAuthError)
|
|
return ok
|
|
}
|