-
Notifications
You must be signed in to change notification settings - Fork 4
Permalink
Choose a base ref
{{ refName }}
default
Choose a head ref
{{ refName }}
default
Comparing changes
Choose two branches to see what’s changed or to start a new pull request.
If you need to, you can also or
learn more about diff comparisons.
Open a pull request
Create a new pull request by comparing changes across two branches. If you need to, you can also .
Learn more about diff comparisons here.
base repository: PSModule/GitHub
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.36.8
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
...
head repository: PSModule/GitHub
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
- 4 commits
- 17 files changed
- 3 contributors
Commits on Sep 7, 2025
-
🪲[Fix]: Piping
GitHubSecret
andGitHubVariable
objects to `Remove……-GitHubSecret` and `Remove-GitHubVariable` (#499) This pull request improves the handling and testing of secret and variable removal in the GitHub module. The main focus is on making the removal functions (`Remove-GitHubSecret`, `Remove-GitHubVariable`) more robust and scope-aware, and on expanding the test coverage to ensure correct behavior across different usage patterns and scopes. - Fixes #388 Key changes include: ### Functional improvements to removal logic * Updated `Remove-GitHubSecret.ps1` and `Remove-GitHubVariable.ps1` to dispatch removal actions based on the `Scope` property of each item, ensuring the correct removal function is called for environment, repository, or organization scopes, and providing clear error handling for unsupported scopes. ### Documentation and class property clarifications * Improved property descriptions in `GitHubSecret.ps1` and `GitHubVariable.ps1` to clarify that properties refer to where the secret or variable is stored, enhancing code readability and maintainability. ### Expanded and improved test coverage * Refactored and expanded tests in `Secrets.Tests.ps1` and `Variables.Tests.ps1` to: - Add separate tests for pipeline-based removal using both direct pipeline and variable assignment approaches. - Ensure secrets and variables are created and removed correctly in all supported scopes. - Add logging and verification steps to improve test clarity and debugging. These changes make the module's behavior more predictable and easier to test, especially when handling secrets and variables in different scopes and using pipeline operations. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com> Co-authored-by: Marius Storhaug <marstor@hotmail.com>
Configuration menu - View commit details
-
Copy full SHA for 9e7a331 - Browse repository at this point
Copy the full SHA 9e7a331View commit details
Commits on Sep 9, 2025
-
🩹 [Patch]: Add Fine-Grained Permissions Data for GitHub PowerShell Mo…
…dule (#501) This PR implements a comprehensive fine-grained permissions data infrastructure for the GitHub PowerShell module, enabling detection of GitHub App installations that may be missing newly added permissions. - Fixes #485 ## What's New ### GitHubPermission Class Added a new public `GitHubPermission` class with the following properties: - **Name** - Programmatic permission name (e.g., `contents`, `issues`) - **DisplayName** - Human-friendly name (e.g., "Contents", "Issues") - **Description** - Brief description of what access the permission grants - **URL** - Link to relevant GitHub documentation - **Options** - Available access levels (`read`, `write`, `admin`) - **Type** - Permission type (`Fine-grained`, `Classic`) - **Scope** - Application scope (`Repository`, `Organization`, `User`, `Enterprise`) ### Comprehensive Permissions Database Added 90 fine-grained permissions covering all major GitHub permission categories: - **33 Repository permissions** - actions, contents, issues, pull_requests, secrets, etc. - **33 Organization permissions** - members, administration, organization_secrets, etc. - **18 User permissions** - profile, followers, git_ssh_keys, etc. - **6 Enterprise permissions** - custom properties, organization installation, etc. ### Get-GitHubPermissionDefinition Function New public function to query the permissions database with advanced filtering: ```powershell # Get all permissions Get-GitHubPermissionDefinition # Filter by scope Get-GitHubPermissionDefinition -Scope Repository # Combined filtering Get-GitHubPermissionDefinition -Type Fine-grained -Scope Organization # Find specific permissions Get-GitHubPermissionDefinition -Name 'contents' ``` ### Argument Completers Added argument completers for `Get-GitHubPermissionDefinition` parameters to improve user experience: - **Name** - Tab completion for available permission names (actions, contents, issues, etc.) - **DisplayName** - Tab completion for available permission display names (Actions, Dependabot alerts, etc.) - **Type** - Tab completion for available permission types (Fine-grained) - **Scope** - Tab completion for available scopes (Repository, Organization, User, Enterprise) ## Use Cases This infrastructure enables several key scenarios: 1. **Permission Validation** - Compare GitHub App installations against the complete permissions list 2. **Installation Health Checks** - Detect apps missing newly added permissions 3. **Documentation** - Provide users with comprehensive permission reference 4. **Automation** - Build tools that ensure installations stay current with permission requirements 5. **Enhanced User Experience** - Tab completion for parameter values improves usability ## Implementation Details - **File path permissions excluded** - These are handled differently by the GitHub API (appear under `FilePaths` property rather than as named permissions) - **Maintainable structure** - Easy to update when GitHub adds new permissions - **Performance optimized** - Efficient filtering and lookup operations - **Comprehensive testing** - Full test coverage for all functionality - **Argument completion** - Improves user experience with tab completion support ## Example Usage ```powershell # Check what repository permissions are available (with tab completion) $repoPerms = Get-GitHubPermissionDefinition -Scope <TAB> Write-Host "Repository permissions: $($repoPerms.Count)" # Get details about the contents permission (with tab completion) $contents = Get-GitHubPermissionDefinition -Name cont<TAB> Write-Host "$($contents.DisplayName): $($contents.Description)" Write-Host "Available options: $($contents.Options -join ', ')" ``` This provides the foundation for building automated permission management tools and ensuring GitHub App installations remain up-to-date with the latest permission requirements. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com> Co-authored-by: Marius Storhaug <marstor@hotmail.com>
Configuration menu - View commit details
-
Copy full SHA for fff966d - Browse repository at this point
Copy the full SHA fff966dView commit details -
🩹 [Patch]: Add OwnerUrl and RepositoryUrl properties to GitHubEnviron…
…ment class and enable hyperlinks in format display (#502) ## 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 ```powershell $environment = Get-GitHubEnvironment -Owner 'octocat' -Repository 'Hello-World' -Name 'production' # New properties provide direct access to related URLs Write-Host "Owner URL: $($environment.OwnerUrl)" # https://github.com/octocat Write-Host "Repository URL: $($environment.RepositoryUrl)" # https://github.com/octocat/Hello-World Write-Host "Environment URL: $($environment.Url)" # https://github.com/octocat/Hello-World/settings/environments/123/edit ``` 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 - **Consistency**: Follows the same URL pattern and documentation format established by other classes like `GitHubRepository` and `GitHubOwner` - **Enhanced UX**: Owner and Repository names are now clickable links in terminal environments that support hyperlinks - **Convenience**: Users no longer need to manually construct organization or repository URLs - **Enterprise Support**: Works seamlessly with custom GitHub Enterprise hostnames - **Non-breaking**: Purely additive changes that don't affect existing functionality Fixes #455. <!-- START COPILOT CODING AGENT TIPS --> --- 💡 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](https://gh.io/copilot-coding-agent-tips) in the docs. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 4d83c75 - Browse repository at this point
Copy the full SHA 4d83c75View commit details
Commits on Sep 10, 2025
-
🩹 [Patch]: Sort the return for
Get-GitHubContext
(#505)## Description This pull request focuses on improving the usability and consistency of the GitHub context management PowerShell module. The main changes include renaming parameter sets and internal logic for clarity, ensuring output is sorted for better user experience, and updating the context completer for more accurate and user-friendly suggestions. - Fixes #503 **Parameter set and logic improvements:** * Renamed parameter sets in `Get-GitHubContext.ps1` for clarity (e.g., `'NamedContext'` to `'Get a named context'`, `'ListAvailableContexts'` to `'List all available contexts'`) and updated corresponding internal logic and debug messages for consistency. **Output and completion enhancements:** * Sorted the output of contexts by name in `Get-GitHubContext.ps1` to provide a more organized and predictable result. * Moved `completers.ps1` from the private to public directory, and updated the context completer to suppress debug output, sort and deduplicate context names, and improve the accuracy of completion suggestions. ## Type of change <!-- Use the check-boxes [x] on the options that are relevant. --> - [ ] 📖 [Docs] - [ ] 🪲 [Fix] - [x] 🩹 [Patch] - [ ]
⚠️ [Security fix] - [ ] 🚀 [Feature] - [ ] 🌟 [Breaking change] ## Checklist <!-- Use the check-boxes [x] on the options that are relevant. --> - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areasConfiguration menu - View commit details
-
Copy full SHA for 8ef51f0 - Browse repository at this point
Copy the full SHA 8ef51f0View commit details
Loading
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v0.36.8...main