Releases: PSModule/GitHub-Script
v1.6.6
🩹 [Patch]: Update test to connect a GitHub App using Connect-GitHubApp (#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-TabletoFormat-ListforGet-GitHubAppandGet-GitHubConfigcommands to enhance readability. [1] [2]
Workflow restructuring:
- Replaced the token-based connection logic (
New-GitHubAppInstallationAccessTokenandConnect-GitHub) with a simplifiedConnect-GitHubAppcommand to connect to all installations of the app. [1] [2] - Added new log groups for
Contexts(Get-GitHubContext -ListAvailable) andGitHubConfig(Get-GitHubConfig) to improve clarity and organization of workflow logs. [1] [2]
Type of change
- 📖 [Docs]
- 🪲 [Fix]
- 🩹 [Patch]
-
⚠️ [Security fix] - 🚀 [Feature]
- 🌟 [Breaking change]
Checklist
- I have performed a self-review of my own code
- I have commented my code, particularly in hard-to-understand areas
v1.6.5
🩹 [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: Removed a redundant comment related to skipping a Checkov rule for tag references..github/workflows/TestWorkflow.yml: Updated theGet-GitHubRepositorycommand in three job configurations (ActionTestWithUSERFGPAT,ActionTestWithORGFGPAT, andActionTestWithGitHubAppEnt) to include the-Owner PSModuleparameter for specifying the repository owner explicitly. [1] [2] [3]
Type of change
- 📖 [Docs]
- 🪲 [Fix]
- 🩹 [Patch]
-
⚠️ [Security fix] - 🚀 [Feature]
- 🌟 [Breaking change]
Checklist
- I have performed a self-review of my own code
- I have commented my code, particularly in hard-to-understand areas
v1.6.4
🪲 [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
- 📖 [Docs]
- 🪲 [Fix]
- 🩹 [Patch]
-
⚠️ [Security fix] - 🚀 [Feature]
- 🌟 [Breaking change]
Checklist
- I have performed a self-review of my own code
- I have commented my code, particularly in hard-to-understand areas
v1.6.3
🩹 [Patch]: Add Prerelease input option to Action-Test workflow (#57)
Description
This pull request updates the GitHub Actions workflow configuration for testing. The main changes include removing the Action-Test-Prerelease.yml file and integrating its functionality into the Action-Test.yml file by introducing a new Prerelease input parameter.
Workflow configuration updates:
.github/workflows/Action-Test-Prerelease.yml: Removed the file entirely, consolidating its functionality into the mainAction-Test.ymlworkflow..github/workflows/Action-Test.yml: Added a newPrereleaseinput parameter to theworkflow_dispatchevent, allowing users to specify whether to use the prerelease version of the GitHub PowerShell module..github/workflows/Action-Test.yml: Updated thejobssection to pass thePrereleaseinput parameter to the workflow, ensuring compatibility with the consolidated functionality.
Type of change
- 📖 [Docs]
- 🪲 [Fix]
- 🩹 [Patch]
-
⚠️ [Security fix] - 🚀 [Feature]
- 🌟 [Breaking change]
Checklist
- I have performed a self-review of my own code
- I have commented my code, particularly in hard-to-understand areas
v1.6.2
🪲 [Fix]: Fix setting the $ErrorView setting via inputs (#53)
This pull request introduces changes related to the handling of the ErrorView configuration in a GitHub Actions workflow. The changes streamline the ErrorView initialization logic by removing redundant code and adding validation to ensure ErrorView is set correctly during runtime.
Changes to ErrorView handling:
.github/workflows/TestWorkflow.yml: Added a validation step to confirm thatErrorViewis set to'NormalView'during the workflow execution. If not, an exception is thrown.action.yml: Introduced the assignment of theErrorViewenvironment variable from the input parameter for use in subsequent scripts.scripts/init.ps1: Removed the redundant initialization and validation logic forErrorView, as this is now handled directly in the workflow and action configuration.
v1.6.1
🩹 [Patch]: Updated the org level login test with quotes (#52)
Description
This pull request updates the TestWorkflow.yml file to test quoted inputs for GitHub App secrets and adjusts the job name to reflect this change.
Workflow updates:
.github/workflows/TestWorkflow.yml: Updated thenamefield of theActionTestWithGitHubAppOrgjob to include "quoted inputs" for clarity..github/workflows/TestWorkflow.yml: Modified theClientIDandPrivateKeyinputs in theAction-Teststep to use quoted syntax for testing purposes.
v1.6.0
🚀[Feature]: Control if GitHub credentials are persisted (#50)
You now have the option to decide if your GitHub credentials should be kept or automatically disconnected after the script finishes. This gives you more flexibility and helps improve security when needed.
How It Works
- By default, your GitHub credentials will be preserved, just like before—no changes needed on your part.
- If you want your credentials to be automatically disconnected after the script runs, set the new
PreserveCredentialsoption tofalse.
Example
Here’s how to disconnect your credentials after running a script:
- name: Run script with credential cleanup
uses: PSModule/GitHub-Script@v1
with:
PreserveCredentials: false
Script: |
Get-GitHubUser
# Your credentials will be disconnected after this stepThat’s it! Use this new option if you want to make sure your GitHub connection is cleaned up automatically after your workflow.
v1.5.1
🩹 [Patch]: Add tests for logging commands for GitHub Actions workflow (#51)
Description
This pull request adds tests various log functions that work in GitHub Actions.
Logging enhancements:
.github/workflows/TestWorkflow.yml: Added some tests to show how log notices, warnings, errors, debug messages, and styled log messages with foreground and background colors work.
v1.5.0
🚀 New Feature: ErrorView Configuration
This release introduces a new feature to configure the PowerShell $ErrorView variable in the GitHub Action. This also sets the default to NormalView whereas the default in PowerShell is ConciseView. NormalView provides more information that would be great to get when troubleshooting errors in GitHub workflows. Users can still override this by adding their own settings in the provided script or using the input to set a different value when building actions or workflows.
Details
- Introduced the
ErrorViewinput inaction.yml, including its description, default value ('NormalView'), and marking it as optional. - The input is mapped to the new environment variable
PSMODULE_GITHUB_SCRIPT_INPUT_ErrorViewin theaction.ymlfile. - The environment variable is validated using wildcard matching against a predefined list of valid views, applies the matched view setting.
- Added a description for the new
ErrorViewoption in theREADME.mdfile. This option allows users to configure the$ErrorViewvariable using full or partial names of valid views.
v1.4.12
What's Changed
- 🩹 [Patch]: Update Action name to be that of the
Nameinput by @MariusStorhaug in #48
Full Changelog: v1...v1.4.12