fixed typos
This commit is contained in:
parent
4497e7fb68
commit
a6a1e88544
7 changed files with 34 additions and 34 deletions
12
main.go
12
main.go
|
|
@ -1,11 +1,11 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"net/http"
|
||||
"encoding/json"
|
||||
"time"
|
||||
"io/ioutil"
|
||||
)
|
||||
|
||||
var version string
|
||||
|
|
@ -31,12 +31,12 @@ func prHandler(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
switch pr.Action {
|
||||
case "opened", "reopened", "synchronize":
|
||||
if r.Header.Get("X-Interseptor-Action") == "create" {
|
||||
if r.Header.Get("X-Interceptor-Action") == "create" {
|
||||
w.Write(body)
|
||||
return
|
||||
}
|
||||
case "closed":
|
||||
if r.Header.Get("X-Interseptor-Action") == "delete" {
|
||||
if r.Header.Get("X-Interceptor-Action") == "delete" {
|
||||
w.Write(body)
|
||||
return
|
||||
}
|
||||
|
|
@ -63,7 +63,7 @@ func pushHandler(w http.ResponseWriter, r *http.Request) {
|
|||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
if r.Header.Get("X-Interseptor-Ref") == p.Ref {
|
||||
if r.Header.Get("X-Interceptor-Ref") == p.Ref {
|
||||
w.Write(body)
|
||||
return
|
||||
}
|
||||
|
|
@ -93,7 +93,7 @@ func commentHandler(w http.ResponseWriter, r *http.Request) {
|
|||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
if r.Header.Get("X-Interseptor-Comment") == c.Comment.Body {
|
||||
if r.Header.Get("X-Interceptor-Comment") == c.Comment.Body {
|
||||
w.Write(body)
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue