فهرست منبع

fix incoming webhook settings

Mohammed Nafees 4 سال پیش
والد
کامیت
12bbcc894f
2فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 1 1
      api/server/handlers/environment/create.go
  2. 1 1
      api/server/handlers/webhook/github_incoming.go

+ 1 - 1
api/server/handlers/environment/create.go

@@ -112,7 +112,7 @@ func (c *CreateEnvironmentHandler) ServeHTTP(w http.ResponseWriter, r *http.Requ
 				"secret":       c.Config().ServerConf.GithubIncomingWebhookSecret,
 			},
 			Events: []string{"pull_request"},
-			Active: github.Bool(false),
+			Active: github.Bool(true),
 		},
 	)
 

+ 1 - 1
api/server/handlers/webhook/github_incoming.go

@@ -57,7 +57,7 @@ func (c *GithubIncomingWebhookHandler) ServeHTTP(w http.ResponseWriter, r *http.
 }
 
 func (c *GithubIncomingWebhookHandler) processPullRequestEvent(event *github.PullRequestEvent, r *http.Request) error {
-	owner := event.GetOrganization().GetName()
+	owner := event.GetRepo().GetOwner().GetLogin()
 	repo := event.GetRepo().GetName()
 
 	env, err := c.Repo().Environment().ReadEnvironmentByOwnerRepoName(owner, repo)