Skip to content
This repository has been archived by the owner on Nov 28, 2018. It is now read-only.

Potential Reviewers always blank when using Github Enterprise #227

Open
SxMShaDoW opened this issue Jun 23, 2017 · 4 comments
Open

Potential Reviewers always blank when using Github Enterprise #227

SxMShaDoW opened this issue Jun 23, 2017 · 4 comments

Comments

@SxMShaDoW
Copy link

SxMShaDoW commented Jun 23, 2017

Summary:

I am currently trying to use mention-bot with github enterprise and it seems to never return potential reviewers.

Github Enterprise: 2.8
Mention bot: 3.0.2

.mention-bot

(using default config) https://github.com/facebook/mention-bot/blob/master/server.js#L126-L147

package.json

{
  "name": "mention-bot",
  "version": "3.0.2",
  "license": "BSD-3-Clause",
  "repository": "facebook/mention-bot",
  "scripts": {
    "test": "flow && jest",
    "start": "node run-server.js"
  },
  "main": "./run-mention-bot.js",
  "engines": {
    "node": ">=4"
  },
  "jest": {
    "same as master"
  },
  "config": {
  "gheHost": "github.enterprise-url.com",
  "ghePathPrefix": "/api/v3"
 },
  "dependencies": {
    "same as master"
  }
} 

Steps to Reproduce:

  • git clone https://github.intuit.com/facebook/mention-bot.git and modify files above
  • docker build -t mention-bot .
  • docker run -e GITHUB_TOKEN="some_token" --network=host -p 5000:5000 -d mention-bot
Output (which is okay):
There was no GitHub user detected. This is fine, but mention-bot won't work with private repos.
To make mention-bot work with private repos, please expose GITHUB_USER and GITHUB_PASSWORD as environment variables. The username and password must have access to the private repo you want to use.
Listening on Port 5000
Output when webhook is sent

(Verified connectivity from enterprise to mention-bot ):

Reviewers: []
Skipping because there are no reviewers found.
Verified connectivity from mention-bot to enterprise

(changed the default config to use alwaysNotifyForPaths and then it comments on the PR.)

Any recommendations would be great.

@SxMShaDoW SxMShaDoW changed the title Potential Reviewers blank when using Github Enterprise Potential Reviewers always blank when using Github Enterprise Jun 23, 2017
@cdrage
Copy link

cdrage commented Jul 11, 2017

@SxMShaDoW Were you able to solve this? I am experiencing a similar issue.

@SxMShaDoW
Copy link
Author

@cdrage - we forked and are troubleshooting it. We also cleaned up a lot of the code to make it more usable. We will submit a PR in the future once we determine the necessary changes (if they are needed) will try to have an update for you in the next few days.

@vjeux
Copy link
Contributor

vjeux commented Jul 12, 2017

Awesome, that would be more than welcome!

@SxMShaDoW
Copy link
Author

SxMShaDoW commented Jul 13, 2017

Current implementation of Mention bot's Git Blame tries to display a github page and pull the information directly from it. This works on normal github because you don't need to auth in order to view the screen. Unfortunately this doesn't work on Enterprise if you require auth to view pages.

If you are using GHE 2.10, it may be possible to use the GraphQL api, but since we aren't on that yet, we aren't going that route (probably another few months before we upgrade).

We are looking into creative ways of getting the blame information from using github api (probably a mix of pull requests, history, commits, and users). Also open to other suggestions.

We may submit a PR without this functionality that has a few more toggles added and cleaned up code before then. Will let you know in the near future.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants