Skip to content

Commit

Permalink
Handle lack of permissions on GH connect
Browse files Browse the repository at this point in the history
  • Loading branch information
kitallis committed Jul 8, 2024
1 parent 5c0c2b1 commit aa1ab49
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions svc/web/handlers/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ func GithubAppsCallback(c *gin.Context) {
return
}

if queryParams.Get("setup_action") == "request" {
c.Redirect(http.StatusFound, "/")
return
}

installationId, err := strconv.ParseInt(queryParams.Get("installation_id"), 10, 64)
if err != nil {
c.JSON(http.StatusInternalServerError, gin.H{"error": "Failed to parse installation id"})
Expand Down

0 comments on commit aa1ab49

Please sign in to comment.