Skip to content

Commit a2c3931

Browse files
TravisEz13pwshBot
authored andcommitted
Cherry-pick PR PowerShell#25268 with conflicts for manual resolution
1 parent 4586837 commit a2c3931

5 files changed

Lines changed: 45 additions & 19 deletions

File tree

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
- Use the present tense and imperative mood when describing your changes
1515
- [ ] [Summarized changes](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)
1616
- [ ] [Make sure all `.h`, `.cpp`, `.cs`, `.ps1` and `.psm1` files have the correct copyright header](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)
17-
- [ ] This PR is ready to merge and is not [Work in Progress](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---work-in-progress).
18-
- If the PR is work in progress, please add the prefix `WIP:` or `[ WIP ]` to the beginning of the title (the `WIP` bot will keep its status check at `Pending` while the prefix is present) and remove the prefix when the PR is ready.
17+
- [ ] This PR is ready to merge. If this PR is a work in progress, please open this as a [Draft Pull Request and mark it as Ready to Review when it is ready to merge](https://docs.github.com/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests#draft-pull-requests).
1918
- **[Breaking changes](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#making-breaking-changes)**
2019
- [ ] None
2120
- **OR**
@@ -25,21 +24,8 @@
2524
- [ ] Not Applicable
2625
- **OR**
2726
- [ ] [Documentation needed](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)
28-
- [ ] Issue filed: <!-- Number/link of that issue here -->
27+
- [ ] Issue filed: <!-- Number/link of that issue here -->
2928
- **Testing - New and feature**
3029
- [ ] N/A or can only be tested interactively
3130
- **OR**
3231
- [ ] [Make sure you've added a new test if existing tests do not effectively test the code changed](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#before-submitting)
33-
- **Tooling**
34-
- [ ] I have considered the user experience from a tooling perspective and don't believe tooling will be impacted.
35-
- **OR**
36-
- [ ] I have considered the user experience from a tooling perspective and opened an issue in the relevant tool repository. This may include:
37-
- [ ] Impact on [PowerShell Editor Services](https://github.com/PowerShell/PowerShellEditorServices) which is used in the [PowerShell extension](https://github.com/PowerShell/vscode-powershell) for VSCode
38-
(which runs in a different PS Host).
39-
- [ ] Issue filed: <!-- Number/link of that issue here -->
40-
- [ ] Impact on Completions (both in the console and in editors) - one of PowerShell's most powerful features.
41-
- [ ] Issue filed: <!-- Number/link of that issue here -->
42-
- [ ] Impact on [PSScriptAnalyzer](https://github.com/PowerShell/PSScriptAnalyzer) (which provides linting & formatting in the editor extensions).
43-
- [ ] Issue filed: <!-- Number/link of that issue here -->
44-
- [ ] Impact on [EditorSyntax](https://github.com/PowerShell/EditorSyntax) (which provides syntax highlighting with in VSCode, GitHub, and many other editors).
45-
- [ ] Issue filed: <!-- Number/link of that issue here -->

.github/workflows/markdownLink.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,24 @@ jobs:
3030
# Full git history is needed to get a proper
3131
# list of changed files within `super-linter`
3232
fetch-depth: 0
33+
- name: Load super-linter configuration
34+
# Use grep inverse matching to exclude eventual comments in the .env file
35+
# because the GitHub Actions command to set environment variables doesn't
36+
# support comments.
37+
# Ref: https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#setting-an-environment-variable
38+
run: grep -v '^#' tools/super-linter/config/super-linter.env >> "$GITHUB_ENV"
3339
- name: Lint Markdown
3440
uses: super-linter/super-linter@a8150b40c89574adb5f68bf9502b890a236a06b3 # v5.7.2
3541
env:
36-
VALIDATE_ALL_CODEBASE: false
37-
DEFAULT_BRANCH: master
38-
FILTER_REGEX_INCLUDE: .*\.md
3942
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
<<<<<<< HEAD
4044
VALIDATE_EDITORCONFIG: false
45+
=======
46+
- name: Super-Linter correction instructions
47+
if: failure()
48+
uses: actions/github-script@v7.0.1
49+
with:
50+
script: |
51+
const message = "Super-Linter found issues in the changed files. Please check the logs for details. You can run the linter locally using the command: `./tools/super-lister/super-lister.ps1`.";
52+
core.setFailed(message);
53+
>>>>>>> 9b0a59382 (Simplify PR Template (#25268))

.prettierrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"tabWidth": 2,
3+
"useTabs": false
4+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
VALIDATE_ALL_CODEBASE=false
2+
DEFAULT_BRANCH=master
3+
FILTER_REGEX_INCLUDE=.*\.md
4+
VALIDATE_EDITORCONFIG=false
5+
VALIDATE_JSCPD=false
6+
VALIDATE_CHECKOV=false
7+
FIX_MARKDOWN_PRETTIER=true
8+
FIX_MARKDOWN=true
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Copyright (c) Microsoft Corporation.
2+
# Licensed under the MIT License.
3+
4+
param(
5+
[string]$RepoRoot = (Join-Path -Path $PSScriptRoot -ChildPath '../..'),
6+
[string]$Platform
7+
)
8+
9+
$resolvedPath = (Resolve-Path $RepoRoot).ProviderPath
10+
$platformParam = @()
11+
if ($Platform) {
12+
$platformParam = @("--platform", $Platform)
13+
}
14+
15+
docker run $platformParam -e RUN_LOCAL=true --env-file "$PSScriptRoot/config/super-linter.env" -v "${resolvedPath}:/tmp/lint" ghcr.io/super-linter/super-linter:latest

0 commit comments

Comments
 (0)