Extend Logging & Report to WebHook Caller back if pulls are disabled (#369)

* Add more logging 
* Format Code
* Add TODOs
* Fix nits
* Delete two unused functions
* Report to WebHook Caller back if pulls are disabled
This commit is contained in:
6543
2021-09-27 23:32:08 +02:00
committed by GitHub
parent a94807efeb
commit f81bd8c656
12 changed files with 67 additions and 64 deletions

View File

@@ -38,18 +38,6 @@ func Repo(c *gin.Context) *model.Repo {
return r
}
func Repos(c *gin.Context) []*model.RepoLite {
v, ok := c.Get("repos")
if !ok {
return nil
}
r, ok := v.([]*model.RepoLite)
if !ok {
return nil
}
return r
}
func SetRepo() gin.HandlerFunc {
return func(c *gin.Context) {
var (
@@ -93,7 +81,6 @@ func Perm(c *gin.Context) *model.Perm {
}
func SetPerm() gin.HandlerFunc {
return func(c *gin.Context) {
user := User(c)
repo := Repo(c)

View File

@@ -36,18 +36,6 @@ func User(c *gin.Context) *model.User {
return u
}
func Token(c *gin.Context) *token.Token {
v, ok := c.Get("token")
if !ok {
return nil
}
u, ok := v.(*token.Token)
if !ok {
return nil
}
return u
}
func SetUser() gin.HandlerFunc {
return func(c *gin.Context) {
var user *model.User