API Reference
Class
GitHubDashboardService
Native GitHub dashboard service for shared observability scenarios.
Inheritance
- Object
- GitHubDashboardService
Constructors
public GitHubDashboardService(String token, String apiBaseUrl = null) #Initializes a dashboard service with a GitHub token.
Parameters
- token System.String
- apiBaseUrl System.String = null
Methods
public static GitHubProfileInfo CreateProfileInfo(JsonElement user, String fallbackLogin = null) #Returns:
GitHubProfileInfoCreates profile details from a GitHub REST user payload.
Parameters
- user System.Text.Json.JsonElement
- fallbackLogin System.String = null
public async Task<GitHubDashboardData> FetchAsync(String login = null, CancellationToken cancellationToken = null) #Returns:
Task<GitHubDashboardData>Creates a dashboard snapshot for the authenticated user or an explicitly supplied login.
Parameters
- login System.String = null
- Optional user login override. When omitted, the authenticated user is used.
- cancellationToken System.Threading.CancellationToken = null
- Optional cancellation token.
Returns
GitHub dashboard data.
public async Task<GitHubRepoInfo> FetchRepositoryAsync(String repositoryNameWithOwner, CancellationToken cancellationToken = null) #Returns:
Task<GitHubRepoInfo>Fetches a single public repository by owner/name.
Parameters
- repositoryNameWithOwner System.String
- cancellationToken System.Threading.CancellationToken = null
public async Task<IReadOnlyList<GitHubRepositoryStargazerInfo>> FetchStargazersAsync(String repositoryNameWithOwner, Int32 limit = 200, CancellationToken cancellationToken = null) #Returns:
Task<IReadOnlyList<GitHubRepositoryStargazerInfo>>Fetches recent stargazers for a repository using the public REST API.
Parameters
- repositoryNameWithOwner System.String
- limit System.Int32 = 200
- cancellationToken System.Threading.CancellationToken = null
public async Task<IReadOnlyList<GitHubRepositoryForkInfo>> FetchUsefulForksAsync(String repositoryNameWithOwner, Int32 limit = 20, CancellationToken cancellationToken = null) #Returns:
Task<IReadOnlyList<GitHubRepositoryForkInfo>>Fetches and ranks potentially useful forks for a repository.
Parameters
- repositoryNameWithOwner System.String
- limit System.Int32 = 20
- cancellationToken System.Threading.CancellationToken = null
public async Task<String> GetAuthenticatedLoginAsync(CancellationToken cancellationToken = null) #Returns:
Task<String>Resolves the authenticated GitHub login from the API.
Parameters
- cancellationToken System.Threading.CancellationToken = null
public static async Task<String> ResolveTokenAsync(CancellationToken cancellationToken = null) #Returns:
Task<String>Returns a GitHub token from common environment variables or the local GitHub CLI login when available.
Parameters
- cancellationToken System.Threading.CancellationToken = null
public static String ResolveTokenFromEnvironment() #Returns:
StringReturns a GitHub token from common environment variables when available.
Inherited Methods
public override Boolean Equals(Object obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object