From 276f61ea843783c6644177226a16331d17396a43 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 5 Oct 2025 18:29:52 +0200 Subject: [PATCH 01/25] =?UTF-8?q?=F0=9F=93=9D[Enhancement]:=20Update=20wor?= =?UTF-8?q?kflow=20to=20use=20PowerShell=20shell=20and=20load=20dynamic=20?= =?UTF-8?q?environment=20variables;=20remove=20obsolete=20PSModule=20confi?= =?UTF-8?q?guration=20files.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/workflow.yml | 28 +++++++++++++------ .../.github/PSModule.json | 22 --------------- .../.github/PSModule.psd1 | 22 --------------- .../.github/PSModule.yml | 9 ++++++ 4 files changed, 29 insertions(+), 52 deletions(-) delete mode 100644 tests/srcWithManifestTestRepo/.github/PSModule.json delete mode 100644 tests/srcWithManifestTestRepo/.github/PSModule.psd1 diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index faf24e77..a91681a1 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -70,6 +70,10 @@ permissions: pages: write # to deploy to Pages id-token: write # to verify the deployment originates from an appropriate source +defaults: + run: + shell: pwsh + jobs: # Runs on: # - ✅ Open/Updated PR - Always runs to load configuration @@ -105,17 +109,25 @@ jobs: persist-credentials: false fetch-depth: 0 + - name: Load dynamic envs + env: + RAW_JSON: ${{ fromJson(needs.Get-Settings.outputs.Settings).Linter.env }} + run: | + $map = $env:RAW_JSON | ConvertFrom-Json -AsHashtable + + foreach ($key in $map.Keys) { + $value = $map[$key] + + Write-Host "$key = $value" + + # Persist for following steps in this job + "$key=$value" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + } + - name: Lint code base uses: super-linter/super-linter@7bba2eeb89d01dc9bfd93c497477a57e72c83240 # v8.2.0 env: - GITHUB_TOKEN: ${{ github.token }} - VALIDATE_BIOME_FORMAT: false - VALIDATE_BIOME_LINT: false - VALIDATE_GITHUB_ACTIONS_ZIZMOR: false - VALIDATE_JSCPD: false - VALIDATE_JSON_PRETTIER: false - VALIDATE_MARKDOWN_PRETTIER: false - VALIDATE_YAML_PRETTIER: false + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Runs on: # - ✅ Open/Updated PR - Builds module for testing diff --git a/tests/srcWithManifestTestRepo/.github/PSModule.json b/tests/srcWithManifestTestRepo/.github/PSModule.json deleted file mode 100644 index b175eeb5..00000000 --- a/tests/srcWithManifestTestRepo/.github/PSModule.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "Name": "PSModuleTest", - "Test": { - "SourceCode": { - "Skip": true - }, - "PSModule": { - "Linux": { - "Skip": true - } - }, - "Module": { - "Skip": false - }, - "CodeCoverage": { - "PercentTarget": 1 - } - }, - "Publish": { - "AutoCleanup": false - } -} diff --git a/tests/srcWithManifestTestRepo/.github/PSModule.psd1 b/tests/srcWithManifestTestRepo/.github/PSModule.psd1 deleted file mode 100644 index e680e8fd..00000000 --- a/tests/srcWithManifestTestRepo/.github/PSModule.psd1 +++ /dev/null @@ -1,22 +0,0 @@ -@{ - Name = 'PSModuleTest' - Test = @{ - SourceCode = @{ - Skip = $true - } - PSModule = @{ - Linux = @{ - Skip = $true - } - } - Module = @{ - Skip = $false - } - CodeCoverage = @{ - PercentTarget = 1 - } - } - Publish = @{ - AutoCleanup = $false - } -} diff --git a/tests/srcWithManifestTestRepo/.github/PSModule.yml b/tests/srcWithManifestTestRepo/.github/PSModule.yml index d285c1ed..ceaf2ff0 100644 --- a/tests/srcWithManifestTestRepo/.github/PSModule.yml +++ b/tests/srcWithManifestTestRepo/.github/PSModule.yml @@ -11,3 +11,12 @@ Test: PercentTarget: 1 Publish: AutoCleanup: false +Linter: + env: + VALIDATE_BIOME_FORMAT: false + VALIDATE_BIOME_LINT: false + VALIDATE_GITHUB_ACTIONS_ZIZMOR: false + VALIDATE_JSCPD: false + VALIDATE_JSON_PRETTIER: false + VALIDATE_MARKDOWN_PRETTIER: false + VALIDATE_YAML_PRETTIER: false From a37c7ff8b9f15349c1a901c7e7129dc1c5fd866c Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 5 Oct 2025 18:38:41 +0200 Subject: [PATCH 02/25] =?UTF-8?q?=F0=9F=93=9D[Enhancement]:=20Add=20Linter?= =?UTF-8?q?=20configuration=20options=20to=20skip=20linting=20and=20set=20?= =?UTF-8?q?environment=20variables;=20update=20documentation=20accordingly?= =?UTF-8?q?.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/Get-Settings.yml | 4 +++ .github/workflows/workflow.yml | 2 +- README.md | 31 +++++++++++++++++++ .../.github/PSModule.yml | 1 + 4 files changed, 37 insertions(+), 1 deletion(-) diff --git a/.github/workflows/Get-Settings.yml b/.github/workflows/Get-Settings.yml index 2f502542..2b2ed220 100644 --- a/.github/workflows/Get-Settings.yml +++ b/.github/workflows/Get-Settings.yml @@ -230,6 +230,10 @@ jobs: } } + Linter = [pscustomobject]@{ + Skip = $settings.Linter.Skip ?? $false + env = $settings.Linter.env ?? @{} + } } LogGroup "Final settings" { switch -Regex ($settingsFile.Extension) { diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index a91681a1..2d7cca50 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -99,7 +99,7 @@ jobs: Lint-Repository: name: Lint code base runs-on: ubuntu-latest - if: github.event_name == 'pull_request' && github.event.pull_request.merged != true && github.event.action != 'closed' + if: github.event_name == 'pull_request' && github.event.pull_request.merged != true && github.event.action != 'closed' && fromJson(needs.Get-Settings.outputs.Settings).Linter.Skip != true needs: - Get-Settings steps: diff --git a/README.md b/README.md index f912c330..1eabffd4 100644 --- a/README.md +++ b/README.md @@ -260,6 +260,8 @@ The following settings are available in the settings file: | `Publish.Module.MinorLabels` | `String` | Labels indicating a minor version bump | `'minor, feature'` | | `Publish.Module.PatchLabels` | `String` | Labels indicating a patch version bump | `'patch, fix'` | | `Publish.Module.IgnoreLabels` | `String` | Labels indicating no release | `'NoRelease'` | +| `Linter.Skip` | `Boolean` | Skip repository linting | `false` | +| `Linter.env` | `Object` | Environment variables for super-linter configuration | `{}` |
`PSModule.yml` with all defaults @@ -328,6 +330,10 @@ Publish: PatchLabels: 'patch, fix' IgnoreLabels: 'NoRelease' +Linter: + Skip: false + env: {} + ```
@@ -365,6 +371,31 @@ Build: Skip: true ``` +### Example 3 - Configuring the Repository Linter + +This example shows how to configure the repository linter to skip certain validations or disable the linter entirely. + +```yaml +# Skip the linter entirely +Linter: + Skip: true +``` + +```yaml +# Disable specific linter validations +Linter: + env: + VALIDATE_BIOME_FORMAT: false + VALIDATE_BIOME_LINT: false + VALIDATE_GITHUB_ACTIONS_ZIZMOR: false + VALIDATE_JSCPD: false + VALIDATE_JSON_PRETTIER: false + VALIDATE_MARKDOWN_PRETTIER: false + VALIDATE_YAML_PRETTIER: false +``` + +For a complete list of available linter environment variables, see the [super-linter documentation](https://github.com/super-linter/super-linter#environment-variables). + ## Specifications and practices The process is compatible with: diff --git a/tests/srcWithManifestTestRepo/.github/PSModule.yml b/tests/srcWithManifestTestRepo/.github/PSModule.yml index ceaf2ff0..5b678f25 100644 --- a/tests/srcWithManifestTestRepo/.github/PSModule.yml +++ b/tests/srcWithManifestTestRepo/.github/PSModule.yml @@ -12,6 +12,7 @@ Test: Publish: AutoCleanup: false Linter: + Skip: true env: VALIDATE_BIOME_FORMAT: false VALIDATE_BIOME_LINT: false From a84d16627f198f2212901cb0e24de76e3359c9da Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 5 Oct 2025 18:42:21 +0200 Subject: [PATCH 03/25] =?UTF-8?q?=F0=9F=93=9D[Enhancement]:=20Add=20enviro?= =?UTF-8?q?nment=20variable=20listing=20step=20in=20workflow;=20remove=20s?= =?UTF-8?q?kip=20option=20for=20Linter=20in=20PSModule=20configuration.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/workflow.yml | 6 ++++-- tests/srcWithManifestTestRepo/.github/PSModule.yml | 1 - 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 2d7cca50..9f823326 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -118,12 +118,14 @@ jobs: foreach ($key in $map.Keys) { $value = $map[$key] - Write-Host "$key = $value" - # Persist for following steps in this job "$key=$value" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append } + - name: List all envs + run: | + Get-ChildItem env: | Format-Table -AutoSize + - name: Lint code base uses: super-linter/super-linter@7bba2eeb89d01dc9bfd93c497477a57e72c83240 # v8.2.0 env: diff --git a/tests/srcWithManifestTestRepo/.github/PSModule.yml b/tests/srcWithManifestTestRepo/.github/PSModule.yml index 5b678f25..ceaf2ff0 100644 --- a/tests/srcWithManifestTestRepo/.github/PSModule.yml +++ b/tests/srcWithManifestTestRepo/.github/PSModule.yml @@ -12,7 +12,6 @@ Test: Publish: AutoCleanup: false Linter: - Skip: true env: VALIDATE_BIOME_FORMAT: false VALIDATE_BIOME_LINT: false From 6f43f5ceb805776b14424c10e2a58a2149c9d5f2 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 5 Oct 2025 18:46:16 +0200 Subject: [PATCH 04/25] =?UTF-8?q?=F0=9F=93=9D[Fix]:=20Correctly=20convert?= =?UTF-8?q?=20Linter=20environment=20variables=20to=20JSON=20format=20in?= =?UTF-8?q?=20workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 9f823326..fa232af0 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -111,7 +111,7 @@ jobs: - name: Load dynamic envs env: - RAW_JSON: ${{ fromJson(needs.Get-Settings.outputs.Settings).Linter.env }} + RAW_JSON: ${{ toJson(fromJson(needs.Get-Settings.outputs.Settings).Linter.env) }} run: | $map = $env:RAW_JSON | ConvertFrom-Json -AsHashtable From 1fde19cb0140d12f84b4913080704eac45fd68da Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 5 Oct 2025 18:49:50 +0200 Subject: [PATCH 05/25] =?UTF-8?q?=F0=9F=93=9D[Fix]:=20Update=20Linter=20en?= =?UTF-8?q?vironment=20variable=20values=20to=20be=20strings=20in=20PSModu?= =?UTF-8?q?le=20configuration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/srcWithManifestTestRepo/.github/PSModule.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/srcWithManifestTestRepo/.github/PSModule.yml b/tests/srcWithManifestTestRepo/.github/PSModule.yml index ceaf2ff0..6f39cee9 100644 --- a/tests/srcWithManifestTestRepo/.github/PSModule.yml +++ b/tests/srcWithManifestTestRepo/.github/PSModule.yml @@ -13,10 +13,10 @@ Publish: AutoCleanup: false Linter: env: - VALIDATE_BIOME_FORMAT: false - VALIDATE_BIOME_LINT: false - VALIDATE_GITHUB_ACTIONS_ZIZMOR: false - VALIDATE_JSCPD: false - VALIDATE_JSON_PRETTIER: false - VALIDATE_MARKDOWN_PRETTIER: false - VALIDATE_YAML_PRETTIER: false + VALIDATE_BIOME_FORMAT: 'false' + VALIDATE_BIOME_LINT: 'false' + VALIDATE_GITHUB_ACTIONS_ZIZMOR: 'false' + VALIDATE_JSCPD: 'false' + VALIDATE_JSON_PRETTIER: 'false' + VALIDATE_MARKDOWN_PRETTIER: 'false' + VALIDATE_YAML_PRETTIER: 'false' From 5dbed0d4a51aa921cdfdaa1295e1484fa4786be1 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 5 Oct 2025 18:59:09 +0200 Subject: [PATCH 06/25] =?UTF-8?q?=F0=9F=93=9D[Fix]:=20Convert=20Linter=20e?= =?UTF-8?q?nvironment=20variable=20'VALIDATE=5FBIOME=5FFORMAT'=20to=20bool?= =?UTF-8?q?ean=20in=20PSModule=20configuration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/workflow.yml | 2 +- tests/srcWithManifestTestRepo/.github/PSModule.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index fa232af0..1d19e813 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -116,7 +116,7 @@ jobs: $map = $env:RAW_JSON | ConvertFrom-Json -AsHashtable foreach ($key in $map.Keys) { - $value = $map[$key] + $value = ($map[$key]).ToString().ToLower() # Persist for following steps in this job "$key=$value" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append diff --git a/tests/srcWithManifestTestRepo/.github/PSModule.yml b/tests/srcWithManifestTestRepo/.github/PSModule.yml index 6f39cee9..3303a7f8 100644 --- a/tests/srcWithManifestTestRepo/.github/PSModule.yml +++ b/tests/srcWithManifestTestRepo/.github/PSModule.yml @@ -13,7 +13,7 @@ Publish: AutoCleanup: false Linter: env: - VALIDATE_BIOME_FORMAT: 'false' + VALIDATE_BIOME_FORMAT: false VALIDATE_BIOME_LINT: 'false' VALIDATE_GITHUB_ACTIONS_ZIZMOR: 'false' VALIDATE_JSCPD: 'false' From eb919e30c6914c285735a57b18d500da31b36cae Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 5 Oct 2025 19:04:42 +0200 Subject: [PATCH 07/25] =?UTF-8?q?=F0=9F=93=9D[Fix]:=20Ensure=20boolean=20v?= =?UTF-8?q?alues=20are=20correctly=20converted=20to=20strings=20in=20envir?= =?UTF-8?q?onment=20variable=20processing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/workflow.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 1d19e813..3b85c788 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -116,7 +116,11 @@ jobs: $map = $env:RAW_JSON | ConvertFrom-Json -AsHashtable foreach ($key in $map.Keys) { - $value = ($map[$key]).ToString().ToLower() + $value = $map[$key] + + if ($value -is [bool]) { + $value = $value.ToString().ToLower() + } # Persist for following steps in this job "$key=$value" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append From 08d2dd6237241c52f6ed05a90d3ea338b4c7a4a8 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 5 Oct 2025 20:19:25 +0200 Subject: [PATCH 08/25] =?UTF-8?q?=F0=9F=93=9D[Enhancement]:=20Add=20PR=20p?= =?UTF-8?q?rompt=20template=20for=20generating=20release=20note=20style=20?= =?UTF-8?q?descriptions=20and=20labels=20based=20on=20change=20types?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/prompts/pr.prompt.md | 118 +++++++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 .github/prompts/pr.prompt.md diff --git a/.github/prompts/pr.prompt.md b/.github/prompts/pr.prompt.md new file mode 100644 index 00000000..6c24450d --- /dev/null +++ b/.github/prompts/pr.prompt.md @@ -0,0 +1,118 @@ +--- +description: Create a pull request with a release note style description, appropriate title, and labels based on the change type. +--- + +# PR + +The user input to you can be provided directly by the agent or as a command argument - you **MUST** consider it before proceeding with the prompt (if not empty). + +## User input + +$ARGUMENTS + +**Purpose**: Create or update a pull request with a release note style description and title, automatically applying the appropriate labels based on the change type specified. + +## Supported Change Types + +| Type | Icon | Labels | Description | +|------|------|--------|-------------| +| Major | 🌟 | `Major` | Breaking changes that affect compatibility | +| Minor | 🚀 | `Minor` | New features or enhancements | +| Patch | 🩹 | `Patch` | Small fixes or improvements | +| Fix | 🪲 | `Fix`, `Patch` | Bug fixes | +| Docs | 📖 | `Docs` | Documentation changes only | + +## Execution Steps + +1. **Detect repository mode**: + - Run `git remote -v` to check configured remotes. + - **If `upstream` remote exists**: Fork mode - use upstream owner/repo for all GitHub operations + - **If only `origin` remote exists**: Origin mode - use origin owner/repo for all GitHub operations + - Parse the URLs to extract owner and repo name: `https://github.com//.git`. + - If in doubt, ask the user to clarify which repository to target. + +2. **Determine the change type**: + 1. Parse the user input to identify the change type (Major, Minor, Patch, Fix, or Docs) + 2. If nothing is provided, evaluate the code changes to infer the type: + - **Major**: Changes that break backward compatibility (e.g., removing public APIs, changing method signatures) + - **Minor**: New features or enhancements that do not break existing functionality + - **Patch**: Bug fixes or small improvements that do not add new features + - **Fix**: Specifically for bug fixes + - **Docs**: Only documentation changes + +3. **Get current branch information**: + - Determine the current branch name + - Verify there are changes to commit (if uncommitted changes exist, stage and commit them first) + - Push the branch to remote if not already pushed. + +4. **Retrieve linked issue information** (if available): + - Attempt to find the GitHub issue number associated with the current branch + - If found, retrieve the issue title from the target repository + - Use the issue title as the PR title (with appropriate icon prefix) + - If no issue is found, ask the user to provide one of the following: + - the number of the issue to link to the PR + - if a new issue should be raised for this PR + - Stop if the user cannot provide either of these. + +5. **Generate PR title**: + - **If issue title retrieved**: Use format ` ` + - Examples: + - `🚀 Add support for custom module templates` + - `🪲 [Fix]: Resolve null reference in parameter validation` + - `📖 [Docs]: Update installation guide with prerequisites` + +6. **Generate release note style description**: + - Start with a concise summary paragraph describing **what changes for the user** of the code + - Focus on user-facing impact, not implementation details + - Use present tense and active voice + - Structure: + * **Leading paragraph**: Clear summary of the change and its benefit to users + * **If issue linked**: Add `- Fixes #` after the leading paragraph + * **Optional additional context**: Briefly explain why this change was needed + * **What's Changed**: Bullet points of key changes (user-facing) + - Keep it concise - this should read like a release note entry + - DO NOT add a title or heading before the leading paragraph + - Avoid implementation details unless necessary for understanding + +7. **Create or update the pull request**: + - **Check if PR already exists** for this branch in the target repository + - **If PR exists**: Update the title, description, and labels + - **If PR does not exist**: Create a new PR + - Set PR to target the default branch (main/master) + - Open as a **draft PR** (or keep as draft if updating) + - **Use GitHub MCP tools** to perform these operations: + ``` + # Create PR (if not exists) + mcp_github_github_create_pull_request + + # Update PR (if exists) + mcp_github_github_update_pull_request + + # Add labels to PR + mcp_github_github_add_labels_to_issue (PRs are issues in GitHub API) + ``` + +8. **Apply labels to the PR**: + - Add the **change type label** based on the type specified (Major, Minor, Patch, Fix, or Docs) + - For Fix type, add both `Fix` and `Patch` labels + - If currently in a feature workflow phase (e.g., Planning, Implementation), also apply that phase label + - Use GitHub MCP to add labels in the target repository + +9. **Confirm completion**: + - Display the PR URL to the user + - Summarize the PR title, type, and labels applied + - If in fork mode, remind the user that the PR was created in the upstream repository + +**Example Usage**: +- `/PR` - Create a PR for the current changes +- `/PR Minor` - Create a PR for a new feature +- `/PR Fix` - Create a PR for a bug fix +- `/PR Docs` - Create a PR for documentation changes +- `/PR Major` - Create a PR for breaking changes +- `/PR Patch` - Create a PR for small improvements + +**Notes**: +- This command commits and pushes changes if there are uncommitted changes +- The PR is always created as a draft to allow for review before marking as ready +- Labels can be manually adjusted after PR creation if needed +- The description should be written from the user's perspective, focusing on impact not implementation From 395e9b6f391906ff018df9d778666cadea561cdb Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 5 Oct 2025 20:21:04 +0200 Subject: [PATCH 09/25] docs(prompts): remove fork-info.json dependency, use git remote detection instead - Update /specify, /plan, /tasks, and /implement prompts to detect fork mode via git remote -v - Remove all references to .fork-info.json configuration file - Simplify fork contribution workflow with automatic detection - Add comprehensive linter configuration documentation to README --- .github/prompts/implement.prompt.md | 16 +++--- .github/prompts/plan.prompt.md | 38 ++++++-------- .github/prompts/specify.prompt.md | 77 +++++++---------------------- .github/prompts/tasks.prompt.md | 15 +++--- README.md | 36 ++++++++++++-- 5 files changed, 83 insertions(+), 99 deletions(-) diff --git a/.github/prompts/implement.prompt.md b/.github/prompts/implement.prompt.md index 8f92b2da..3d3029f3 100644 --- a/.github/prompts/implement.prompt.md +++ b/.github/prompts/implement.prompt.md @@ -15,7 +15,7 @@ $ARGUMENTS **Workflow Modes**: This command supports two modes: - **Local (default)**: Work with the current repository (origin). No special configuration needed. -- **Fork**: Contribute to an upstream repository. Reads `.fork-info.json` created by `/specify`. +- **Fork**: Contribute to an upstream repository. Detected via `git remote -v`. **Iteration Support**: This command supports iterative implementation — you can run it multiple times to complete remaining tasks, fix issues, or add refinements. Task completion state is tracked in `tasks.md` with `[X]` markers. @@ -25,11 +25,14 @@ $ARGUMENTS 1. **Set Implementing label immediately** - **Determine target repository**: - - Check if `.fork-info.json` exists in the feature directory. - - If it exists: - - Validate required fields: `is_fork` (true), `upstream_owner` (non-empty), `upstream_repo` (non-empty). - - Use `upstream_owner/upstream_repo` for all GitHub operations. - - If it doesn't exist, use the current repository (origin). + - Run `git remote -v` to check configured remotes + - **If `upstream` remote exists**: Fork mode + - Parse the upstream URL to extract owner and repo name + - Example: `upstream https://github.com/PSModule/Utilities.git` → owner: `PSModule`, repo: `Utilities` + - Use `upstream_owner/upstream_repo` for all GitHub operations + - **If only `origin` remote exists**: Origin mode + - Parse the origin URL to extract owner and repo name + - Use `origin_owner/origin_repo` for all GitHub operations - Get the issue number associated with the current feature branch. - **Add `Implementing` label** to the issue and PR immediately in the target repository. - **Remove `Planning` label** from the issue and PR. @@ -158,7 +161,6 @@ $ARGUMENTS * Remove `Implementing` label. * Ensure PR is not draft. - * Sync `.fork-info.json` with issue + PR numbers. **Fallback commands:** diff --git a/.github/prompts/plan.prompt.md b/.github/prompts/plan.prompt.md index 803155e0..0619a02e 100644 --- a/.github/prompts/plan.prompt.md +++ b/.github/prompts/plan.prompt.md @@ -12,7 +12,7 @@ $ARGUMENTS **Workflow Modes**: This command supports two modes: - **Local (default)**: Work with the current repository (origin). No special configuration needed. -- **Fork**: Contribute to an upstream repository. Reads `.fork-info.json` created by `/specify`. +- **Fork**: Contribute to an upstream repository. Detected via `git remote -v`. **Iteration Support**: This command detects whether you're creating a new plan or updating an existing one based on the presence of plan.md in the feature directory. @@ -20,11 +20,14 @@ Given the implementation details provided as an argument, do this: 1. **Set Planning label immediately**: - **Determine target repository**: - - Check if `.fork-info.json` exists in the feature directory - - If it exists: - - Validate required fields: `is_fork` (true), `upstream_owner` (non-empty), `upstream_repo` (non-empty) + - Run `git remote -v` to check configured remotes + - **If `upstream` remote exists**: Fork mode + - Parse the upstream URL to extract owner and repo name + - Example: `upstream https://github.com/PSModule/Utilities.git` → owner: `PSModule`, repo: `Utilities` - Use `upstream_owner/upstream_repo` for all GitHub operations - - If it doesn't exist, use the current repository (origin) + - **If only `origin` remote exists**: Origin mode + - Parse the origin URL to extract owner and repo name + - Use `origin_owner/origin_repo` for all GitHub operations - Get the issue number associated with the current feature branch - **Add 'Planning' label** to the issue immediately in the target repository - **Remove 'Specification' label** from the issue @@ -82,13 +85,14 @@ Given the implementation details provided as an argument, do this: 8. Create or update a Pull Request: - **Determine workflow mode and target repository**: - - Check if `.fork-info.json` exists in the feature directory (same directory as spec.md) - - **If exists** (fork mode): - - Validate required fields: `is_fork` (true), `upstream_owner` (non-empty), `upstream_repo` (non-empty) - - If validation fails, halt and instruct user: "Invalid fork configuration in `.fork-info.json`. Please run `/specify` again with complete fork information: upstream owner, upstream repo." + - Run `git remote -v` to check configured remotes + - **If `upstream` remote exists** (fork mode): + - Parse the upstream URL to extract owner and repo name + - Example: `upstream https://github.com/PSModule/Utilities.git` → owner: `PSModule`, repo: `Utilities` - Use `upstream_owner/upstream_repo` for all GitHub operations - - **If not exists** (local mode - default): - - Use the current repository (origin) for all GitHub operations + - **If only `origin` remote exists** (local mode - default): + - Parse the origin URL to extract owner and repo name + - Use `origin_owner/origin_repo` for all GitHub operations - **Determine PR operation** (create vs update): - If PR already exists for this branch, UPDATE it - If no PR exists, CREATE a new one @@ -119,18 +123,6 @@ Given the implementation details provided as an argument, do this: * **Version/change level label**: Based on the type of change: `Major`, `Minor`, `Patch`, `Fix`, or `Docs` * **Phase label**: `Planning` (to indicate current phase) - Link the PR to the associated issue - - **After PR creation**: Update `.fork-info.json` (if it exists) with the PR number: - ```json - { - "is_fork": true, - "upstream_owner": "...", - "upstream_repo": "...", - "detected_from": "user_input", - "created_at": "...", - "issue_number": , - "pr_number": - } - ``` **GitHub Integration**: If GitHub tools or integrations are available (such as GitHub MCP Server or other GitHub integrations), use them to create/update the PR and manage labels automatically in the target repository. If not available, provide these fallback commands with the correct repository: ```bash diff --git a/.github/prompts/specify.prompt.md b/.github/prompts/specify.prompt.md index 813bce62..19b5a11f 100644 --- a/.github/prompts/specify.prompt.md +++ b/.github/prompts/specify.prompt.md @@ -12,7 +12,7 @@ $ARGUMENTS **Workflow Modes**: This command supports two modes: - **Local (default)**: Work with the current repository (origin). No special configuration needed. -- **Fork**: Contribute to an upstream repository. Requires explicit declaration with upstream owner/repo information. +- **Fork**: Contribute to an upstream repository. Automatically detected via `git remote -v`. **Iteration Support**: This command detects whether you're creating a new feature or refining an existing one based on your current branch. @@ -20,30 +20,15 @@ The text the user typed after `/specify` in the triggering message **is** the fe Given that feature description, do this: -1. **Check for fork contribution**: Analyze the user input for mentions of contributing to a fork or upstream repository. Look for phrases like: - - "fork contribution" - - "contributing to upstream" - - "fork of [owner/repo]" - - "upstream repo [owner/repo]" - - Any explicit mention of working on a fork - - If detected, extract the upstream repository information (owner/repo). - - **If fork contribution is detected but information is incomplete**, prompt the user: - - ```text - Fork contribution detected. Please provide the following information: - - Upstream organization/owner name (e.g., "microsoft", "PSModule") - - Upstream repository name (e.g., "vscode", "PSModule") - - Git remote name for upstream (optional, defaults to "upstream") - - Example: "upstream owner: PSModule, upstream repo: Utilities" - ``` - - Wait for user response and re-parse the input before proceeding. Required fields: - - `upstream_owner` (string, non-empty) - - `upstream_repo` (string, non-empty) - - `upstream_remote` (string, optional, defaults to "upstream") +1. **Detect repository mode**: + - Run `git remote -v` to check configured remotes + - **If `upstream` remote exists**: Fork mode detected + - Parse the upstream URL to extract owner and repo name + - Example: `upstream https://github.com/PSModule/Utilities.git` → owner: `PSModule`, repo: `Utilities` + - Inform user: "Fork contribution detected. Issues and PRs will target `/`" + - **If only `origin` remote exists**: Origin mode (default) + - Parse the origin URL to extract owner and repo name + - Use `origin_owner/origin_repo` for all GitHub operations 2. Analyze the feature description and generate a concise, descriptive branch name: - Extract the core concept/action from the description (2-4 words maximum) @@ -62,29 +47,9 @@ Given that feature description, do this: - If you're already on a feature branch (starts with 3 digits like `001-`, `002-`, etc.), you'll stay on that branch to iterate on the existing feature. - This allows you to refine specifications without creating multiple branches for the same feature. -4. **Store fork information (if detected in step 1)**: - - If the user indicated this is a fork contribution, create a `.fork-info.json` file in the feature directory (same location as SPEC_FILE) - - **Validate required fields before creating**: - - `upstream_owner` must be non-empty string - - `upstream_repo` must be non-empty string - - If validation fails, return to step 1 for clarification - - The file should contain: - ```json - { - "is_fork": true, - "upstream_owner": "", - "upstream_repo": "", - "upstream_remote": "", - "detected_from": "user_input", - "created_at": "" - } - ``` - - This file will be used by `/plan` and `/implement` commands to create issues and PRs in the correct repository - - If fork information was detected, inform the user: "Fork contribution detected. Issues and PRs will target `/`" - -5. Load [`.specify/templates/spec-template.md`](../../.specify/templates/spec-template.md) to understand required sections. - -6. **Write or update the specification**: +4. Load [`.specify/templates/spec-template.md`](../../.specify/templates/spec-template.md) to understand required sections. + +5. **Write or update the specification**: - **If IS_EXISTING_BRANCH is false** (new feature on main branch): - Write a new specification to SPEC_FILE using the template structure - Replace placeholders with concrete details derived from the feature description @@ -102,14 +67,10 @@ Given that feature description, do this: - Maintain the template structure and section order - The goal is evolution, not replacement - build upon the existing spec rather than starting over -7. Create or update a GitHub issue for this feature: - - **Determine target repository**: - - Check if `.fork-info.json` exists in the feature directory - - If it exists: - - Validate required fields: `is_fork` (true), `upstream_owner` (non-empty), `upstream_repo` (non-empty) - - If validation fails, prompt user for correct information (see step 1) - - Use `upstream_owner/upstream_repo` for all GitHub operations - - If it doesn't exist, use the current repository (origin) +6. Create or update a GitHub issue for this feature: + - **Use target repository determined in step 1**: + - If fork mode: Use `upstream_owner/upstream_repo` for all GitHub operations + - If origin mode: Use `origin_owner/origin_repo` for all GitHub operations - **Generate the issue title** in format ` [Type]: ` where: - Icon: 📖 (Docs), 🪲 (Fix), ⚠️ (Security fix), 🩹 (Patch), 🚀 (Feature/Minor), 🌟 (Breaking change/Major) - Type: Docs, Fix, Patch, Feature, or Breaking change @@ -142,8 +103,8 @@ Given that feature description, do this: gh issue edit --body-file ``` -8. **Post final status comment**: "✅ Specification complete. Ready for clarification with `/clarify` or planning with `/plan`." +7. **Post final status comment**: "✅ Specification complete. Ready for clarification with `/clarify` or planning with `/plan`." -9. Report completion with branch name, spec file path, whether it's a new or updated feature, issue number, target repository (if fork), and readiness for the next phase. +8. Report completion with branch name, spec file path, whether it's a new or updated feature, issue number, target repository (if fork), and readiness for the next phase. Note: The script handles branch creation/reuse and initializes the spec file before writing. diff --git a/.github/prompts/tasks.prompt.md b/.github/prompts/tasks.prompt.md index 8ed82218..3d086575 100644 --- a/.github/prompts/tasks.prompt.md +++ b/.github/prompts/tasks.prompt.md @@ -12,7 +12,7 @@ $ARGUMENTS **Workflow Modes**: This command supports two modes: - **Local (default)**: Work with the current repository (origin). No special configuration needed. -- **Fork**: Contribute to an upstream repository. Reads `.fork-info.json` created by `/specify`. +- **Fork**: Contribute to an upstream repository. Detected via `git remote -v`. **Iteration Support**: This command detects whether you're creating new tasks or updating existing ones based on the presence of tasks.md in the feature directory. @@ -83,13 +83,14 @@ $ARGUMENTS 8. Update the Pull Request description: - **Determine workflow mode and target repository**: - - Check if `.fork-info.json` exists in the feature directory (same location as plan.md) - - **If exists** (fork mode): - - Validate required fields: `is_fork` (true), `upstream_owner` (non-empty), `upstream_repo` (non-empty) - - If validation fails, halt and instruct user: "Invalid fork configuration in `.fork-info.json`. Please run `/specify` again with complete fork information: upstream owner, upstream repo." + - Run `git remote -v` to check configured remotes + - **If `upstream` remote exists** (fork mode): + - Parse the upstream URL to extract owner and repo name + - Example: `upstream https://github.com/PSModule/Utilities.git` → owner: `PSModule`, repo: `Utilities` - Use `upstream_owner/upstream_repo` for all GitHub operations - - **If not exists** (local mode - default): - - Use the current repository (origin) for all GitHub operations + - **If only `origin` remote exists** (local mode - default): + - Parse the origin URL to extract owner and repo name + - Use `origin_owner/origin_repo` for all GitHub operations - Append or update the tasks.md content in the existing PR description - Format tasks with checkboxes for each task phase: * Setup: `- [ ] T001: Task description` diff --git a/README.md b/README.md index 1eabffd4..c273f502 100644 --- a/README.md +++ b/README.md @@ -373,18 +373,26 @@ Build: ### Example 3 - Configuring the Repository Linter -This example shows how to configure the repository linter to skip certain validations or disable the linter entirely. +The workflow uses [super-linter](https://github.com/super-linter/super-linter) to lint your repository code. +The linter runs on pull requests and provides status updates directly in the PR. + +#### Disabling the Linter + +You can skip repository linting entirely: ```yaml -# Skip the linter entirely Linter: Skip: true ``` +#### Configuring Linter Validation Rules + +The workflow supports all environment variables that super-linter provides. You can configure these through the `Linter.env` object: + ```yaml -# Disable specific linter validations Linter: env: + # Disable specific validations VALIDATE_BIOME_FORMAT: false VALIDATE_BIOME_LINT: false VALIDATE_GITHUB_ACTIONS_ZIZMOR: false @@ -392,9 +400,29 @@ Linter: VALIDATE_JSON_PRETTIER: false VALIDATE_MARKDOWN_PRETTIER: false VALIDATE_YAML_PRETTIER: false + + # Or enable only specific validations + VALIDATE_YAML: true + VALIDATE_JSON: true + VALIDATE_MARKDOWN: true ``` -For a complete list of available linter environment variables, see the [super-linter documentation](https://github.com/super-linter/super-linter#environment-variables). +#### Additional Configuration + +Any super-linter environment variable can be set through the `Linter.env` object: + +```yaml +Linter: + env: + LOG_LEVEL: DEBUG + FILTER_REGEX_EXCLUDE: '.*test.*' + VALIDATE_ALL_CODEBASE: false +``` + +**Note:** The `GITHUB_TOKEN` is automatically provided by the workflow to enable status updates in pull requests. + +For a complete list of available environment variables and configuration options, see the +[super-linter environment variables documentation](https://github.com/super-linter/super-linter#environment-variables). ## Specifications and practices From ecd6ab843b1b5765e5b80ca2b9d76237bc5ce622 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 5 Oct 2025 20:23:38 +0200 Subject: [PATCH 10/25] docs(prompts): improve change type detection in /pr prompt - Add instruction to check ALL changes in the branch using git diff - Ensure Docs label is only applied when ALL changes are documentation - Clarify that mixed changes should be classified by code changes, not docs - Use git diff origin/main...HEAD to analyze complete branch changes --- .github/prompts/pr.prompt.md | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/prompts/pr.prompt.md b/.github/prompts/pr.prompt.md index 6c24450d..876edf37 100644 --- a/.github/prompts/pr.prompt.md +++ b/.github/prompts/pr.prompt.md @@ -33,12 +33,17 @@ $ARGUMENTS 2. **Determine the change type**: 1. Parse the user input to identify the change type (Major, Minor, Patch, Fix, or Docs) - 2. If nothing is provided, evaluate the code changes to infer the type: - - **Major**: Changes that break backward compatibility (e.g., removing public APIs, changing method signatures) - - **Minor**: New features or enhancements that do not break existing functionality - - **Patch**: Bug fixes or small improvements that do not add new features - - **Fix**: Specifically for bug fixes - - **Docs**: Only documentation changes + 2. If nothing is provided, **analyze ALL changes in the branch** to infer the type: + - Run `git diff origin/main...HEAD --name-only` to get all changed files in the branch + - Read the diff content using `git diff origin/main...HEAD` to understand the nature of changes + - Categorize based on ALL changes combined, not just recent commits: + * **Docs**: ONLY if ALL changes are to documentation files (*.md, docs/, .github/prompts/, etc.) with no code/functionality changes + * **Fix**: If changes specifically fix bugs without adding new features + * **Patch**: Small fixes or improvements that do not add new features + * **Minor**: New features or enhancements that do not break existing functionality + * **Major**: Changes that break backward compatibility (e.g., removing public APIs, changing method signatures) + - **Important**: If the branch contains BOTH code changes AND documentation changes, classify based on the code changes, not the documentation + - **Important**: Check the entire branch diff, not just uncommitted changes or the last commit 3. **Get current branch information**: - Determine the current branch name From 272019a934bf37889163d35bf091d2e1b035eea3 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 5 Oct 2025 20:32:31 +0200 Subject: [PATCH 11/25] =?UTF-8?q?=F0=9F=93=9D[Cleanup]:=20Remove=20redunda?= =?UTF-8?q?nt=20environment=20listing=20step=20from=20workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/workflow.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 3b85c788..ea5b2c3f 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -126,10 +126,6 @@ jobs: "$key=$value" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append } - - name: List all envs - run: | - Get-ChildItem env: | Format-Table -AutoSize - - name: Lint code base uses: super-linter/super-linter@7bba2eeb89d01dc9bfd93c497477a57e72c83240 # v8.2.0 env: From 0316e9cdc6edf7a3cc9b926433a4f76ae45e6d42 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 5 Oct 2025 20:33:33 +0200 Subject: [PATCH 12/25] =?UTF-8?q?=F0=9F=93=9D[Fix]:=20Update=20linter=20en?= =?UTF-8?q?vironment=20variables=20to=20use=20boolean=20values=20instead?= =?UTF-8?q?=20of=20strings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/srcWithManifestTestRepo/.github/PSModule.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/srcWithManifestTestRepo/.github/PSModule.yml b/tests/srcWithManifestTestRepo/.github/PSModule.yml index 3303a7f8..ceaf2ff0 100644 --- a/tests/srcWithManifestTestRepo/.github/PSModule.yml +++ b/tests/srcWithManifestTestRepo/.github/PSModule.yml @@ -14,9 +14,9 @@ Publish: Linter: env: VALIDATE_BIOME_FORMAT: false - VALIDATE_BIOME_LINT: 'false' - VALIDATE_GITHUB_ACTIONS_ZIZMOR: 'false' - VALIDATE_JSCPD: 'false' - VALIDATE_JSON_PRETTIER: 'false' - VALIDATE_MARKDOWN_PRETTIER: 'false' - VALIDATE_YAML_PRETTIER: 'false' + VALIDATE_BIOME_LINT: false + VALIDATE_GITHUB_ACTIONS_ZIZMOR: false + VALIDATE_JSCPD: false + VALIDATE_JSON_PRETTIER: false + VALIDATE_MARKDOWN_PRETTIER: false + VALIDATE_YAML_PRETTIER: false From 5ecbfea898311055eb440c7e2b0079181b8e3ed3 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 5 Oct 2025 20:37:54 +0200 Subject: [PATCH 13/25] =?UTF-8?q?=F0=9F=93=9D[Enhancement]:=20Clarify=20re?= =?UTF-8?q?pository=20mode=20operations=20and=20improve=20PR=20creation=20?= =?UTF-8?q?steps=20in=20prompt=20documentation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/prompts/pr.prompt.md | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/.github/prompts/pr.prompt.md b/.github/prompts/pr.prompt.md index 876edf37..dc6dcc52 100644 --- a/.github/prompts/pr.prompt.md +++ b/.github/prompts/pr.prompt.md @@ -26,8 +26,11 @@ $ARGUMENTS 1. **Detect repository mode**: - Run `git remote -v` to check configured remotes. - - **If `upstream` remote exists**: Fork mode - use upstream owner/repo for all GitHub operations - - **If only `origin` remote exists**: Origin mode - use origin owner/repo for all GitHub operations + - **If `upstream` remote exists**: Fork mode + - Use `upstream` owner/repo for all GitHub operations (PRs, Issues, labels) + - Use `origin` for all git operations (push, fetch) + - **If only `origin` remote exists**: Origin mode + - Use `origin` owner/repo for all operations (both git push and GitHub operations) - Parse the URLs to extract owner and repo name: `https://github.com//.git`. - If in doubt, ask the user to clarify which repository to target. @@ -48,11 +51,11 @@ $ARGUMENTS 3. **Get current branch information**: - Determine the current branch name - Verify there are changes to commit (if uncommitted changes exist, stage and commit them first) - - Push the branch to remote if not already pushed. + - Push the branch to `origin` remote if not already pushed (always push to origin, even in fork mode). 4. **Retrieve linked issue information** (if available): - Attempt to find the GitHub issue number associated with the current branch - - If found, retrieve the issue title from the target repository + - If found, retrieve the issue title from the **target repository** (upstream in fork mode, origin otherwise) - Use the issue title as the PR title (with appropriate icon prefix) - If no issue is found, ask the user to provide one of the following: - the number of the issue to link to the PR @@ -80,20 +83,21 @@ $ARGUMENTS - Avoid implementation details unless necessary for understanding 7. **Create or update the pull request**: - - **Check if PR already exists** for this branch in the target repository + - **Check if PR already exists** for this branch in the **target repository** (upstream in fork mode, origin otherwise) - **If PR exists**: Update the title, description, and labels - - **If PR does not exist**: Create a new PR - - Set PR to target the default branch (main/master) + - **If PR does not exist**: Create a new PR from your fork's branch to the target repository's default branch + - In fork mode, the PR will be from `:` to `:` + - Set PR to target the default branch (main/master) of the target repository - Open as a **draft PR** (or keep as draft if updating) - - **Use GitHub MCP tools** to perform these operations: + - **Use GitHub MCP tools** to perform these operations in the **target repository**: ``` - # Create PR (if not exists) + # Create PR (if not exists) - owner/repo should be target repository mcp_github_github_create_pull_request - # Update PR (if exists) + # Update PR (if exists) - owner/repo should be target repository mcp_github_github_update_pull_request - # Add labels to PR + # Add labels to PR - owner/repo should be target repository mcp_github_github_add_labels_to_issue (PRs are issues in GitHub API) ``` @@ -101,7 +105,7 @@ $ARGUMENTS - Add the **change type label** based on the type specified (Major, Minor, Patch, Fix, or Docs) - For Fix type, add both `Fix` and `Patch` labels - If currently in a feature workflow phase (e.g., Planning, Implementation), also apply that phase label - - Use GitHub MCP to add labels in the target repository + - Use GitHub MCP to add labels in the **target repository** (upstream in fork mode, origin otherwise) 9. **Confirm completion**: - Display the PR URL to the user @@ -117,6 +121,9 @@ $ARGUMENTS - `/PR Patch` - Create a PR for small improvements **Notes**: +- Changes are always pushed to `origin` remote +- In fork mode, PRs and Issue operations are performed on the `upstream` repository +- In origin mode, all operations use the `origin` repository - This command commits and pushes changes if there are uncommitted changes - The PR is always created as a draft to allow for review before marking as ready - Labels can be manually adjusted after PR creation if needed From bfb31fbee91d046b3ac053fa8ce4f64d23d47e15 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 5 Oct 2025 20:42:00 +0200 Subject: [PATCH 14/25] Update /pr prompt to always stage, commit, and push changes --- .github/prompts/pr.prompt.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/prompts/pr.prompt.md b/.github/prompts/pr.prompt.md index dc6dcc52..386b7cd8 100644 --- a/.github/prompts/pr.prompt.md +++ b/.github/prompts/pr.prompt.md @@ -48,10 +48,14 @@ $ARGUMENTS - **Important**: If the branch contains BOTH code changes AND documentation changes, classify based on the code changes, not the documentation - **Important**: Check the entire branch diff, not just uncommitted changes or the last commit -3. **Get current branch information**: - - Determine the current branch name - - Verify there are changes to commit (if uncommitted changes exist, stage and commit them first) - - Push the branch to `origin` remote if not already pushed (always push to origin, even in fork mode). +3. **Stage, commit, and push all changes**: + - **ALWAYS run these commands before creating/updating the PR**: + 1. `git add .` - Stage all changes (tracked and untracked files) + 2. Check if there are staged changes with `git diff --cached --quiet` + 3. If there are staged changes, commit with: `git commit -m "Update for PR"` + 4. `git push origin ` - Push to origin remote (even in fork mode) + - This ensures the PR reflects all local changes + - Get the current branch name for the push command 4. **Retrieve linked issue information** (if available): - Attempt to find the GitHub issue number associated with the current branch @@ -121,10 +125,10 @@ $ARGUMENTS - `/PR Patch` - Create a PR for small improvements **Notes**: +- **This command always stages all changes (`git add .`), commits if needed, and pushes to origin before creating/updating the PR** - Changes are always pushed to `origin` remote - In fork mode, PRs and Issue operations are performed on the `upstream` repository - In origin mode, all operations use the `origin` repository -- This command commits and pushes changes if there are uncommitted changes - The PR is always created as a draft to allow for review before marking as ready - Labels can be manually adjusted after PR creation if needed - The description should be written from the user's perspective, focusing on impact not implementation From 59060960daef5b25ce03a531f2c9bda348bddeec Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 5 Oct 2025 20:47:19 +0200 Subject: [PATCH 15/25] =?UTF-8?q?=F0=9F=93=9D[Fix]:=20Update=20linter=20en?= =?UTF-8?q?vironment=20variable=20handling=20to=20improve=20JSON=20parsing?= =?UTF-8?q?=20and=20output=20formatting?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/workflow.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index ea5b2c3f..cb590c19 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -111,9 +111,12 @@ jobs: - name: Load dynamic envs env: - RAW_JSON: ${{ toJson(fromJson(needs.Get-Settings.outputs.Settings).Linter.env) }} + RAW_JSON: ${{ toJson(fromJson(needs.Get-Settings.outputs.Settings).Linter) }} run: | - $map = $env:RAW_JSON | ConvertFrom-Json -AsHashtable + $env:RAW_JSON + $linter = $env:RAW_JSON | ConvertFrom-Json -AsHashtable + $env = $linter.env + Write-Host "$($env | Format-Table -AutoSize | Out-String)" foreach ($key in $map.Keys) { $value = $map[$key] @@ -122,6 +125,8 @@ jobs: $value = $value.ToString().ToLower() } + Write-Host "$key = $value" + # Persist for following steps in this job "$key=$value" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append } From fa11f8b4b0cd3a38430b7c895e2723d718d2eec8 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 5 Oct 2025 20:50:07 +0200 Subject: [PATCH 16/25] =?UTF-8?q?=F0=9F=93=9D[Fix]:=20Update=20linter=20en?= =?UTF-8?q?vironment=20variable=20handling=20to=20use=20correct=20keys=20f?= =?UTF-8?q?or=20improved=20processing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/workflow.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index cb590c19..893d07a4 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -118,8 +118,8 @@ jobs: $env = $linter.env Write-Host "$($env | Format-Table -AutoSize | Out-String)" - foreach ($key in $map.Keys) { - $value = $map[$key] + foreach ($key in $env.Keys) { + $value = $env[$key] if ($value -is [bool]) { $value = $value.ToString().ToLower() From 30dee941895c7e6f8e1e6e18fc4c882c44fce74a Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 5 Oct 2025 20:51:28 +0200 Subject: [PATCH 17/25] =?UTF-8?q?=F0=9F=93=9D[Fix]:=20Refactor=20environme?= =?UTF-8?q?nt=20variable=20handling=20to=20use=20SETTINGS=20for=20improved?= =?UTF-8?q?=20linter=20configuration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/workflow.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 893d07a4..324cd9da 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -111,12 +111,13 @@ jobs: - name: Load dynamic envs env: - RAW_JSON: ${{ toJson(fromJson(needs.Get-Settings.outputs.Settings).Linter) }} + SETTINGS: ${{ needs.Get-Settings.outputs.Settings }} run: | - $env:RAW_JSON - $linter = $env:RAW_JSON | ConvertFrom-Json -AsHashtable + $env:SETTINGS + $settings = $env:SETTINGS | ConvertFrom-Json -AsHashtable + $linter = $settings.Linter $env = $linter.env - Write-Host "$($env | Format-Table -AutoSize | Out-String)" + $env foreach ($key in $env.Keys) { $value = $env[$key] From 3fd9bc2fe6f07a1ac2d584684ff5ff5ffd2d029b Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 5 Oct 2025 20:57:11 +0200 Subject: [PATCH 18/25] =?UTF-8?q?=F0=9F=93=9D[Fix]:=20Improve=20logging=20?= =?UTF-8?q?of=20settings=20loading=20in=20super-linter=20configuration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/workflow.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 324cd9da..3da1a05f 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -113,20 +113,17 @@ jobs: env: SETTINGS: ${{ needs.Get-Settings.outputs.Settings }} run: | - $env:SETTINGS + Write-Host "Loading settings for super-linter:" $settings = $env:SETTINGS | ConvertFrom-Json -AsHashtable - $linter = $settings.Linter - $env = $linter.env - $env - foreach ($key in $env.Keys) { - $value = $env[$key] + foreach ($key in $settings.Linter.env.Keys) { + $value = $settings.Linter.env[$key] if ($value -is [bool]) { $value = $value.ToString().ToLower() } - Write-Host "$key = $value" + Write-Host " $key = $value" # Persist for following steps in this job "$key=$value" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append From c994a0b4edc7160d0c350dfe1837be1bd42094e5 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 5 Oct 2025 21:04:11 +0200 Subject: [PATCH 19/25] Update .github/workflows/workflow.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 3da1a05f..009a434d 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -132,7 +132,7 @@ jobs: - name: Lint code base uses: super-linter/super-linter@7bba2eeb89d01dc9bfd93c497477a57e72c83240 # v8.2.0 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ github.token }} # Runs on: # - ✅ Open/Updated PR - Builds module for testing From 53a416c0c63d541e41c7d31fcab36be764dd63ad Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 5 Oct 2025 21:07:16 +0200 Subject: [PATCH 20/25] =?UTF-8?q?=F0=9F=93=9D[Fix]:=20Enhance=20repository?= =?UTF-8?q?=20handling=20instructions=20across=20prompts=20for=20clarity?= =?UTF-8?q?=20and=20consistency?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/prompts/implement.prompt.md | 12 ++++++------ .github/prompts/plan.prompt.md | 28 ++++++++++++++-------------- .github/prompts/specify.prompt.md | 20 ++++++++++---------- .github/prompts/tasks.prompt.md | 16 ++++++++-------- 4 files changed, 38 insertions(+), 38 deletions(-) diff --git a/.github/prompts/implement.prompt.md b/.github/prompts/implement.prompt.md index 3d3029f3..93390842 100644 --- a/.github/prompts/implement.prompt.md +++ b/.github/prompts/implement.prompt.md @@ -25,14 +25,14 @@ $ARGUMENTS 1. **Set Implementing label immediately** - **Determine target repository**: - - Run `git remote -v` to check configured remotes + - Run `git remote -v` to check configured remotes. - **If `upstream` remote exists**: Fork mode - - Parse the upstream URL to extract owner and repo name - - Example: `upstream https://github.com/PSModule/Utilities.git` → owner: `PSModule`, repo: `Utilities` - - Use `upstream_owner/upstream_repo` for all GitHub operations + - Use `upstream` owner/repo for all GitHub operations (PRs, Issues, labels) + - Use `origin` for all git operations (push, fetch) - **If only `origin` remote exists**: Origin mode - - Parse the origin URL to extract owner and repo name - - Use `origin_owner/origin_repo` for all GitHub operations + - Use `origin` owner/repo for all operations (both git push and GitHub operations) + - Parse the URLs to extract owner and repo name: `https://github.com//.git`. + - If in doubt, ask the user to clarify which repository to target. - Get the issue number associated with the current feature branch. - **Add `Implementing` label** to the issue and PR immediately in the target repository. - **Remove `Planning` label** from the issue and PR. diff --git a/.github/prompts/plan.prompt.md b/.github/prompts/plan.prompt.md index 0619a02e..5fda97f5 100644 --- a/.github/prompts/plan.prompt.md +++ b/.github/prompts/plan.prompt.md @@ -20,14 +20,14 @@ Given the implementation details provided as an argument, do this: 1. **Set Planning label immediately**: - **Determine target repository**: - - Run `git remote -v` to check configured remotes + - Run `git remote -v` to check configured remotes. - **If `upstream` remote exists**: Fork mode - - Parse the upstream URL to extract owner and repo name - - Example: `upstream https://github.com/PSModule/Utilities.git` → owner: `PSModule`, repo: `Utilities` - - Use `upstream_owner/upstream_repo` for all GitHub operations + - Use `upstream` owner/repo for all GitHub operations (PRs, Issues, labels) + - Use `origin` for all git operations (push, fetch) - **If only `origin` remote exists**: Origin mode - - Parse the origin URL to extract owner and repo name - - Use `origin_owner/origin_repo` for all GitHub operations + - Use `origin` owner/repo for all operations (both git push and GitHub operations) + - Parse the URLs to extract owner and repo name: `https://github.com//.git`. + - If in doubt, ask the user to clarify which repository to target. - Get the issue number associated with the current feature branch - **Add 'Planning' label** to the issue immediately in the target repository - **Remove 'Specification' label** from the issue @@ -85,14 +85,14 @@ Given the implementation details provided as an argument, do this: 8. Create or update a Pull Request: - **Determine workflow mode and target repository**: - - Run `git remote -v` to check configured remotes - - **If `upstream` remote exists** (fork mode): - - Parse the upstream URL to extract owner and repo name - - Example: `upstream https://github.com/PSModule/Utilities.git` → owner: `PSModule`, repo: `Utilities` - - Use `upstream_owner/upstream_repo` for all GitHub operations - - **If only `origin` remote exists** (local mode - default): - - Parse the origin URL to extract owner and repo name - - Use `origin_owner/origin_repo` for all GitHub operations + - Run `git remote -v` to check configured remotes. + - **If `upstream` remote exists**: Fork mode + - Use `upstream` owner/repo for all GitHub operations (PRs, Issues, labels) + - Use `origin` for all git operations (push, fetch) + - **If only `origin` remote exists**: Origin mode + - Use `origin` owner/repo for all operations (both git push and GitHub operations) + - Parse the URLs to extract owner and repo name: `https://github.com//.git`. + - If in doubt, ask the user to clarify which repository to target. - **Determine PR operation** (create vs update): - If PR already exists for this branch, UPDATE it - If no PR exists, CREATE a new one diff --git a/.github/prompts/specify.prompt.md b/.github/prompts/specify.prompt.md index 19b5a11f..0f0d7447 100644 --- a/.github/prompts/specify.prompt.md +++ b/.github/prompts/specify.prompt.md @@ -21,14 +21,14 @@ The text the user typed after `/specify` in the triggering message **is** the fe Given that feature description, do this: 1. **Detect repository mode**: - - Run `git remote -v` to check configured remotes - - **If `upstream` remote exists**: Fork mode detected - - Parse the upstream URL to extract owner and repo name - - Example: `upstream https://github.com/PSModule/Utilities.git` → owner: `PSModule`, repo: `Utilities` - - Inform user: "Fork contribution detected. Issues and PRs will target `/`" - - **If only `origin` remote exists**: Origin mode (default) - - Parse the origin URL to extract owner and repo name - - Use `origin_owner/origin_repo` for all GitHub operations + - Run `git remote -v` to check configured remotes. + - **If `upstream` remote exists**: Fork mode + - Use `upstream` owner/repo for all GitHub operations (PRs, Issues, labels) + - Use `origin` for all git operations (push, fetch) + - **If only `origin` remote exists**: Origin mode + - Use `origin` owner/repo for all operations (both git push and GitHub operations) + - Parse the URLs to extract owner and repo name: `https://github.com//.git`. + - If in doubt, ask the user to clarify which repository to target. 2. Analyze the feature description and generate a concise, descriptive branch name: - Extract the core concept/action from the description (2-4 words maximum) @@ -69,8 +69,8 @@ Given that feature description, do this: 6. Create or update a GitHub issue for this feature: - **Use target repository determined in step 1**: - - If fork mode: Use `upstream_owner/upstream_repo` for all GitHub operations - - If origin mode: Use `origin_owner/origin_repo` for all GitHub operations + - If fork mode: Use `upstream` owner/repo for all GitHub operations (PRs, Issues, labels) + - If origin mode: Use `origin` owner/repo for all operations (both git push and GitHub operations) - **Generate the issue title** in format ` [Type]: ` where: - Icon: 📖 (Docs), 🪲 (Fix), ⚠️ (Security fix), 🩹 (Patch), 🚀 (Feature/Minor), 🌟 (Breaking change/Major) - Type: Docs, Fix, Patch, Feature, or Breaking change diff --git a/.github/prompts/tasks.prompt.md b/.github/prompts/tasks.prompt.md index 3d086575..3cfc71d0 100644 --- a/.github/prompts/tasks.prompt.md +++ b/.github/prompts/tasks.prompt.md @@ -83,14 +83,14 @@ $ARGUMENTS 8. Update the Pull Request description: - **Determine workflow mode and target repository**: - - Run `git remote -v` to check configured remotes - - **If `upstream` remote exists** (fork mode): - - Parse the upstream URL to extract owner and repo name - - Example: `upstream https://github.com/PSModule/Utilities.git` → owner: `PSModule`, repo: `Utilities` - - Use `upstream_owner/upstream_repo` for all GitHub operations - - **If only `origin` remote exists** (local mode - default): - - Parse the origin URL to extract owner and repo name - - Use `origin_owner/origin_repo` for all GitHub operations + - Run `git remote -v` to check configured remotes. + - **If `upstream` remote exists**: Fork mode + - Use `upstream` owner/repo for all GitHub operations (PRs, Issues, labels) + - Use `origin` for all git operations (push, fetch) + - **If only `origin` remote exists**: Origin mode + - Use `origin` owner/repo for all operations (both git push and GitHub operations) + - Parse the URLs to extract owner and repo name: `https://github.com//.git`. + - If in doubt, ask the user to clarify which repository to target. - Append or update the tasks.md content in the existing PR description - Format tasks with checkboxes for each task phase: * Setup: `- [ ] T001: Task description` From 9df258fec729d763c981c406eb1d7b1aff53c8fc Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 5 Oct 2025 21:18:07 +0200 Subject: [PATCH 21/25] docs(prompts): standardize PR description format for automated releases - Updated /pr prompt to use consistent ordered list structure - PR descriptions now follow: 1) summary paragraph, 2) issue links, 3) detailed sections - Added clear guidance for release note formatting - Included example structure to illustrate proper format Fixes #218 --- .github/prompts/pr.prompt.md | 65 +++++++++++++++++++++++++++++------- 1 file changed, 53 insertions(+), 12 deletions(-) diff --git a/.github/prompts/pr.prompt.md b/.github/prompts/pr.prompt.md index 386b7cd8..a1d1c9bb 100644 --- a/.github/prompts/pr.prompt.md +++ b/.github/prompts/pr.prompt.md @@ -69,22 +69,60 @@ $ARGUMENTS 5. **Generate PR title**: - **If issue title retrieved**: Use format ` ` - Examples: - - `🚀 Add support for custom module templates` + - `🚀 [Feature]: Add support for custom module templates` - `🪲 [Fix]: Resolve null reference in parameter validation` - `📖 [Docs]: Update installation guide with prerequisites` 6. **Generate release note style description**: - - Start with a concise summary paragraph describing **what changes for the user** of the code - - Focus on user-facing impact, not implementation details + - The PR description will be used automatically as the release note in an automated release + - Use this exact structure (ordered list format): + + **1. Leading Paragraph (Summary)** + - Write a concise paragraph describing **what changes for the user** of the solution + - Focus on user-facing value and impact, not implementation details - Use present tense and active voice - - Structure: - * **Leading paragraph**: Clear summary of the change and its benefit to users - * **If issue linked**: Add `- Fixes #` after the leading paragraph - * **Optional additional context**: Briefly explain why this change was needed - * **What's Changed**: Bullet points of key changes (user-facing) - - Keep it concise - this should read like a release note entry - - DO NOT add a title or heading before the leading paragraph - - Avoid implementation details unless necessary for understanding + - Audience: Users of the solution (not developers) + + **2. Issue Links (Unordered List)** + - Add one or more issue links as unordered list items + - Format: `- Fixes #` + - If multiple issues: `- Fixes #`, `- Fixes #` + + **3. Details (Sections with Headers)** + - For each significant change, add a header (e.g., `## Configuration`, `## Breaking Changes`, `## Usage`) + - Under each header, provide: + * Details of what changed + * What the user needs to change or do differently (if anything) + * Examples or code snippets if helpful for understanding + - Keep sections concise and user-focused + - Avoid implementation details unless necessary for user understanding + + **Example Structure:** + ````markdown + The workflow now provides fine-grained control over repository linting behavior through simple configuration options. You can disable the linter entirely or customize which validations run by configuring super-linter environment variables directly in your settings file. + + - Fixes #218 + + ## Configure settings for repository linting + + You can now control the linter behavior via the `Linter` section in your `.settings.yml` file. This allows you to skip linting altogether or customize which validations are performed. + + Added `Linter.Skip` and `Linter.env` settings to control linter behavior. You can now disable the linter entirely or customize which validations run. + + To disable the linter: + ```yaml + Linter: + Skip: true + ``` + + To customize validations: + ```yaml + Linter: + env: + VALIDATE_JSCPD: false + ``` + + ```` 7. **Create or update the pull request**: - **Check if PR already exists** for this branch in the **target repository** (upstream in fork mode, origin otherwise) @@ -131,4 +169,7 @@ $ARGUMENTS - In origin mode, all operations use the `origin` repository - The PR is always created as a draft to allow for review before marking as ready - Labels can be manually adjusted after PR creation if needed -- The description should be written from the user's perspective, focusing on impact not implementation +- **The PR description uses a structured format designed for automated release notes**: + 1. Leading paragraph (user-focused summary) + 2. Issue links (unordered list) + 3. Details (sections with headers explaining changes and user actions needed) From d26a09595eec38e99db6662c4210e274ace0b158 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 5 Oct 2025 21:24:43 +0200 Subject: [PATCH 22/25] =?UTF-8?q?=F0=9F=93=9D[Fix]:=20Refactor=20linter=20?= =?UTF-8?q?environment=20variable=20handling=20for=20improved=20clarity=20?= =?UTF-8?q?and=20security?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/workflow.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 009a434d..bebe3517 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -115,15 +115,17 @@ jobs: run: | Write-Host "Loading settings for super-linter:" $settings = $env:SETTINGS | ConvertFrom-Json -AsHashtable + $linter = $settings.Linter + $env = $linter.env - foreach ($key in $settings.Linter.env.Keys) { - $value = $settings.Linter.env[$key] + foreach ($key in $env.Keys) { + $value = $env[$key] if ($value -is [bool]) { $value = $value.ToString().ToLower() } - Write-Host " $key = $value" + Write-Host "$key = $value" # Persist for following steps in this job "$key=$value" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append @@ -132,7 +134,7 @@ jobs: - name: Lint code base uses: super-linter/super-linter@7bba2eeb89d01dc9bfd93c497477a57e72c83240 # v8.2.0 env: - GITHUB_TOKEN: ${{ github.token }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Runs on: # - ✅ Open/Updated PR - Builds module for testing From c4d0a553a6a4c18d7489cfb9e17082b20794c657 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 5 Oct 2025 21:36:50 +0200 Subject: [PATCH 23/25] =?UTF-8?q?=F0=9F=93=9D[Fix]:=20Add=20linter=20confi?= =?UTF-8?q?guration=20to=20skip=20linting=20in=20test=20repository=20and?= =?UTF-8?q?=20improve=20settings=20loading=20in=20workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/workflow.yml | 2 ++ tests/srcTestRepo/.github/PSModule.yml | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 tests/srcTestRepo/.github/PSModule.yml diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index bebe3517..07d139c2 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -114,9 +114,11 @@ jobs: SETTINGS: ${{ needs.Get-Settings.outputs.Settings }} run: | Write-Host "Loading settings for super-linter:" + $env:SETTINGS $settings = $env:SETTINGS | ConvertFrom-Json -AsHashtable $linter = $settings.Linter $env = $linter.env + $env foreach ($key in $env.Keys) { $value = $env[$key] diff --git a/tests/srcTestRepo/.github/PSModule.yml b/tests/srcTestRepo/.github/PSModule.yml new file mode 100644 index 00000000..2607ddb5 --- /dev/null +++ b/tests/srcTestRepo/.github/PSModule.yml @@ -0,0 +1,2 @@ +Linter: + Skip: true From 0ab1adb4703ad475a66e8f6936b5ad8d3638135c Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 5 Oct 2025 21:43:42 +0200 Subject: [PATCH 24/25] =?UTF-8?q?=F0=9F=93=9D[Fix]:=20Correct=20typo=20in?= =?UTF-8?q?=20PR=20prompt=20documentation=20and=20enhance=20clarity=20in?= =?UTF-8?q?=20execution=20steps?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/prompts/pr.prompt.md | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/.github/prompts/pr.prompt.md b/.github/prompts/pr.prompt.md index a1d1c9bb..28cf821d 100644 --- a/.github/prompts/pr.prompt.md +++ b/.github/prompts/pr.prompt.md @@ -19,7 +19,7 @@ $ARGUMENTS | Major | 🌟 | `Major` | Breaking changes that affect compatibility | | Minor | 🚀 | `Minor` | New features or enhancements | | Patch | 🩹 | `Patch` | Small fixes or improvements | -| Fix | 🪲 | `Fix`, `Patch` | Bug fixes | +| Fix | 🪲 | `Fix`, `Patch` | Bugfixes | | Docs | 📖 | `Docs` | Documentation changes only | ## Execution Steps @@ -132,16 +132,9 @@ $ARGUMENTS - Set PR to target the default branch (main/master) of the target repository - Open as a **draft PR** (or keep as draft if updating) - **Use GitHub MCP tools** to perform these operations in the **target repository**: - ``` - # Create PR (if not exists) - owner/repo should be target repository - mcp_github_github_create_pull_request - - # Update PR (if exists) - owner/repo should be target repository - mcp_github_github_update_pull_request - - # Add labels to PR - owner/repo should be target repository - mcp_github_github_add_labels_to_issue (PRs are issues in GitHub API) - ``` + - Create PR (if not exists) - owner/repo should be target repository, use `mcp_github_github_create_pull_request` + - Update PR (if exists) - owner/repo should be target repository, use `mcp_github_github_update_pull_request` + - Add labels to PR - owner/repo should be target repository, use `mcp_github_github_add_labels_to_issue` (PRs are issues in GitHub API) 8. **Apply labels to the PR**: - Add the **change type label** based on the type specified (Major, Minor, Patch, Fix, or Docs) @@ -154,15 +147,17 @@ $ARGUMENTS - Summarize the PR title, type, and labels applied - If in fork mode, remind the user that the PR was created in the upstream repository -**Example Usage**: +## Example usage + - `/PR` - Create a PR for the current changes - `/PR Minor` - Create a PR for a new feature -- `/PR Fix` - Create a PR for a bug fix +- `/PR Fix` - Create a PR for a bugfix - `/PR Docs` - Create a PR for documentation changes - `/PR Major` - Create a PR for breaking changes - `/PR Patch` - Create a PR for small improvements -**Notes**: +## Notes + - **This command always stages all changes (`git add .`), commits if needed, and pushes to origin before creating/updating the PR** - Changes are always pushed to `origin` remote - In fork mode, PRs and Issue operations are performed on the `upstream` repository From 108d1a2b14ecf025a4fa0de412a6553bdb783307 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 5 Oct 2025 21:46:34 +0200 Subject: [PATCH 25/25] =?UTF-8?q?=F0=9F=93=9D[Fix]:=20Update=20environment?= =?UTF-8?q?=20variable=20handling=20for=20super-linter=20and=20use=20GitHu?= =?UTF-8?q?b=20token=20directly?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/workflow.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 07d139c2..c10e9a73 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -114,11 +114,9 @@ jobs: SETTINGS: ${{ needs.Get-Settings.outputs.Settings }} run: | Write-Host "Loading settings for super-linter:" - $env:SETTINGS $settings = $env:SETTINGS | ConvertFrom-Json -AsHashtable $linter = $settings.Linter $env = $linter.env - $env foreach ($key in $env.Keys) { $value = $env[$key] @@ -136,7 +134,7 @@ jobs: - name: Lint code base uses: super-linter/super-linter@7bba2eeb89d01dc9bfd93c497477a57e72c83240 # v8.2.0 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ github.token }} # Runs on: # - ✅ Open/Updated PR - Builds module for testing