-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
Description
Describe the change
Lets split out the context types into classes that are tailored to their use. We can add more derrived classes of the ones that exist. Something like the following:
- User context
- PAT based user context
- No authentication app
- Unknown expiry
- Scope: All access that a user has access to, enterprise, organization, user, repos ++
- Classic permissions (cannot be retrieved via API)
- FG-PAT based user context
- No app
- Unknown expiry
- Scoped to a user or an organization (cannot be retrieved via API).
- Fine-grained permissions (cannot be retrieved via API).
- UAT-GHA
- AuthClientId
- Refresh token
- UAT-OAuth
- AuthClientId
- Scopes
- PAT based user context
System
- App
- Holds an app object in a "App" property.
- App-KV
- Key Vault reference
- App-Local
- Local secret
- Installatino (GITHUB_TOKEN)
- ?
- Installation (managed)
- Holds the installation object in a "installation" property.
- Holds the App object in a "App" property.
- UserInstallation
- User (Account) and repo permissions
- Target is always a user
- OrgInstallation
- Org (Account) and repo permissions
- Target is always an org
- EntInstallation
- Enterprise (Account) permissions
- Target is always an enterprise
Should we also restructure contexts abit?
[GitHubContextUser]
ID : github.com/MariusStorhaug
Name : github.com/MariusStorhaug
Token : System.Security.SecureString
Defaults:
HostName : github.com
ApiBaseUri : https://api.github.com
ApiVersion : 2022-11-28
Enterprise :
Owner :
Repository :
HttpVersion : 2.0
PerPage : 100
User:
DisplayName : Marius Storhaug
NodeID : MDQ6VXNlcjE3NzIyMjUz
DatabaseID : 17722253
UserName : MariusStorhaug
[GitHubContextUserPAT]
[GitHubContextUserFGPAT]
[GitHubContextUserGitHubApp]
AuthClientID : Iv1.f26b61bc99e69405
TokenExpiresAt : 20.09.2025 18:49:08
TokenExpiresIn : 06:24:51.8017585
RefreshToken : System.Security.SecureString
RefreshTokenExpiresAt : 20.03.2026 10:49:08
RefreshTokenExpiresIn : 180.22:24:51.7944143
[GitHubContextUserOAuthApp]
AuthClientID : Iv1.f26b61bc99e69405
Scope :
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Todo