Although it's been two years since the question was asked and answered by @bk2204, GitHub has since introduced a solution.
In October 2022, GitHub introduced a feature called "fine-grained personal access tokens".
https://github.blog/2022-10-18-introducing-fine-grained-personal-access-tokens-for-github
Personal access tokens (classic) are given permissions from a broad set of read and write scopes. They have access to all of the repositories and organizations that the user could access, and are allowed to live forever. As an example, the repo scope provides broad access to all data in private repositories the user has access to, in perpetuity.
Fine-grained personal access tokens, by contrast, are given permissions from a set of over 50 granular permissions that control access to GitHub’s organization, user, and repository APIs. Each permission can be granted on a ‘no access’, ‘read’ or ‘read and write’ basis. As an example, you can now create a PAT that can only read issues and do nothing else – not even read the contents of a repository.
See @petezurich comment for usage instructions.