-
Notifications
You must be signed in to change notification settings - Fork 4
🩹 [Patch]: Add OwnerUrl and RepositoryUrl properties to GitHubEnvironment class and enable hyperlinks in format display #502
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com>
@copilot Update the format to include the URL for environment and repo if its supported. |
Co-authored-by: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com>
Updated the format to include URL examples for all URL properties (OwnerUrl, RepositoryUrl, and Url) following the same pattern used in other classes like GitHubOwner and GitHubRepository. The examples now show the expected URL format for each property. (b27e5e5) |
@copilot Update the GitHubEnvironment.Format.xmlps1 file to add URLs to Owner and Repository names, only if the host supports it. |
…ormat Co-authored-by: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com>
Updated the GitHubEnvironment.Format.ps1xml file to add hyperlinks to Owner and Repository columns when the host supports virtual terminal (following the same pattern used in other format files). The Owner and Repository names will now be clickable links that navigate to their respective GitHub pages. (a42956a) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enhances the GitHubEnvironment class by adding OwnerUrl
and RepositoryUrl
properties and enabling hyperlinks in table format display. The changes provide convenient access to related GitHub URLs and improve the user experience by making owner and repository names clickable in supported terminals.
- Added
OwnerUrl
andRepositoryUrl
properties to GitHubEnvironment class with automatic population in constructor - Updated URL property documentation with consistent examples
- Enhanced table format display to show hyperlinks for Owner and Repository columns when terminal supports it
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
File | Description |
---|---|
src/classes/public/Environment/GitHubEnvironment.ps1 | Added new URL properties and updated documentation with examples |
src/formats/GitHubEnvironment.Format.ps1xml | Enhanced table display with hyperlinks for Owner and Repository columns |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Module GitHub - 0.36.11 published to the PowerShell Gallery. |
GitHub release for GitHub v0.36.11 has been created. |
Changes Made
Added two new properties to the
GitHubEnvironment
class:OwnerUrl
- URL to the owner/organization profile (e.g.,https://github.com/octocat
)RepositoryUrl
- URL to the repository (e.g.,https://github.com/octocat/Hello-World
)These properties are automatically populated in the constructor using the existing
Context.HostName
pattern, ensuring compatibility with both GitHub.com and GitHub Enterprise instances.Updated the URL property comments to include examples following the same format used in other classes:
OwnerUrl
- Example:https://github.com/octocat
RepositoryUrl
- Example:https://github.com/octocat/Hello-World
Url
- Example:https://github.com/octocat/Hello-World/settings/environments/123/edit
Updated the
GitHubEnvironment.Format.ps1xml
file to add hyperlinks to Owner and Repository columns when the host supports virtual terminal (and not running in GitHub Actions), following the same pattern used in other format files.Example Usage
Now when displaying GitHubEnvironment objects in a table format, the Owner and Repository names will be clickable hyperlinks (when terminal supports it) that navigate to their respective GitHub pages.
Benefits
GitHubRepository
andGitHubOwner
Fixes #455.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.