mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-26 20:01:02 +00:00
No longer used function
This commit is contained in:
parent
df8f9de33d
commit
5b52ef924f
1 changed files with 0 additions and 12 deletions
|
@ -2,8 +2,6 @@ package internal
|
|||
|
||||
import (
|
||||
"bytes"
|
||||
"crypto/md5"
|
||||
"encoding/hex"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
log "github.com/Sirupsen/logrus"
|
||||
|
@ -11,7 +9,6 @@ import (
|
|||
"github.com/mrjones/oauth"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"strings"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -159,15 +156,6 @@ func (c *Client) DeleteHook(owner string, name string, link string) error {
|
|||
return c.doDelete(fmt.Sprintf(pathHookEnabled, c.base, owner, name, hookName))
|
||||
}
|
||||
|
||||
func avatarLink(email string) (url string) {
|
||||
hasher := md5.New()
|
||||
hasher.Write([]byte(strings.ToLower(email)))
|
||||
emailHash := fmt.Sprintf("%v", hex.EncodeToString(hasher.Sum(nil)))
|
||||
avatarURL := fmt.Sprintf("https://www.gravatar.com/avatar/%s.jpg", emailHash)
|
||||
log.Debug(avatarURL)
|
||||
return avatarURL
|
||||
}
|
||||
|
||||
//Helper function to help create the hook
|
||||
func (c *Client) doPut(url string, body []byte) error {
|
||||
request, err := http.NewRequest("PUT", url, bytes.NewBuffer(body))
|
||||
|
|
Loading…
Reference in a new issue