Skip to content
Permalink

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: main
Choose a base ref
...
head repository: PSModule/GitHub
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: vercellone/RestMethod
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 2 commits
  • 10 files changed
  • 3 contributors

Commits on Feb 4, 2025

  1. 🌟🚀Feature/Invoke-GitHubRestMethod (#294)

    ## Description
    
    ### **Invoke-GitHubRestMethod**
      - Calls `Invoke-RestMethod` instead of `Invoke-WebRequest`
      - `SupportsPaging` (First and Skip, but not IncludeTotal)
    - Added a `$GITHUB_RESPONSES` global variable to store a collection of
    (Content, Date, Headers, StatusCode, and Uri) objects, because attempts
    to set a variable in the parent scope failed. I added an
    `HttpResponsesVariable` property to the config, so someone can opt for a
    different global variable name as a matter of preference or necessity in
    the event of a conflict.
    - Parameters are compatible with Invoke-GitHubAPI except for `Accept`,
    which should be specified via a `Headers`.
    
    #### New .PARAMETERs
    - **Headers** Specifies the headers of the web request. Enter a hash
    table or dictionary.
    - **ExpandProperty** If specified and the property exists in the web
    response, this property will be expanded priot to output.
    - **MaximumRetryCount** Specifies how many times PowerShell retries a
    connection when a failure code between 400 and 599, inclusive or 304 is
    received. Also see RetryIntervalSec parameter for specifying number of
    retries.
    - **QueryParameters** An IDictionary of query string parameters to add
    to the Uri via ConvertTo-QueryString.
    - **RetryIntervalSec** Specifies the interval between retries for the
    connection when a failure code between 400 and 599, inclusive or 304 is
    received. Also see MaximumRetryCount parameter for specifying number of
    retries. The value must be between `1` and `[int]::MaxValue`.
    
    I reworked Get-GitHubUser using Invoke-GitHubRestMethod as a
    demonstration of the impact.
    
    ## Type of change
    
    - [ ] 📖 [Docs]
    - [ ] 🪲 [Fix]
    - [ ] 🩹 [Patch]
    - [ ] ⚠️ [Security fix]
    - [x] 🚀 [Feature]
    - [x] 🌟 [Breaking change]
    
    ## Checklist
    - [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: Vercellone, Jason <Jason.Vercellone@mkcorp.com>
    Co-authored-by: Marius Storhaug <marstor@hotmail.com>
    3 people authored Feb 4, 2025
    Configuration menu
    Copy the full SHA
    4f3f479 View commit details
    Browse the repository at this point in the history

Commits on Feb 6, 2025

  1. 🩹Add Web Prefix to Web function calls (#300)

    ## Description
    
    Invoke-GitHubRestMethod won't work if it is trying to call
    Join-UriAndQueryParameters instead of Join-WebUriAndQueryParameters.
    Although, that function has not been published to PSGallery yet. It only
    exists in https://github.com/PSModule/Web/pull/5 which is evidently on
    hold due to the encoding of spaces in query strings.
    
    ## Type of change
    
    - [ ] 📖 [Docs]
    - [ ] 🪲 [Fix]
    - [x] 🩹 [Patch]
    - [ ] ⚠️ [Security fix]
    - [ ] 🚀 [Feature]
    - [ ] 🌟 [Breaking change]
    
    ## Checklist
    
    - [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: Vercellone, Jason <Jason.Vercellone@mkcorp.com>
    vercellone and Vercellone, Jason authored Feb 6, 2025
    Configuration menu
    Copy the full SHA
    5f21672 View commit details
    Browse the repository at this point in the history
Loading