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-Script
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.6.3
Choose a base ref
...
head repository: PSModule/GitHub-Script
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
  • 6 commits
  • 8 files changed
  • 3 contributors

Commits on Jun 27, 2025

  1. 🪲 [Fix]: Ensure Prerelease input defaults to false in tests (#58)

    ## Description
    
    This pull request includes a small change to the
    `.github/workflows/Action-Test.yml` file. The change ensures that the
    `Prerelease` input defaults to `false` if not explicitly provided.
    
    ## Type of change
    
    <!-- Use the check-boxes [x] on the options that are relevant. -->
    
    - [ ] 📖 [Docs]
    - [x] 🪲 [Fix]
    - [ ] 🩹 [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 areas
    MariusStorhaug authored Jun 27, 2025
    Configuration menu
    Copy the full SHA
    5de71fb View commit details
    Browse the repository at this point in the history
  2. 🩹 [Patch]: Add output for GitHubRepos from PSModule (#59)

    ## Description
    
    This pull request updates GitHub Actions workflows to improve
    functionality and maintainability. The changes include removing a
    redundant comment from the `Action-Test` workflow and modifying the
    `TestWorkflow` to specify the repository owner explicitly in multiple
    job configurations.
    
    Updates to GitHub Actions workflows:
    
    *
    [`.github/workflows/Action-Test.yml`](diffhunk://#diff-a12ae5c885b0673c0ff6f70c2670886907590d624626e07da4c52e01aeaf56a4L1):
    Removed a redundant comment related to skipping a Checkov rule for tag
    references.
    *
    [`.github/workflows/TestWorkflow.yml`](diffhunk://#diff-242a265d6d6bfff6094c9285345022d0e6d7ddde58504dfc80249fafbd89ba2cL415-R415):
    Updated the `Get-GitHubRepository` command in three job configurations
    (`ActionTestWithUSERFGPAT`, `ActionTestWithORGFGPAT`, and
    `ActionTestWithGitHubAppEnt`) to include the `-Owner PSModule` parameter
    for specifying the repository owner explicitly.
    [[1]](diffhunk://#diff-242a265d6d6bfff6094c9285345022d0e6d7ddde58504dfc80249fafbd89ba2cL415-R415)
    [[2]](diffhunk://#diff-242a265d6d6bfff6094c9285345022d0e6d7ddde58504dfc80249fafbd89ba2cL441-R441)
    [[3]](diffhunk://#diff-242a265d6d6bfff6094c9285345022d0e6d7ddde58504dfc80249fafbd89ba2cL467-R467)
    
    ## Type of change
    
    <!-- Use the check-boxes [x] on the options that are relevant. -->
    
    - [ ] 📖 [Docs]
    - [x] 🪲 [Fix]
    - [ ] 🩹 [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 areas
    MariusStorhaug authored Jun 27, 2025
    Configuration menu
    Copy the full SHA
    19dcf65 View commit details
    Browse the repository at this point in the history

Commits on Jul 1, 2025

  1. 🩹 [Patch]: Update test to connect a GitHub App using `Connect-GitHubA…

    …pp` (#60)
    
    ## Description
    
    This pull request updates the `.github/workflows/TestWorkflow.yml` file
    to improve the organization and output formatting of GitHub-related logs
    in the workflow scripts. The most important changes include switching
    from `Format-Table` to `Format-List` for better readability,
    restructuring log groups for clarity, and replacing specific
    installation token-based connections with a streamlined
    `Connect-GitHubApp` command.
    
    ### Improvements to output formatting:
    * Changed the output formatting from `Format-Table` to `Format-List` for
    `Get-GitHubApp` and `Get-GitHubConfig` commands to enhance readability.
    [[1]](diffhunk://#diff-242a265d6d6bfff6094c9285345022d0e6d7ddde58504dfc80249fafbd89ba2cL491-R507)
    [[2]](diffhunk://#diff-242a265d6d6bfff6094c9285345022d0e6d7ddde58504dfc80249fafbd89ba2cL522-R542)
    
    ### Workflow restructuring:
    * Replaced the token-based connection logic
    (`New-GitHubAppInstallationAccessToken` and `Connect-GitHub`) with a
    simplified `Connect-GitHubApp` command to connect to all installations
    of the app.
    [[1]](diffhunk://#diff-242a265d6d6bfff6094c9285345022d0e6d7ddde58504dfc80249fafbd89ba2cL491-R507)
    [[2]](diffhunk://#diff-242a265d6d6bfff6094c9285345022d0e6d7ddde58504dfc80249fafbd89ba2cL522-R542)
    * Added new log groups for `Contexts` (`Get-GitHubContext
    -ListAvailable`) and `GitHubConfig` (`Get-GitHubConfig`) to improve
    clarity and organization of workflow logs.
    [[1]](diffhunk://#diff-242a265d6d6bfff6094c9285345022d0e6d7ddde58504dfc80249fafbd89ba2cL491-R507)
    [[2]](diffhunk://#diff-242a265d6d6bfff6094c9285345022d0e6d7ddde58504dfc80249fafbd89ba2cL522-R542)
    
    ## 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 areas
    MariusStorhaug authored Jul 1, 2025
    Configuration menu
    Copy the full SHA
    8afae86 View commit details
    Browse the repository at this point in the history
  2. 🪲 [Fix]: Fix debug and verbose inputs (#61)

    This pull request introduces updates to improve debug and verbose output
    handling across the GitHub PowerShell-based action. The changes ensure
    consistent configuration of debug and verbose preferences and enhance
    clarity in documentation and workflow files.
    
    ### Debug and Verbose Output Handling Updates:
    *
    [`.github/workflows/TestWorkflow.yml`](diffhunk://#diff-242a265d6d6bfff6094c9285345022d0e6d7ddde58504dfc80249fafbd89ba2cL412-R412):
    Added the `-Debug` parameter to the `Get-GitHubUser` command to enable
    debug output during the workflow execution.
    *
    [`action.yml`](diffhunk://#diff-1243c5424efaaa19bd8e813c5e6f6da46316e63761421b3e5f5c8ced9a36e6b6L27-R31):
    Updated the descriptions for `Debug` and `Verbose` inputs to clarify
    that they enable debug and verbose output for the entire action.
    Additionally, configured `$DebugPreference` and `$VerbosePreference`
    based on input values to set PowerShell preferences dynamically.
    [[1]](diffhunk://#diff-1243c5424efaaa19bd8e813c5e6f6da46316e63761421b3e5f5c8ced9a36e6b6L27-R31)
    [[2]](diffhunk://#diff-1243c5424efaaa19bd8e813c5e6f6da46316e63761421b3e5f5c8ced9a36e6b6R95-R96)
    *
    [`scripts/info.ps1`](diffhunk://#diff-82c586f67d16e32953b47a962c269d0a484f8aa660d71ad354e91fd2d4334cd9L63-L64):
    Removed redundant `$DebugPreference` and `$VerbosePreference`
    configuration from the `end` block, as these preferences are now set
    globally in the action runner.
    *
    [`scripts/outputs.ps1`](diffhunk://#diff-ee715ca93229232e95883bf00629fd14e3bf174cdc17b723c4cc5d70e6a60a58L6-L7):
    Removed hardcoded `$DebugPreference` and `$VerbosePreference` settings
    to align with the new dynamic configuration approach.
    
    ### Documentation Updates:
    *
    [`README.md`](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L18-R19):
    Improved descriptions for `Debug` and `Verbose` inputs to specify that
    they enable output for the entire action, enhancing clarity for users.
    MariusStorhaug authored Jul 1, 2025
    Configuration menu
    Copy the full SHA
    cc12067 View commit details
    Browse the repository at this point in the history

Commits on Jul 18, 2025

  1. 🚀 Add KeyVaultKeyReference parameter for GitHub App authentication (#63)

    This PR adds support for authenticating GitHub Apps using Azure KeyVault
    key references, enabling secure private key storage in Azure KeyVault
    instead of GitHub secrets.
    
    ## Changes Made
    
    ### 🔧 Core Implementation
    - **action.yml**: Added new `KeyVaultKeyReference` input parameter with
    proper description and environment variable mapping
    - **scripts/init.ps1**: 
    - Added validation logic ensuring mutual exclusion between `PrivateKey`
    and `KeyVaultKeyReference`
    - Added requirement validation that `ClientID` must be provided with
    exactly one key parameter
    - Implemented new authentication path: `Connect-GitHub -ClientID
    <ClientID> -KeyVaultKeyReference <url>`
    - Updated module status reporting to include KeyVault key reference
    status
    
    ### 📚 Documentation
    - **README.md**: 
      - Added `KeyVaultKeyReference` to inputs documentation table
    - Added comprehensive Example 5 demonstrating Azure KeyVault
    authentication workflow
      - Updated example numbering consistently
    - Included note about required `azure/login` action for KeyVault
    authentication
    
    ## Usage Example
    
    ```yaml
    jobs:
      Run-Script:
        runs-on: ubuntu-latest
        steps:
          - name: Login to Azure
            uses: azure/login@v1
            with:
              creds: ${{ secrets.AZURE_CREDENTIALS }}
    
          - name: Run script
            uses: PSModule/GitHub-Script@v1
            with:
              ClientID: ${{ secrets.CLIENT_ID }}
              KeyVaultKeyReference: ${{ secrets.KEYVAULT_KEY_REFERENCE }}
              Script: |
                LogGroup "Get-GitHubApp" {
                  Get-GitHubApp
                }
    ```
    
    ## Validation
    
    The implementation includes comprehensive validation:
    - ✅ Mutual exclusion: Only one of `PrivateKey` or `KeyVaultKeyReference`
    can be provided
    - ✅ Requirement validation: `ClientID` must be provided with exactly one
    key parameter
    - ✅ Error handling for invalid input combinations
    - ✅ PowerShell and YAML syntax validation
    - ✅ Integration testing with 6/6 test scenarios passing
    
    ## Authentication Flow
    
    The action now supports three authentication methods:
    1. **Token**: `Token` parameter (existing)
    2. **GitHub App with Private Key**: `ClientID` + `PrivateKey` (existing)
    3. **GitHub App with KeyVault**: `ClientID` + `KeyVaultKeyReference`
    (new)
    
    Fixes #62.
    
    <!-- START COPILOT CODING AGENT TIPS -->
    ---
    
    💬 Share your feedback on Copilot coding agent for the chance to win a
    $200 gift card! Click
    [here](https://survey.alchemer.com/s3/8343779/Copilot-Coding-agent) to
    start the survey.
    
    ---------
    
    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>
    3 people authored Jul 18, 2025
    Configuration menu
    Copy the full SHA
    d7819cb View commit details
    Browse the repository at this point in the history

Commits on Jul 22, 2025

  1. 🩹 [Patch]: Add logging for GitHub event data in info script (#64)

    ## Description
    
    This pull request adds a new logging group to the `scripts/info.ps1`
    file for better visibility into event-related information.
    
    ### Logging Improvements:
    *
    [`scripts/info.ps1`](diffhunk://#diff-82c586f67d16e32953b47a962c269d0a484f8aa660d71ad354e91fd2d4334cd9R54-R57):
    Added a new log group labeled 'Event Information' that retrieves and
    formats GitHub event data using `Get-GitHubEventData`.
    
    ## 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 areas
    MariusStorhaug authored Jul 22, 2025
    Configuration menu
    Copy the full SHA
    53dd5b9 View commit details
    Browse the repository at this point in the history
Loading