Fix github webhook payload detection logic (#728)
The correct value for "package_type" seems to be "CONTAINER" instead of "docker"ioutil^2
parent
10acf52919
commit
34566aa802
|
@ -120,9 +120,9 @@ func (s *TriggerServer) githubHandler(resp http.ResponseWriter, req *http.Reques
|
|||
return
|
||||
}
|
||||
|
||||
if payload.RegistryPackage.PackageType != "docker" {
|
||||
if payload.RegistryPackage.PackageType != "CONTAINER" {
|
||||
resp.WriteHeader(http.StatusBadRequest)
|
||||
fmt.Fprintf(resp, "registry package type was not docker")
|
||||
fmt.Fprintf(resp, "registry package type was not CONTAINER")
|
||||
}
|
||||
|
||||
if payload.Repository.FullName == "" { // github package name
|
||||
|
|
|
@ -13,7 +13,7 @@ var fakeGithubPackageWebhook = `{
|
|||
"registry_package": {
|
||||
"id": 35087,
|
||||
"name": "server",
|
||||
"package_type": "docker",
|
||||
"package_type": "CONTAINER",
|
||||
"html_url": "https://github.com/DingGGu/UtaiteBOX/packages/35087",
|
||||
"created_at": "2019-10-11T18:18:58Z",
|
||||
"updated_at": "2019-10-11T18:18:58Z",
|
||||
|
|
Loading…
Reference in New Issue