Documentation ¶
Index ¶
- func AddOwnerHook(ctx *context.APIContext, owner *user_model.User, form *api.CreateHookOption)
- func AddRepoHook(ctx *context.APIContext, form *api.CreateHookOption)
- func AddSystemHook(ctx *context.APIContext, form *api.CreateHookOption)
- func ConvertToObjectID(ctx gocontext.Context, repo *context.Repository, commitID string) (git.ObjectID, error)
- func DeleteOwnerHook(ctx *context.APIContext, owner *user_model.User, hookID int64)
- func EditOwnerHook(ctx *context.APIContext, owner *user_model.User, form *api.EditHookOption, ...)
- func EditRepoHook(ctx *context.APIContext, form *api.EditHookOption, hookID int64)
- func EditSystemHook(ctx *context.APIContext, form *api.EditHookOption, hookID int64)
- func GetGitRefs(ctx *context.APIContext, filter string) ([]*git.Reference, string, error)
- func GetListOptions(ctx *context.APIContext) db.ListOptions
- func GetOwnerHook(ctx *context.APIContext, ownerID, hookID int64) (*webhook.Webhook, error)
- func GetRepoHook(ctx *context.APIContext, repoID, hookID int64) (*webhook.Webhook, error)
- func ListOwnerHooks(ctx *context.APIContext, owner *user_model.User)
- func MustConvertToSHA1(ctx gocontext.Context, repo *context.Repository, commitID string) string
- func ResolveRefOrSha(ctx *context.APIContext, ref string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddOwnerHook ¶ added in v1.20.0
func AddOwnerHook(ctx *context.APIContext, owner *user_model.User, form *api.CreateHookOption)
AddOwnerHook adds a hook to an user or organization
func AddRepoHook ¶
func AddRepoHook(ctx *context.APIContext, form *api.CreateHookOption)
AddRepoHook add a hook to a repo. Writes to `ctx` accordingly
func AddSystemHook ¶ added in v1.19.0
func AddSystemHook(ctx *context.APIContext, form *api.CreateHookOption)
AddSystemHook add a system hook
func ConvertToObjectID ¶ added in v1.22.0
func ConvertToObjectID(ctx gocontext.Context, repo *context.Repository, commitID string) (git.ObjectID, error)
ConvertToObjectID returns a full-length SHA1 from a potential ID string
func DeleteOwnerHook ¶ added in v1.20.0
func DeleteOwnerHook(ctx *context.APIContext, owner *user_model.User, hookID int64)
DeleteOwnerHook deletes the hook owned by the owner.
func EditOwnerHook ¶ added in v1.20.0
func EditOwnerHook(ctx *context.APIContext, owner *user_model.User, form *api.EditHookOption, hookID int64)
EditOwnerHook updates a webhook of an user or organization
func EditRepoHook ¶
func EditRepoHook(ctx *context.APIContext, form *api.EditHookOption, hookID int64)
EditRepoHook edit webhook `w` according to `form`. Writes to `ctx` accordingly
func EditSystemHook ¶ added in v1.19.0
func EditSystemHook(ctx *context.APIContext, form *api.EditHookOption, hookID int64)
EditSystemHook edit system webhook `w` according to `form`. Writes to `ctx` accordingly
func GetGitRefs ¶ added in v1.15.0
GetGitRefs return git references based on filter
func GetListOptions ¶ added in v1.12.0
func GetListOptions(ctx *context.APIContext) db.ListOptions
GetListOptions returns list options using the page and limit parameters
func GetOwnerHook ¶ added in v1.20.0
GetOwnerHook gets an user or organization webhook. Errors are written to ctx.
func GetRepoHook ¶
GetRepoHook get a repo's webhook. If there is an error, write to `ctx` accordingly and return the error
func ListOwnerHooks ¶ added in v1.20.0
func ListOwnerHooks(ctx *context.APIContext, owner *user_model.User)
ListOwnerHooks lists the webhooks of the provided owner
func MustConvertToSHA1 ¶ added in v1.18.0
MustConvertToSHA1 returns a full-length SHA1 string from a potential ID string, or returns origin input if it can't convert to SHA1
func ResolveRefOrSha ¶ added in v1.15.0
func ResolveRefOrSha(ctx *context.APIContext, ref string) string
ResolveRefOrSha resolve ref to sha if exist
Types ¶
This section is empty.