-
-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
approveman does not support deviating appname #64
Comments
@epDHowwD Ah that's a problem. I wasn't thinking too much about the enterprise initially. Can you post a sample how the naming scheme work in enterprise so that I can fix that in the code. |
So far I think there are 2 possible solutions:
Also, I do thing they can co-exist. |
Yea I think both mechanisms should exist since GitHub enterprise is not listed in marketplace subscription, there is really not way for the app to know what the name is from GitHub. Please let me know if you have other good ideas @epDHowwD |
This PR adds the feature to override the default app actor name with an environment variable APP_ACTOR_NAME_OVERRIDE which used to be hardcoded to "approveman[bot]". This is useful for GitHub Enterprise users whose app content name is different from the GitHub marketplace. Before the change, GitHub Enterprise users will have trouble dismissing outdated approvals since the name it searches for is "approveman[bot]" (for details on this problem, see #64 ). This PR also adds a check so that if a GitHub Enterprise user (inferred from GHE_HOST) deploys the app without setting APP_ACTOR_NAME_OVERRIDE will post a failing status upon any event processed. This is not ideal because we want to fail the moment the app starts running instead of when an event is received. However, Probot currently doesn't support this kind of health check as far as I know. I have opened an issue for Probot to add this capability into their infra (for details and progress, see probot/probot#1340 ).
You may try to use the authenticated app endpoint. It returns the configured name, id, avatar, and even the html_url and external_url, which might be interesting for status posts. As we are building the app from source, a central modifiable variable would already do the trick. Also ENV during build-time or runtime would work. As you asked for examples for our naming schemes, we prefix the apps usually with an organization name separated with |
|
I built and installed this app on a GitHub enterprise server and prefixed the app name with our project name (as gh enterprise does not scope apps). So then the name of the app (and hence the reviewing "user") was not
approveman[bot]
as hard coded in the code. Thus, the app was not able to dismiss its own review.The text was updated successfully, but these errors were encountered: