feedback icon indicating copy to clipboard operation
feedback copied to clipboard

Bug/Documentation Issue in Self-Hosted Setup + github.com

Open serjx86 opened this issue 2 years ago • 0 comments

Describe the bug Admins not detected for self-hosted setup with github

Environment (please complete the following information):

  • Browser: Chrome
  • System: local + github.com (not GitHub Enterprise!)

To Reproduce Steps to reproduce the behavior:

  1. Follow steps for self-hosted setup with docker compose and GitHub App
  2. Set
setup:
  admins:
    - service: github
      username: "serjx86"
  1. docker compose up
  2. Observe POST http://localhost:8080/graphql/gh
{
  "query": "\n  query HasAdmins {\n    config {\n      hasAdmins\n    }\n  }\n  ",
  "variables": {}
}

Expected behavior Detect admins correctly.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context

GitHub app setup seems to be correct, since I get redirected to GitHub OAuth login and the callback is called correctly. hasAdmins being False in the request above seems to be fouling everything up.

I looked at the source, and it seems the RUN_ENV has to be set to ENTERPRISE for this to work correctly. Alas, setting

  api:
    image: codecov/self-hosted-api:latest-stable
    environment:
      - RUN_ENV=ENTERPRISE

had no effect.

serjx86 avatar Oct 27 '23 03:10 serjx86