Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion githubapp/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ def __init__(self, app=None):

@staticmethod
def load_env(app):
app.config["GITHUBAPP_ID"] = int(os.environ["APP_ID"])
# Validate APP_ID is numeric, but store it as a string: github3.py uses
# this value as the JWT `iss` claim, and PyJWT >=2.10 rejects non-string
# issuers ("Issuer (iss) must be a string.").
app.config["GITHUBAPP_ID"] = str(int(os.environ["APP_ID"]))
app.config["GITHUBAPP_SECRET"] = os.environ["WEBHOOK_SECRET"]
if "GHE_HOST" in os.environ:
app.config["GITHUBAPP_URL"] = "https://{}".format(os.environ["GHE_HOST"])
Expand Down
Loading