From bc685280c104f4178e6e6db40a4f22de41d8988f Mon Sep 17 00:00:00 2001 From: Anton Drukh Date: Thu, 15 Feb 2018 10:13:39 +0200 Subject: [PATCH] fix: github graphql endpoint for github-com docker image The default .env template for github set the GraphQL endpoint to $GTIHUB/api, which is correct for GHE, but incorrect for github.com. Overriding the default .env template values in the Dockerfile for both github.com and GHE to fix github.com endpoint, and be explicit about this setting --- dockerfiles/github-com/Dockerfile | 5 ++++- dockerfiles/github-enterprise/Dockerfile | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/dockerfiles/github-com/Dockerfile b/dockerfiles/github-com/Dockerfile index 93517ed57..a45037b56 100644 --- a/dockerfiles/github-com/Dockerfile +++ b/dockerfiles/github-com/Dockerfile @@ -43,9 +43,12 @@ ENV PORT 7341 # GitHub host is github.com ENV GITHUB github.com -# The URL that the github API should be accessed, excluding scheme. +# Github API endpoint, excluding scheme. ENV GITHUB_API api.github.com +# Github GraphQL API endpoint, excluding scheme. +ENV GITHUB_GRAPHQL api.github.com + # The URL of the Snyk broker server ENV BROKER_SERVER_URL https://broker.snyk.io diff --git a/dockerfiles/github-enterprise/Dockerfile b/dockerfiles/github-enterprise/Dockerfile index 04441d31b..1ce0f4860 100644 --- a/dockerfiles/github-enterprise/Dockerfile +++ b/dockerfiles/github-enterprise/Dockerfile @@ -29,9 +29,12 @@ RUN broker init github # The host where your GitHub Enterprise is running, excluding scheme. ENV GITHUB=your.ghe.domain.com -# The URL that the github API should be accessed at. +# Github API endpoint, excluding scheme. ENV GITHUB_API $GITHUB/api/v3 +# Github GraphQL API endpoint, excluding scheme. +ENV GITHUB_GRAPHQL $GITHUB/api + # The port used by the broker client to accept webhooks # Default value is 7341 ENV PORT 7341