-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add .github specific to repository (#2)
- Loading branch information
Showing
11 changed files
with
388 additions
and
0 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# cSpell: ignore pesterconverter | ||
# Each line is a file pattern followed by one or more owners. | ||
|
||
# These owners will be the default owners for everything in | ||
# the repo. Unless a later match takes precedence, | ||
# @viscalyx/pesterconverter will be requested for review when | ||
# someone opens a pull request. | ||
* @viscalyx/pesterconverter | ||
/* @johlju |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
name: General question or documentation update | ||
about: If you have a general question or documentation update suggestion around the resource module. | ||
--- | ||
<!-- | ||
Your feedback and support is greatly appreciated, thanks for contributing! | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: New command proposal | ||
description: If you have a proposal for a new public command that you think should be added to this module. The new command that is proposed shall be able to be used by a new or existing resource. | ||
title: "NewCommandName: New command proposal" | ||
labels: [] | ||
assignees: [] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
Please replace `NewCommandName` in the issue title (above) with your proposed command name. | ||
Thank you for contributing and making this module better! | ||
- type: textarea | ||
id: description | ||
attributes: | ||
label: Command proposal | ||
description: Provide information how this command will/should work and how it will help users. | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: proposedParameters | ||
attributes: | ||
label: Proposed parameters | ||
description: | | ||
List all the proposed parameters and any parameter sets that the command should have. For each parameter provide a detailed description, the data type, if a default value should be used, and if the property is limited to a set of values. | ||
value: | | ||
Parameter | Mandatory | Data type | Description | Default value | Allowed values | ||
--- | --- | --- | --- | --- | --- | ||
ParameterName | Yes | String | Detailed description | None | None | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: considerations | ||
attributes: | ||
label: Special considerations or limitations | ||
description: | | ||
Provide any considerations or limitations you can think of that a contributor should take in account when coding the proposed command, and or what limitations a user will encounter or should consider when using the proposed command. | ||
validations: | ||
required: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
name: Problem with a command | ||
description: If you want to report a bug or suggest an enhancement to a public command in this module. | ||
labels: [] | ||
assignees: [] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
TITLE: Please be descriptive not sensationalist. | ||
Your feedback and support is greatly appreciated, thanks for contributing! | ||
Please provide information regarding your issue under each section below. | ||
**Write N/A in sections that do not apply, or if the information is not available.** | ||
- type: textarea | ||
id: description | ||
attributes: | ||
label: Problem description | ||
description: Details of the scenario you tried and the problem that is occurring, or the enhancement you are suggesting. | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: logs | ||
attributes: | ||
label: Verbose logs | ||
description: | | ||
Verbose logs showing the problem. **NOTE! Sensitive information should be obfuscated.** _Will be automatically formatted as plain text._ | ||
placeholder: | | ||
Paste verbose logs here | ||
render: text | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: reproducible | ||
attributes: | ||
label: How to reproduce | ||
description: Provide the steps to reproduce the problem. | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: expectedBehavior | ||
attributes: | ||
label: Expected behavior | ||
description: Describe what you expected to happen. | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: currentBehavior | ||
attributes: | ||
label: Current behavior | ||
description: Describe what actually happens. | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: suggestedSolution | ||
attributes: | ||
label: Suggested solution | ||
description: Do you have any suggestions how to solve the issue? | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: targetNodeOS | ||
attributes: | ||
label: Operating system the target node is running | ||
description: | | ||
Please provide as much as possible about the node running the command. _Will be automatically formatted as plain text._ | ||
To help with this information: | ||
- On a Linux distribution, please provide the distribution name, version, and release. The following command can help get this information: `cat /etc/*-release && cat /proc/version` | ||
- On a Windows OS please provide edition, version, build, and language. The following command can help get this information: `Get-ComputerInfo -Property @('OsName','OsOperatingSystemSKU','OSArchitecture','WindowsVersion','WindowsBuildLabEx','OsLanguage','OsMuiLanguages')` | ||
placeholder: | | ||
Add operating system information here | ||
render: text | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: targetNodePS | ||
attributes: | ||
label: PowerShell version and build the target node is running | ||
description: | | ||
Please provide the version and build of PowerShell the target node is running. _Will be automatically formatted as plain text._ | ||
To help with this information, please run this command: `$PSVersionTable` | ||
placeholder: | | ||
Add PowerShell information here | ||
render: text | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: moduleVersion | ||
attributes: | ||
label: Module version used | ||
description: | | ||
Please provide the version of the module that was used. _Will be automatically formatted as plain text._ | ||
To help with this information, please run this command where you encountered the problem: `Get-Module -Name 'PesterConverter' -ListAvailable | ft Name,Version,Path` | ||
placeholder: | | ||
Add module information here | ||
render: text | ||
validations: | ||
required: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
blank_issues_enabled: false | ||
contact_links: | ||
- name: "Virtual PowerShell User Group #testing channel" | ||
url: https://poshcode.org/ | ||
about: "To talk to the community and maintainers of PesterConverter, please visit the #testing channel." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<!-- | ||
Thanks for submitting a Pull Request (PR) to this project. | ||
Your contribution to this project is greatly appreciated! | ||
Please prefix the PR title with the resource name, | ||
e.g. 'ResourceName: My short description'. | ||
If this is a breaking change, then also prefix the PR title | ||
with 'BREAKING CHANGE:', | ||
e.g. 'BREAKING CHANGE: ResourceName: My short description'. | ||
You may remove this comment block, and the other comment blocks, but please | ||
keep the headers and the task list. | ||
--> | ||
#### Pull Request (PR) description | ||
<!-- | ||
Replace this comment block with a description of your PR. | ||
Also, make sure you have updated the CHANGELOG.md, see the | ||
task list below. An entry in the CHANGELOG.md is mandatory | ||
for all PRs. | ||
--> | ||
|
||
#### This Pull Request (PR) fixes the following issues | ||
<!-- | ||
If this PR does not fix an open issue, replace this comment block with None. | ||
If this PR resolves one or more open issues, replace this comment block with | ||
a list of the issues using a GitHub closing keyword, e.g.: | ||
- Fixes #123 | ||
- Fixes #124 | ||
--> | ||
|
||
#### Task list | ||
<!-- | ||
To aid community reviewers in reviewing and merging your PR, please take | ||
the time to run through the below checklist and make sure your PR has | ||
everything updated as required. | ||
Change to [x] for each task in the task list that applies to your PR. | ||
For those task that don't apply to you PR, leave those unchecked. | ||
--> | ||
- [ ] Added an entry to the change log under the Unreleased section of the | ||
file CHANGELOG.md. Entry should say what was changed and how that | ||
affects users (if applicable), and reference the issue being resolved | ||
(if applicable). | ||
- [ ] Documentation added/updated in README.md and source/WikiSource. | ||
- [ ] Comment-based help added/updated for all new/changed functions. | ||
- [ ] Localization strings added/updated in all localization files as appropriate. | ||
- [ ] Examples appropriately added/updated. | ||
- [ ] Unit tests added/updated. See [DSC Community Testing Guidelines](https://dsccommunity.org/guidelines/testing-guidelines). | ||
- [ ] Integration tests added/updated (where applicable). See | ||
[DSC Community Testing Guidelines](https://dsccommunity.org/guidelines/testing-guidelines). | ||
- [ ] New/changed code adheres to [DSC Community Style Guidelines](https://dsccommunity.org/styleguidelines). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
|
||
# Maintain dependencies for GitHub Actions | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: Code analysis (built module) | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
workflow_dispatch: | ||
|
||
# cSpell: ignore potatoqualitee codeql SARIF | ||
jobs: | ||
pssa: | ||
name: PSScriptAnalyzer | ||
runs-on: windows-latest | ||
permissions: | ||
contents: read # for actions/checkout to fetch code | ||
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results | ||
#actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Install GitVersion | ||
shell: powershell | ||
run: | | ||
dotnet tool install --global GitVersion.Tool | ||
- name: Run GitVersion | ||
shell: powershell | ||
run: | | ||
dotnet-gitversion | ConvertFrom-Json | ||
- name: Build Module | ||
shell: powershell | ||
run: | | ||
Write-Information -MessageData 'Module is being built.' -InformationAction 'Continue' | ||
.\build.ps1 -ResolveDependency -Tasks 'build' | ||
- name: Run PSScriptAnalyzer | ||
shell: powershell | ||
run: | | ||
Write-Information -MessageData 'Prepare the test pipeline.' -InformationAction 'Continue' | ||
.\build.ps1 -Tasks 'noop' | ||
Write-Information -MessageData 'Import module ConvertToSARIF into the session.' -InformationAction 'Continue' | ||
Import-Module -Name 'ConvertToSARIF' -Force | ||
Write-Information -MessageData 'Import module PSScriptAnalyzer into the session.' -InformationAction 'Continue' | ||
Import-Module -Name 'PSScriptAnalyzer' -Force | ||
$filesToScan = Get-ChildItem -Path './output/builtModule/PesterConverter/**/PesterConverter.psm1' -File | ||
Write-Information -MessageData ("Will scan the file:`t{0}." -f $filesToScan.FullName) -InformationAction 'Continue' | ||
Write-Information -MessageData 'Running PSScriptAnalyzer on built module.' -InformationAction 'Continue' | ||
$pssaError = $filesToScan | | ||
Invoke-ScriptAnalyzer -Settings './.vscode/analyzersettings.psd1' | ||
Write-Information -MessageData 'Converting PSScriptAnalyzer result to SARIF.' -InformationAction 'Continue' | ||
$pssaError | | ||
ConvertTo-SARIF -FilePath 'results.sarif' | ||
Write-Information -MessageData 'Analyzing done.' -InformationAction 'Continue' | ||
- name: Upload SARIF results | ||
uses: github/codeql-action/upload-sarif@v3 | ||
with: | ||
sarif_file: results.sarif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
name: Code analysis (source) | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
workflow_dispatch: | ||
|
||
# cSpell: ignore codeql SARIF | ||
jobs: | ||
pssa: | ||
name: PSScriptAnalyzer | ||
runs-on: windows-latest | ||
permissions: | ||
contents: read # for actions/checkout to fetch code | ||
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results | ||
#actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Install GitVersion | ||
shell: powershell | ||
run: | | ||
dotnet tool install --global GitVersion.Tool | ||
- name: Run GitVersion | ||
shell: powershell | ||
run: | | ||
dotnet-gitversion | ConvertFrom-Json | ||
- name: Build Module | ||
shell: powershell | ||
run: | | ||
Write-Information -MessageData 'Module is being built so that examples can be scanned.' -InformationAction 'Continue' | ||
.\build.ps1 -ResolveDependency -Tasks 'build' | ||
- name: Run PSScriptAnalyzer | ||
shell: powershell | ||
run: | | ||
Write-Information -MessageData 'Prepare the test pipeline.' -InformationAction 'Continue' | ||
.\build.ps1 -Tasks 'noop' | ||
Write-Information -MessageData 'Import module ConvertToSARIF into the session.' -InformationAction 'Continue' | ||
Import-Module -Name 'ConvertToSARIF' -Force | ||
Write-Information -MessageData 'Import module PSScriptAnalyzer into the session.' -InformationAction 'Continue' | ||
Import-Module -Name 'PSScriptAnalyzer' -Force | ||
$filesToScan = Get-ChildItem -Path './source/' -Recurse -Include @('*.psm1', '*.ps1') -File | ||
Write-Information -MessageData ("Will scan the files:`n`r`t{0}." -f ($filesToScan.FullName -join "`n`r`t")) -InformationAction 'Continue' | ||
Write-Information -MessageData 'Running PSScriptAnalyzer.' -InformationAction 'Continue' | ||
$pssaError = $filesToScan | | ||
Invoke-ScriptAnalyzer -Settings './.vscode/analyzersettings.psd1' | ||
$parseErrorTypes = @( | ||
'TypeNotFound' | ||
'RequiresModuleInvalid' | ||
) | ||
Write-Information -MessageData ('Filter out reported parse errors that is unable to be resolved in source files: {0}' -f ($parseErrorTypes -join ', ')) -InformationAction 'Continue' | ||
$pssaError = $pssaError | | ||
Where-Object -FilterScript { | ||
$_.RuleName -notin $parseErrorTypes | ||
} | ||
Write-Information -MessageData 'Converting PSScriptAnalyzer result to SARIF.' -InformationAction 'Continue' | ||
$pssaError | | ||
ConvertTo-SARIF -FilePath 'results.sarif' | ||
Write-Information -MessageData 'Analyzing done.' -InformationAction 'Continue' | ||
- name: Upload SARIF results | ||
uses: github/codeql-action/upload-sarif@v3 | ||
with: | ||
sarif_file: results.sarif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Mark stale issues and pull requests | ||
|
||
on: | ||
schedule: | ||
- cron: "30 1 * * *" | ||
|
||
jobs: | ||
stale: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/stale@v9 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
stale-issue-message: 'This issue has been automatically marked as stale because it has not had activity from the community in the last 30 days. It will be closed if no further activity occurs within 40 days. If the issue is labelled with any of the work labels (e.g bug, enhancement, documentation, or tests) then the issue will not auto-close.' | ||
close-issue-message: 'This issue has been automatically closed because it is has not had activity from the community in the last 40 days. If this issue was wrongly closed, for a issue author please comment and re-open it, if you are not the issue author comment with a reason for it to be reopened and tag a maintainer in the comment.' | ||
days-before-issue-stale: 30 | ||
days-before-issue-close: 40 | ||
exempt-issue-labels: 'bug,enhancement,tests,documentation,resource proposal,command proposal,on hold,resolved' | ||
stale-issue-label: 'stale' | ||
stale-pr-message: 'Labeling this pull request (PR) as abandoned since it has gone 14 days or more since the last update. An abandoned PR can be continued by another contributor. The abandoned label will be removed if work on this PR is taken up again.' | ||
days-before-pr-stale: 14 | ||
days-before-pr-close: -1 | ||
exempt-pr-labels: 'needs review,on hold,ready for merge' | ||
stale-pr-label: 'abandoned' | ||
remove-stale-when-updated: true |
Oops, something went wrong.