Documentation ¶
Index ¶
- func ActivePullRequest(baseRepoID int64, headRepoID int64, baseBranch, headBranch string) (*models.PullRequest, error)
- func CanUserPush(protectedBranchID, userID int64) (bool, error)
- func CheckUnitUser(userID, repoID int64, isAdmin bool, unitType models.UnitType) (*models.AccessMode, error)
- func GetProtectedBranchBy(repoID int64, branchName string) (*models.ProtectedBranch, error)
- func GetPublicKeyByID(keyID int64) (*models.PublicKey, error)
- func GetRepository(repoID int64) (*models.Repository, bool, error)
- func GetRepositoryByOwnerAndName(ownerName, repoName string) (*models.Repository, error)
- func GetUserByKeyID(keyID int64) (*models.User, error)
- func HasDeployKey(keyID, repoID int64) (bool, error)
- func InitWiki(repoID int64) error
- func PushUpdate(opt models.PushUpdateOptions) error
- func UpdateDeployKeyUpdated(keyID int64, repoID int64) error
- func UpdatePublicKeyUpdated(keyID int64) error
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ActivePullRequest ¶ added in v1.7.0
func ActivePullRequest(baseRepoID int64, headRepoID int64, baseBranch, headBranch string) (*models.PullRequest, error)
ActivePullRequest returns an active pull request if it exists
func CanUserPush ¶ added in v1.3.0
CanUserPush returns if user can push
func CheckUnitUser ¶ added in v1.7.0
func CheckUnitUser(userID, repoID int64, isAdmin bool, unitType models.UnitType) (*models.AccessMode, error)
CheckUnitUser check whether user could visit the unit of this repository
func GetProtectedBranchBy ¶
func GetProtectedBranchBy(repoID int64, branchName string) (*models.ProtectedBranch, error)
GetProtectedBranchBy get protected branch information
func GetPublicKeyByID ¶ added in v1.7.0
GetPublicKeyByID get public ssh key by his ID
func GetRepository ¶ added in v1.7.0
func GetRepository(repoID int64) (*models.Repository, bool, error)
GetRepository return the repository by its ID and a bool about if it's allowed to have PR
func GetRepositoryByOwnerAndName ¶ added in v1.7.0
func GetRepositoryByOwnerAndName(ownerName, repoName string) (*models.Repository, error)
GetRepositoryByOwnerAndName returns the repository by given ownername and reponame.
func GetUserByKeyID ¶ added in v1.7.0
GetUserByKeyID get user attached to key
func HasDeployKey ¶ added in v1.7.0
HasDeployKey check if repo has deploy key
func PushUpdate ¶
func PushUpdate(opt models.PushUpdateOptions) error
PushUpdate update publick key updates
func UpdateDeployKeyUpdated ¶ added in v1.7.0
UpdateDeployKeyUpdated update deploy key updates
func UpdatePublicKeyUpdated ¶
UpdatePublicKeyUpdated update public key updates