-
Couldn't load subscription status.
- Fork 5
🩹 [Patch]: Improvements to managing context, cli and Invoke-GitHubAPI
#328
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
## Description This includes new commands: - Get-GitHubVariable.ps1 - Set-GitHubVariable.ps1 - Remove-GitHubVariable.ps1 - Get-GitHubEnvironment.ps1 - Set-GitHubEnvironment.ps1 - Remove-GitHubEnvironment.ps1 ## Type of change <!-- Use the check-boxes [x] on the options that are relevant. --> - [ ] 📖 [Docs] - [ ] 🪲 [Fix] - [ ] 🩹 [Patch] - [ ]⚠️ [Security fix] - [x] 🚀 [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 areas --------- Co-authored-by: Marius Storhaug <marstor@hotmail.com>
… GitHub variable functions
…b variable functions
…ing GitHub variables on repositories and environments
…, repositories, and organizations
…mprove parameter handling
…put and improve parameter handling
…consistently for improved readability
…s for consistency and clarity; add Update-GitHubVariableOnRepository and Update-GitHubVariableOnEnvironment functions for managing GitHub variables.
… function for improved clarity
… for improved clarity
…-GitHubVariableOnOwner function for improved flexibility
…nction to include variable name for precise targeting
…tHubVariable functions for optional return of updated variable object
…dd ErrorAction parameter for improved error handling
…ubAPI for enhanced retry control
…t output and add Get-GitHubContext tests
…zation and update tests to streamline output display
…proved output formatting
…r enhanced test visibility
… invocation with pagination support
…e warning output in Connect-GithubCli.ps1
Invoke-GitHubAPIInvoke-GitHubAPI
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 updates the coverage documentation to reflect new statuses and counts for various API endpoints, aligning reported data with recent improvements. Key changes include:
- Updating the "Covered functions" count from 164 to 181.
- Changing status indicators for several endpoints in the actions variables and organization variables sections.
- Adjusting status marks for endpoints under environments variables.
Files not reviewed (11)
- src/classes/public/Config/GitHubConfig.ps1: Language not supported
- src/formats/GitHubContext.Format.ps1xml: Language not supported
- src/formats/GitHubWebhook.Format.ps1xml: Language not supported
- src/formats/GitHubWebhookRedelivery.Format.ps1xml: Language not supported
- src/functions/private/Auth/Cli/Connect-GithubCli.ps1: Language not supported
- src/functions/private/Auth/Context/Resolve-GitHubContext.ps1: Language not supported
- src/functions/private/Auth/Context/Resolve-GitHubContextSetting.ps1: Language not supported
- src/functions/public/API/Invoke-GitHubAPI.ps1: Language not supported
- src/functions/public/Auth/Connect-GitHubAccount.ps1: Language not supported
- src/variables/private/GitHub.ps1: Language not supported
- tests/TEMPLATE.ps1: Language not supported
Comments suppressed due to low confidence (2)
Coverage.md:12
- Verify that the updated covered functions count (181) correctly reflects the current state of the codebase and documentation.
<td>181</td>
Coverage.md:134
- Confirm that the new status indicators for the '/orgs/{org}/actions/variables' endpoint are consistent with the actual API support and coverage definitions.
| `/orgs/{org}/actions/variables` | | :white_check_mark: | | :white_check_mark: | |
|
Module GitHub - 0.17.2 published to the PowerShell Gallery. |
|
GitHub release for GitHub v0.17.2 has been created. |
Description
This pull request includes several changes to enhance the GitHub PowerShell module, focusing on adding retry logic, improving error handling, and cleaning up the codebase.
Enhancements to retry logic and error handling:
RetryCountandRetryIntervalparameters toInvoke-GitHubAPIfor retrying API calls on failure. (src/functions/public/API/Invoke-GitHubAPI.ps1) (Fb135fafL29R29, src/functions/public/API/Invoke-GitHubAPI.ps1R164-R187)RetryCountandRetryIntervalinGitHubConfigandGitHub.ps1. (src/classes/public/Config/GitHubConfig.ps1,src/variables/private/GitHub.ps1) [1] [2]Improvements to debugging and error messages:
Connect-GithubClito provide more detailed warnings and debug messages. (src/functions/private/Auth/Cli/Connect-GithubCli.ps1)Invoke-GitHubAPIby formatting and displaying parameters and settings. (src/functions/public/API/Invoke-GitHubAPI.ps1)Code cleanup and minor fixes:
src/functions/private/Auth/Context/Resolve-GitHubContextSetting.ps1,src/functions/public/Auth/Connect-GitHubAccount.ps1) [1] [2][AllowNull()]attribute to theContextparameter inResolve-GitHubContext. (src/functions/private/Auth/Context/Resolve-GitHubContext.ps1)XML formatting adjustments:
src/formats/GitHubContext.Format.ps1xml,src/formats/GitHubWebhook.Format.ps1xml,src/formats/GitHubWebhookRedelivery.Format.ps1xml) [1] [2] [3]Test script updates:
BeforeAllblock. (tests/TEMPLATE.ps1) [1] [2]Type of change
Checklist