Skip to content

Add support for automatic creation and refresh of Github App Installation tokens - #533

Open
durist wants to merge 4 commits into
josegonzalez:masterfrom
durist:as-app-dynamic-token
Open

durist wants to merge 4 commits into
josegonzalez:masterfrom
durist:as-app-dynamic-token

Conversation

@durist

@durist durist commented Sep 23, 2026 •

Copy link
Copy Markdown

This PR adds support for automatically creating and refreshing Github App Installation tokens. It works by creating a separate thread for token refresh. It uses the requests, jwt and pause modules. This is useful since Github App Installation tokens have higher rate limits, but expire in an hour.

@Iamrodos

Copy link
Copy Markdown
Contributor

This introduces external libraries (jwt, requests, pause), which the project has avoided so far. requirements.txt is empty, and setup.py builds install_requires from it. Since they aren't added there, they won't be installed, and because they're imported at module level, every install that upgrades to this would fail on startup, even for users not using --as-app-dynamic-token.

I have other comments, but this is the first hurdle. It's up to @josegonzalez whether starting to take on external package requirements is OK.

@josegonzalez

Copy link
Copy Markdown
Owner

I don't want to add external dependencies - part of the charm of the codebase was that we did everything with the python stdlib.

Not sure I care as much these days, but let me mull it over for a few days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants