Template URLs for fine-grained PATs and updated permissions UI
@cole-hartman and @dorisbwang joined the GitHub Apps team for the summer with a focus on improving the developer experience around fine-grained PAT creation. They worked with our design and product team to ship two enhancements based on community feedback:
- A new UX for picking permissions that more closely resembles the permission picker for custom roles
- Query parameter support to prefill fine-grained PAT details, allowing you to share PAT templates via URL
In search of permissions
The new permissions picker can be found on the fine-grained PAT creation and edit pages, with a tabbed UI that shows currently picked permissions by resource type (i.e., account, repository, or organization). The search box on the right is used to add or remove permissions and supports search. In the future, we hope to expand this search box to handle API lookup, description lookup, and fuzzy matching with Copilot.
You’ll find that the state management of the page has been improved as well. When switching between resource owners or repository selection, your permissions are now saved so that you don’t need to pick everything all over again.
Paving a PATh to easier token creation
Supporting deep-linking into the PAT creation page was a stretch goal for the summer, and here it is! This was a hidden feature for PAT (Classic) that saw some popular use in apps like JetBrains. Developer feedback told us that the sheer number of permissions to pick from made it hard to know if you’d chosen the right ones. With the new query parameters on the fine-grained PAT creation page, you can now construct a shareable URL that captures the permissions, resources, lifetime, and details for a token.
You can try out these templates based on the most popular tokens we see on github.com:
- Update a repository and open a pull request
- Call the GitHub Models API
- Manage Copilot licenses via API
For details on how to use the query parameters on the PAT creation page, see our PAT documentation. These updates are expected in GHES 3.20.
Join the discussion within GitHub Community.