% extends 'base.html'
% block header
<h1>Gubernator Admin Config Page</h1>
% endblock
% block content
<form method="post">
<p>These values come from the <a href="https://github.com/settings/developers">OAuth Apps Tab</a> on GitHub.
<p>New apps should be registered with "Homepage URL" set to https://{{hostname}} and "Authorization callback URL" set to https://{{hostname}}/github_auth.
<p>GitHub OAuth Client Id: <input type="text" name="github_id"><br>
GitHub OAuth Client Secret: <input type="text" name="github_secret"><br>
Alternate OAuth Host (optional, for custom domains, like "g8r.k8s.io:443"): <input type="text" name="github_client_host"><br>
<hr>
<p>This value must match whatever is entered on GitHub when registering hooks to receive.
<p>GitHub Webhook Secret: <input type="text" name="github_webhook_secret"><br>
<hr>
<p>This Token is used to periodically synchronize PR status stored in the database with GitHub.
<p>This prevents dropped hooks and other bugs from causing stale PRs to linger in users' dashboards.
<p>GitHub Token: <input type="text" name="github_token"><br>
<input type="submit" value="Submit">
</form>
% if oauth_set
<h2>OAuth secrets set!</h2>
% endif
% if webhook_set
<h2>GitHub Webhook secret set!</h2>
% endif
% if token_set
<h2>GitHub Token set!</h2>
% endif
% endblock
