mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-10-03 00:42:01 +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 (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"crypto/md5"
|
|
||||||
"encoding/hex"
|
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
log "github.com/Sirupsen/logrus"
|
log "github.com/Sirupsen/logrus"
|
||||||
|
@ -11,7 +9,6 @@ import (
|
||||||
"github.com/mrjones/oauth"
|
"github.com/mrjones/oauth"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
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))
|
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
|
//Helper function to help create the hook
|
||||||
func (c *Client) doPut(url string, body []byte) error {
|
func (c *Client) doPut(url string, body []byte) error {
|
||||||
request, err := http.NewRequest("PUT", url, bytes.NewBuffer(body))
|
request, err := http.NewRequest("PUT", url, bytes.NewBuffer(body))
|
||||||
|
|
Loading…
Reference in a new issue