Get-GitHubUserContextForUser
SYNOPSIS
Get contextual information for a user
SYNTAX
__AllParameterSets
Get-GitHubUserContextForUser [-Username] <string> [-SubjectType <string>] [-SubjectId <string>]
[-Accept <string>]
ALIASES
This cmdlet has the following aliases,
- Get-GHUserContextForUser
DESCRIPTION
The Get-GitHubUserContextForUser cmdlet invokes the GET method of the /users/{username}/hovercard endpoint (Get contextual information for a user)
Provides hovercard information. You can find out more about someone in relation to their pull requests, issues, repositories, and organizations.
The ‘subject_type’ and ‘subject_id’ parameters provide context for the person’s hovercard, which returns more information than without the parameters. For example, if you wanted to find out more about ‘octocat’ who owns the ‘Spoon-Knife’ repository, you would use a ‘subject_type’ value of ‘repository’ and a ‘subject_id’ value of ‘1300192’ (the ID of the ‘Spoon-Knife’ repository).
OAuth app tokens and personal access tokens (classic) need the ‘repo’ scope to use this endpoint.
Endpoint: GET /users/{username}/hovercard API version: 2026-03-10
EXAMPLES
EXAMPLE 1
Get-GitHubUserContextForUser -Username 'octocat'
Invokes GET /users/{username}/hovercard
PARAMETERS
-Accept
The Accept header (media type) of the request Default value: application/vnd.github+json
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-SubjectId
Uses the ID for the ‘subject_type’ you specified. Required when using ‘subject_type’.
Query parameter [ subject_id ]
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-SubjectType
Identifies which additional information you’d like to receive about the person’s hovercard. Can be ‘organization’, ‘repository’, ‘issue’, ‘pull_request’. Required when using ‘subject_id’.
Query parameter [ subject_type ]
Allowed values: ‘organization’, ‘repository’, ‘issue’, ‘pull_request’
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Username
The handle for the GitHub user account.
Path parameter [ username ]
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 0
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: true
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS
Objects with properties named like the path parameters can be piped to this function
{{ Fill in the Description }}
System.String
{{ Fill in the Description }}
OUTPUTS
The response of the GitHub API (objects
{{ Fill in the Description }}
NOTES
OperationId: users/get-context-for-user Category: users / users Not enabled for GitHub Apps