Skip to content

Commit 87db5ed

Browse files
Add optional CodeCoveragePercentTarget input to action.yml and enhance Normalize-IndentationExceptFirst function documentation in Helpers.psm1
1 parent df2c4dc commit 87db5ed

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ inputs:
3131
default: Missed, Files
3232
CodeCoveragePercentTarget:
3333
description: The target for code coverage.
34+
required: false
3435

3536
runs:
3637
using: composite
@@ -41,11 +42,10 @@ runs:
4142
PSMODULE_GET_PESTERCODECOVERAGE_INPUT_StepSummary_Mode: ${{ inputs.StepSummary_Mode }}
4243
PSMODULE_GET_PESTERCODECOVERAGE_INPUT_CodeCoveragePercentTarget: ${{ inputs.CodeCoveragePercentTarget }}
4344
with:
45+
Name: Get-PesterCodeCoverage
4446
Debug: ${{ inputs.Debug }}
4547
Prerelease: ${{ inputs.Prerelease }}
4648
Verbose: ${{ inputs.Verbose }}
4749
Version: ${{ inputs.Version }}
4850
WorkingDirectory: ${{ inputs.WorkingDirectory }}
49-
Script: |
50-
# Get-PesterCodeCoverage
51-
${{ github.action_path }}/scripts/main.ps1
51+
Script: ${{ github.action_path }}/scripts/main.ps1

scripts/Helpers.psm1

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,19 @@
11
function Normalize-IndentationExceptFirst {
2+
[OutputType([string])]
3+
<#
4+
.SYNOPSIS
5+
Normalizes the indentation of a multi-line string, except for the first line.
6+
7+
.DESCRIPTION
8+
This function takes a multi-line string and normalizes the indentation of all lines except the first one.
9+
It removes the minimum leading whitespace from all subsequent lines.
10+
11+
.PARAMETER Code
12+
The multi-line string to normalize.
13+
14+
.OUTPUTS
15+
Returns the normalized multi-line string.
16+
s#>
217
[CmdletBinding()]
318
param(
419
[Parameter(Mandatory)]

0 commit comments

Comments
 (0)