Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b0d201a2ec | ||
|
|
561955a30c
|
||
|
|
3bc7c996c0 | ||
|
|
d50ef55369
|
||
|
|
f59bc54e0d | ||
|
|
7bad284c21
|
||
|
|
e5593b1f74
|
||
|
|
49301f266b
|
||
|
|
de7f12c324
|
||
|
|
cad42ac9cf
|
||
|
|
2d09b0a7f4
|
||
|
|
d39f188ea6
|
||
|
|
aae42f7e2f
|
||
|
|
43606c5b9f
|
||
|
|
3776562fb6
|
||
|
|
48efda1071
|
||
|
|
83286ed1c3
|
No files matched your search
@@ -9,10 +9,10 @@
|
||||
],
|
||||
"rollForward": false
|
||||
},
|
||||
"dotnet-sonarscanner": {
|
||||
"version": "12.1.0",
|
||||
"cyclonedx": {
|
||||
"version": "6.3.2",
|
||||
"commands": [
|
||||
"dotnet-sonarscanner"
|
||||
"dotnet-CycloneDX"
|
||||
],
|
||||
"rollForward": false
|
||||
}
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ indent_size = 2
|
||||
[*.{g,g.i,Designer}.cs]
|
||||
generated_code = true
|
||||
|
||||
# --- ReSharper inspections: what Qodana reads (qodana.yaml, .github/workflows/qodana.yml) ---
|
||||
# --- ReSharper inspections: what Qodana reads (qodana.yaml, .gitea/workflows/qodana.yml) ---
|
||||
# Qodana for .NET runs ReSharper's engine, and the engine reads these keys; so does Rider or ReSharper in the editor,
|
||||
# which is why they are here and not in qodana.yaml: the same list everywhere. An inspection is off only where it
|
||||
# argues with a choice this project made; each line says which. Everything else it reports is fixed. (What is NOT
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
name: Announce Release
|
||||
|
||||
# Posts a release to Discord through the ops repo's announce-release.yml (which reads the release
|
||||
# from the Gitea API).
|
||||
#
|
||||
# Tag releases are announced by release.yml itself: a release created with the job token fires no
|
||||
# `release` event (Gitea credits it to its Actions user, whose events start nothing). This workflow
|
||||
# covers a release a person publishes in the UI, and re-runs: Actions → Announce Release → Run
|
||||
# workflow, with the tag.
|
||||
# Secrets: DISCORD_RELEASES_WEBHOOK (or DISCORD_REPO_WEBHOOK); optional DISCORD_PING_ROLE_ID.
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
description: Release tag to announce (e.g. v2.3.0)
|
||||
required: true
|
||||
type: string
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
announce:
|
||||
permissions:
|
||||
contents: read
|
||||
uses: poli0981/.github/.gitea/workflows/announce-release.yml@b93b3711b3049a879cfdfd515f7e72c23864da8f # ops v2026.11.5
|
||||
with:
|
||||
tag_override: ${{ inputs.tag || '' }}
|
||||
ops_ref: b93b3711b3049a879cfdfd515f7e72c23864da8f
|
||||
# Only what the shared workflow declares, not `inherit`.
|
||||
secrets:
|
||||
DISCORD_RELEASES_WEBHOOK: ${{ secrets.DISCORD_RELEASES_WEBHOOK }}
|
||||
DISCORD_REPO_WEBHOOK: ${{ secrets.DISCORD_REPO_WEBHOOK }}
|
||||
DISCORD_PING_ROLE_ID: ${{ secrets.DISCORD_PING_ROLE_ID }}
|
||||
@@ -1,5 +1,15 @@
|
||||
name: Build
|
||||
|
||||
# Build, format check, tests and a packaging smoke test on every push to main and every pull
|
||||
# request (Gitea Actions, ops runbook poli0981/.github docs/GITEA-MIGRATION.md).
|
||||
#
|
||||
# - `windows-latest` is HOST MODE on the maintainer's PC (PowerShell, no isolation): setup-dotnet
|
||||
# installs into the runner tool cache (DOTNET_INSTALL_DIR), never into C:\Program Files. NuGet
|
||||
# packages come from the PC's per-user cache, which outlives the job, so there is no actions/cache.
|
||||
# - Upstream actions/upload-artifact v4+ refuses non-GitHub servers: the Gitea fork uploads.
|
||||
# - Outsiders cannot open pull requests on Gitea (registration is off), so no run here comes from
|
||||
# a stranger's fork.
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
@@ -17,29 +27,29 @@ concurrency:
|
||||
env:
|
||||
DOTNET_NOLOGO: true
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: true
|
||||
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
|
||||
|
||||
jobs:
|
||||
build:
|
||||
# WPF (net10.0-windows) only builds on Windows.
|
||||
runs-on: windows-latest
|
||||
timeout-minutes: 20
|
||||
timeout-minutes: 30
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Keep .NET SDK installs in the runner tool cache (host mode)
|
||||
shell: pwsh
|
||||
run: |
|
||||
$base = if ($env:RUNNER_TOOL_CACHE) { $env:RUNNER_TOOL_CACHE } else { Join-Path $env:LOCALAPPDATA 'gitea-runner\toolcache' }
|
||||
"DOTNET_INSTALL_DIR=$(Join-Path $base 'dotnet')" >> $env:GITHUB_ENV
|
||||
|
||||
- uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6.1.0
|
||||
with:
|
||||
global-json-file: global.json
|
||||
|
||||
- name: Cache NuGet packages
|
||||
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||
with:
|
||||
path: ${{ env.NUGET_PACKAGES }}
|
||||
key: nuget-${{ runner.os }}-${{ hashFiles('global.json', 'Directory.Build.props', '**/*.csproj') }}
|
||||
restore-keys: nuget-${{ runner.os }}-
|
||||
|
||||
- name: Restore (NuGet audit fails on moderate+ advisories)
|
||||
run: dotnet restore CommandForge.slnx
|
||||
|
||||
@@ -58,40 +68,43 @@ jobs:
|
||||
|
||||
- name: Upload test results
|
||||
if: ${{ !cancelled() }}
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
||||
uses: christopherhx/gitea-upload-artifact@81f940d004763f986ba3582c007fd842dd5cb0d7 # v4
|
||||
with:
|
||||
name: test-results
|
||||
path: TestResults
|
||||
if-no-files-found: ignore
|
||||
retention-days: 14
|
||||
|
||||
package:
|
||||
# Publishes and packs exactly like release.yml, so a packaging regression (e.g. the Elevator
|
||||
# missing from the publish folder) fails the PR instead of the tagged release.
|
||||
# missing from the publish folder) fails the pull request instead of the tagged release.
|
||||
runs-on: windows-latest
|
||||
timeout-minutes: 30
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Keep .NET SDK installs in the runner tool cache (host mode)
|
||||
shell: pwsh
|
||||
run: |
|
||||
$base = if ($env:RUNNER_TOOL_CACHE) { $env:RUNNER_TOOL_CACHE } else { Join-Path $env:LOCALAPPDATA 'gitea-runner\toolcache' }
|
||||
"DOTNET_INSTALL_DIR=$(Join-Path $base 'dotnet')" >> $env:GITHUB_ENV
|
||||
|
||||
- uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6.1.0
|
||||
with:
|
||||
global-json-file: global.json
|
||||
|
||||
- name: Cache NuGet packages
|
||||
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||
with:
|
||||
path: ${{ env.NUGET_PACKAGES }}
|
||||
key: nuget-package-${{ runner.os }}-${{ hashFiles('global.json', 'Directory.Build.props', '**/*.csproj', '.config/dotnet-tools.json') }}
|
||||
restore-keys: nuget-package-${{ runner.os }}-
|
||||
|
||||
- name: Publish + pack (Velopack smoke test)
|
||||
shell: pwsh
|
||||
run: ./scripts/pack.ps1 -Version 0.0.1
|
||||
|
||||
- name: Upload installer preview
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
||||
uses: christopherhx/gitea-upload-artifact@81f940d004763f986ba3582c007fd842dd5cb0d7 # v4
|
||||
with:
|
||||
name: installer-preview
|
||||
path: Releases/*-Setup.exe
|
||||
if-no-files-found: error
|
||||
retention-days: 7
|
||||
@@ -0,0 +1,28 @@
|
||||
name: Notify CI Failure
|
||||
|
||||
# A failed run of the workflows below on main posts to Discord through the ops repo's
|
||||
# notify-ci-failure.yml (its script is loaded at `ops_ref`, the same commit as `uses:`). Neither file
|
||||
# checks out the triggering run's code: they read run metadata only, and the shared workflow passes
|
||||
# every untrusted field to the notifier through `env:`. Pull-request runs are skipped there (it only
|
||||
# reports the default branch). Requires the repository secret DISCORD_CI_WEBHOOK.
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["Build", "Qodana", "Security"]
|
||||
types: [completed]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
actions: read
|
||||
|
||||
jobs:
|
||||
notify:
|
||||
permissions:
|
||||
contents: read
|
||||
actions: read
|
||||
uses: poli0981/.github/.gitea/workflows/notify-ci-failure.yml@b93b3711b3049a879cfdfd515f7e72c23864da8f # ops v2026.11.5
|
||||
with:
|
||||
default_branch: main
|
||||
ops_ref: b93b3711b3049a879cfdfd515f7e72c23864da8f
|
||||
secrets:
|
||||
DISCORD_CI_WEBHOOK: ${{ secrets.DISCORD_CI_WEBHOOK }}
|
||||
@@ -0,0 +1,26 @@
|
||||
name: Notify Release Pipeline
|
||||
|
||||
# Every finished run of release.yml (success, failure or cancelled) is reported to Discord through
|
||||
# the ops repo's notify-release-pipeline.yml. It matches the producer by its exact `name:`, so
|
||||
# renaming release.yml's `name: Release` silently breaks this filter.
|
||||
# Requires the repository secret DISCORD_RELEASE_PIPELINE_WEBHOOK.
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["Release"]
|
||||
types: [completed]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
actions: read
|
||||
|
||||
jobs:
|
||||
notify:
|
||||
permissions:
|
||||
contents: read
|
||||
actions: read
|
||||
uses: poli0981/.github/.gitea/workflows/notify-release-pipeline.yml@b93b3711b3049a879cfdfd515f7e72c23864da8f # ops v2026.11.5
|
||||
with:
|
||||
ops_ref: b93b3711b3049a879cfdfd515f7e72c23864da8f
|
||||
secrets:
|
||||
DISCORD_RELEASE_PIPELINE_WEBHOOK: ${{ secrets.DISCORD_RELEASE_PIPELINE_WEBHOOK }}
|
||||
@@ -0,0 +1,46 @@
|
||||
name: Qodana
|
||||
|
||||
# JetBrains Qodana for .NET (`qodana-dotnet`, Rider's engine, on the Ultimate licence of the Qodana
|
||||
# Cloud project): ReSharper's C#, XAML and .resx inspections, the IntelliJ platform's Markdown and
|
||||
# XML inspections and JetBrains' security rules, over the whole solution. Every setting is in
|
||||
# qodana.yaml; the gate there is zero problems.
|
||||
#
|
||||
# Runs the Qodana CLI through the ops repo's reusable-qodana.yml (JetBrains/qodana-action needs
|
||||
# GitHub's APIs). Gitea has no code-scanning UI: the results go to Qodana Cloud and to the run's
|
||||
# `qodana-report` artifact (SARIF and the linter's logs, for a reader without a Qodana Cloud account).
|
||||
#
|
||||
# - Native mode on `windows-latest` (host mode on the maintainer's PC): WPF (net10.0-windows) only
|
||||
# loads on Windows, and the linter reads the projects with the SDK global.json names.
|
||||
# - The solution is built first (prepare-command), so a build that fails is one red step with the
|
||||
# compiler's own message rather than a report of unresolved symbols.
|
||||
# - Advisory: not a required check of `main`, so a finding, a Qodana Cloud outage or a lapsed licence
|
||||
# is a red job beside a green build, never a blocked merge. Runs started by renovate-bot skip it
|
||||
# (the reusable's rule: a same-repo pull request gets the repository's secrets).
|
||||
# Requires the repository secret QODANA_TOKEN.
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
jobs:
|
||||
qodana:
|
||||
permissions:
|
||||
contents: read
|
||||
uses: poli0981/.github/.gitea/workflows/reusable-qodana.yml@b93b3711b3049a879cfdfd515f7e72c23864da8f # ops v2026.11.5
|
||||
with:
|
||||
runs-on: windows-latest
|
||||
dotnet-global-json-file: global.json
|
||||
prepare-command: dotnet build CommandForge.slnx -c Release
|
||||
artifact-name: qodana-report
|
||||
secrets:
|
||||
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
|
||||
@@ -0,0 +1,235 @@
|
||||
name: Release
|
||||
|
||||
# A signed `vX.Y.Z` tag on main releases CommandForge (RELEASING.md; ops runbook §3.3 and §5.1):
|
||||
#
|
||||
# build publish + Velopack pack (scripts/pack.ps1) on the maintainer's PC (host mode), the
|
||||
# CycloneDX SBOM, SHA256SUMS and the release notes (scripts/release-assets.ps1), an
|
||||
# optional VirusTotal scan, then `vpk upload s3` to Cloudflare R2: packages first, the
|
||||
# feed (releases.win.json) last, so a client never sees a feed whose files are missing.
|
||||
# Installed copies (2.3.0 and later) update from https://releases.poli0981.dev/commandforge.
|
||||
# publish the ops repo's publish-r2.yml puts SHA256SUMS and the SBOM under <version>/.
|
||||
# release a Gitea release with the notes and the links (no binaries: the forge's disk is not for
|
||||
# them, runbook §1).
|
||||
# announce Discord, through the ops repo's announce-release.yml: a release made with the job
|
||||
# token fires no `release` event, so announce-release.yml would never run by itself.
|
||||
#
|
||||
# Manual run (Actions → Release → Run workflow) on a branch is a DRY RUN: it builds, packs, writes
|
||||
# the SBOM/checksums/notes from <Version> in Directory.Build.props, and reads the previous release
|
||||
# from R2 (a check of the R2 credentials), but uploads nothing; the files stay as the `r2-release`
|
||||
# artifact. Uploads, the release and the announcement happen only for a `v*` tag. A file uploaded
|
||||
# under a versioned name is never replaced: to ship a fix, bump the version.
|
||||
#
|
||||
# Release credentials (user-level secrets R2_RELEASES_ACCESS_KEY_ID / _SECRET_ACCESS_KEY, variable
|
||||
# R2_ACCOUNT_ID) exist only in steps of this tag/dispatch-only workflow (runbook §2 rule 10), as VPK_*
|
||||
# environment variables, never on a command line. Optional repository secret VT_API_KEY turns on
|
||||
# the VirusTotal scan. No dependency caches: a poisoned cache could end up inside the installer.
|
||||
# No code signing yet (SECURITY.md), no build-provenance attestations (no OIDC on Gitea, D7).
|
||||
|
||||
on:
|
||||
push:
|
||||
tags: ['v*']
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: release
|
||||
cancel-in-progress: false
|
||||
|
||||
env:
|
||||
DOTNET_NOLOGO: true
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build, pack and upload to R2
|
||||
runs-on: windows-latest # host mode on the maintainer's PC (PowerShell)
|
||||
timeout-minutes: 60
|
||||
permissions:
|
||||
contents: read
|
||||
outputs:
|
||||
version: ${{ steps.ver.outputs.version }}
|
||||
env:
|
||||
IS_TAG: ${{ startsWith(github.ref, 'refs/tags/v') }}
|
||||
# Velopack's S3 options (vpk reads VPK_<OPTION>): bucket poli0981-releases, folder commandforge/
|
||||
VPK_BUCKET: poli0981-releases
|
||||
VPK_PREFIX: commandforge/
|
||||
VPK_ENDPOINT: https://${{ vars.R2_ACCOUNT_ID }}.r2.cloudflarestorage.com
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Keep .NET SDK installs in the runner tool cache (host mode)
|
||||
shell: pwsh
|
||||
run: |
|
||||
$base = if ($env:RUNNER_TOOL_CACHE) { $env:RUNNER_TOOL_CACHE } else { Join-Path $env:LOCALAPPDATA 'gitea-runner\toolcache' }
|
||||
"DOTNET_INSTALL_DIR=$(Join-Path $base 'dotnet')" >> $env:GITHUB_ENV
|
||||
|
||||
- uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6.1.0
|
||||
with:
|
||||
global-json-file: global.json
|
||||
|
||||
# A tag must name the version Directory.Build.props carries (the release commit sets both).
|
||||
- name: Resolve the version
|
||||
id: ver
|
||||
shell: pwsh
|
||||
env:
|
||||
REF_NAME: ${{ github.ref_name }}
|
||||
R2_ACCOUNT_ID: ${{ vars.R2_ACCOUNT_ID }}
|
||||
run: |
|
||||
function Fail([string]$msg) { Write-Host "::error::$msg"; exit 1 }
|
||||
$props = "$(dotnet msbuild src/CommandForge.Domain/CommandForge.Domain.csproj -getProperty:Version | Select-Object -Last 1)".Trim()
|
||||
if ($LASTEXITCODE -ne 0 -or $props -notmatch '^\d+\.\d+\.\d+$') { Fail "Unexpected <Version> '$props' in Directory.Build.props" }
|
||||
if ($env:IS_TAG -eq 'true') {
|
||||
$version = $env:REF_NAME -replace '^v', ''
|
||||
if ($version -ne $props) { Fail "Tag $($env:REF_NAME) does not match <Version> $props in Directory.Build.props" }
|
||||
} else {
|
||||
$version = $props
|
||||
Write-Host "::notice::Dry run on $($env:REF_NAME): builds $version, uploads nothing."
|
||||
}
|
||||
if ($env:R2_ACCOUNT_ID -notmatch '^[0-9a-f]{32}$') { Fail 'Actions variable R2_ACCOUNT_ID is missing or not a 32-hex Cloudflare account ID' }
|
||||
"version=$version" >> $env:GITHUB_OUTPUT
|
||||
Write-Host "Releasing CommandForge $version"
|
||||
|
||||
- name: Restore pinned tools (vpk, CycloneDX)
|
||||
run: dotnet tool restore
|
||||
|
||||
# The previous release, so vpk can build a delta package. Nothing to find before the first
|
||||
# release on R2 (2.3.0): the step then fails and the job goes on.
|
||||
- name: Download the previous release from R2
|
||||
continue-on-error: true
|
||||
shell: pwsh
|
||||
env:
|
||||
VPK_KEY_ID: ${{ secrets.R2_RELEASES_ACCESS_KEY_ID }}
|
||||
VPK_SECRET: ${{ secrets.R2_RELEASES_SECRET_ACCESS_KEY }}
|
||||
run: |
|
||||
dotnet vpk download s3 --channel win --outputDir Releases
|
||||
exit $LASTEXITCODE
|
||||
|
||||
- name: Publish + pack (Velopack)
|
||||
shell: pwsh
|
||||
env:
|
||||
VERSION: ${{ steps.ver.outputs.version }}
|
||||
run: ./scripts/pack.ps1 -Version $env:VERSION
|
||||
|
||||
# A step's own env is not visible to its `if:`, so a step of its own looks for the key.
|
||||
- name: Look for VT_API_KEY
|
||||
id: vtkey
|
||||
shell: pwsh
|
||||
env:
|
||||
VT_API_KEY: ${{ secrets.VT_API_KEY }}
|
||||
run: |
|
||||
"available=$(if ($env:VT_API_KEY) { 'true' } else { 'false' })" >> $env:GITHUB_OUTPUT
|
||||
|
||||
- name: VirusTotal scan (optional)
|
||||
id: vt
|
||||
if: ${{ env.IS_TAG == 'true' && steps.vtkey.outputs.available == 'true' }}
|
||||
uses: crazy-max/ghaction-virustotal@936d8c5c00afe97d3d9a1af26d017cfdf26800a2 # v5.0.0
|
||||
with:
|
||||
vt_api_key: ${{ secrets.VT_API_KEY }}
|
||||
files: |
|
||||
Releases/CommandForge-win-Setup.exe
|
||||
Releases/CommandForge-${{ steps.ver.outputs.version }}-full.nupkg
|
||||
|
||||
- name: SBOM, SHA256SUMS and release notes
|
||||
shell: pwsh
|
||||
env:
|
||||
VERSION: ${{ steps.ver.outputs.version }}
|
||||
VT_ANALYSIS: ${{ steps.vt.outputs.analysis }}
|
||||
run: ./scripts/release-assets.ps1 -Version $env:VERSION -VirusTotalAnalysis "$env:VT_ANALYSIS"
|
||||
|
||||
# vpk uploads the packages, the installer and the portable zip first and the feed last, and
|
||||
# keeps the 10 newest releases in the feed folder (the only deletion CI does, runbook §3.3).
|
||||
# Should R2 refuse the AWS SDK's default checksums, the upload is tried once more with
|
||||
# --disableChecksumValidation, and the log says so.
|
||||
- name: Upload to R2 (Velopack)
|
||||
if: ${{ env.IS_TAG == 'true' }}
|
||||
shell: pwsh
|
||||
env:
|
||||
VPK_KEY_ID: ${{ secrets.R2_RELEASES_ACCESS_KEY_ID }}
|
||||
VPK_SECRET: ${{ secrets.R2_RELEASES_SECRET_ACCESS_KEY }}
|
||||
run: |
|
||||
dotnet vpk upload s3 --channel win --outputDir Releases --keepMaxReleases 10
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host '::warning::vpk upload s3 failed; trying once more with --disableChecksumValidation'
|
||||
dotnet vpk upload s3 --channel win --outputDir Releases --keepMaxReleases 10 --disableChecksumValidation
|
||||
}
|
||||
exit $LASTEXITCODE
|
||||
|
||||
- name: Smoke test the public files
|
||||
if: ${{ env.IS_TAG == 'true' }}
|
||||
shell: pwsh
|
||||
env:
|
||||
VERSION: ${{ steps.ver.outputs.version }}
|
||||
run: |
|
||||
$base = 'https://releases.poli0981.dev/commandforge'
|
||||
foreach ($name in 'releases.win.json', 'CommandForge-win-Setup.exe', 'CommandForge-win-Portable.zip', "CommandForge-$($env:VERSION)-full.nupkg") {
|
||||
$code = curl.exe -sS -o NUL -I -w '%{http_code}' --retry 3 --retry-all-errors "$base/$name"
|
||||
Write-Host "HEAD $base/$name -> $code"
|
||||
if ($code -ne '200') { Write-Host "::error::Not reachable after upload: $base/$name"; exit 1 }
|
||||
}
|
||||
$feed = curl.exe -fsS --retry 3 "$base/releases.win.json" | ConvertFrom-Json
|
||||
if (-not ($feed.Assets | Where-Object { $_.Version -eq $env:VERSION })) { Write-Host "::error::releases.win.json does not list $($env:VERSION)"; exit 1 }
|
||||
|
||||
- name: Keep the release files
|
||||
uses: christopherhx/gitea-upload-artifact@81f940d004763f986ba3582c007fd842dd5cb0d7 # v4
|
||||
with:
|
||||
name: r2-release
|
||||
path: r2-release/
|
||||
if-no-files-found: error
|
||||
retention-days: 7
|
||||
|
||||
publish:
|
||||
name: SHA256SUMS and SBOM to R2
|
||||
needs: build
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
|
||||
permissions:
|
||||
contents: read
|
||||
uses: poli0981/.github/.gitea/workflows/publish-r2.yml@b93b3711b3049a879cfdfd515f7e72c23864da8f # ops v2026.11.5
|
||||
with:
|
||||
app: commandforge
|
||||
artifact: r2-release
|
||||
versioned-dir: versioned # versioned/2.3.0/SHA256SUMS → commandforge/2.3.0/SHA256SUMS
|
||||
runs-on: ubuntu-latest
|
||||
secrets:
|
||||
R2_RELEASES_ACCESS_KEY_ID: ${{ secrets.R2_RELEASES_ACCESS_KEY_ID }}
|
||||
R2_RELEASES_SECRET_ACCESS_KEY: ${{ secrets.R2_RELEASES_SECRET_ACCESS_KEY }}
|
||||
|
||||
release:
|
||||
name: Gitea release (notes + links)
|
||||
needs: [build, publish]
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
permissions:
|
||||
contents: write # which of contents / releases Gitea enforces is unverified (runbook §3.2 item 5)
|
||||
releases: write
|
||||
steps:
|
||||
- name: Download the release files
|
||||
uses: christopherhx/gitea-download-artifact@75635f32b4c1c41c4b3d64e8f85210112ed4c9c7 # v4
|
||||
with:
|
||||
name: r2-release
|
||||
path: r2-release
|
||||
|
||||
- name: Create the release
|
||||
uses: https://gitea.com/actions/gitea-release-action@5a83c90484ef4355121df5eb60558c8ce66e81ac # v1.3.7
|
||||
with:
|
||||
tag_name: ${{ github.ref_name }}
|
||||
name: CommandForge ${{ needs.build.outputs.version }}
|
||||
body_path: r2-release/release-notes.md
|
||||
|
||||
announce:
|
||||
needs: release
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
|
||||
permissions:
|
||||
contents: read
|
||||
uses: poli0981/.github/.gitea/workflows/announce-release.yml@b93b3711b3049a879cfdfd515f7e72c23864da8f # ops v2026.11.5
|
||||
with:
|
||||
tag_override: ${{ github.ref_name }}
|
||||
ops_ref: b93b3711b3049a879cfdfd515f7e72c23864da8f
|
||||
secrets:
|
||||
DISCORD_RELEASES_WEBHOOK: ${{ secrets.DISCORD_RELEASES_WEBHOOK }}
|
||||
DISCORD_REPO_WEBHOOK: ${{ secrets.DISCORD_REPO_WEBHOOK }}
|
||||
DISCORD_PING_ROLE_ID: ${{ secrets.DISCORD_PING_ROLE_ID }}
|
||||
@@ -0,0 +1,82 @@
|
||||
name: Security
|
||||
|
||||
# Gitea has no CodeQL, no dependency review and no code-scanning UI (ops runbook §1, migration
|
||||
# decision D7). This workflow covers instead:
|
||||
#
|
||||
# workflow-lint actionlint + shellcheck on .gitea/workflows/*.yml (CodeQL's `actions` analysis
|
||||
# is gone; Opengrep's GitHub Actions rules below also check for injection)
|
||||
# scan the ops repo's security.yml: gitleaks (full history), Opengrep (SAST, report
|
||||
# only), osv-scanner (lockfiles; this repo has none, so it has nothing to scan)
|
||||
# and a `dotnet restore` with NuGetAudit that fails on high/critical advisories
|
||||
# (NU1903/NU1904). build.yml's restore already fails on moderate ones.
|
||||
#
|
||||
# Weekly as well, so a new advisory against unchanged dependencies turns it red: Friday 14:11 UTC
|
||||
# = 21:11 Vietnam (a free slot in the ops repo's cron registry; the runner is the maintainer's PC
|
||||
# and only runs 13:00–16:00 UTC).
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
schedule:
|
||||
- cron: '11 14 * * 5'
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
jobs:
|
||||
# Both linters as release binaries at pinned versions, SHA-256 verified (the pins of the ops
|
||||
# repo's ops-lint.yml). Renovate does not update them: bump version and checksum together.
|
||||
workflow-lint:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
permissions:
|
||||
contents: read
|
||||
env:
|
||||
ACTIONLINT_VERSION: 1.7.12
|
||||
ACTIONLINT_SHA256: 8aca8db96f1b94770f1b0d72b6dddcb1ebb8123cb3712530b08cc387b349a3d8 # actionlint_1.7.12_linux_amd64.tar.gz
|
||||
SHELLCHECK_VERSION: v0.11.0
|
||||
SHELLCHECK_SHA256: 8c3be12b05d5c177a04c29e3c78ce89ac86f1595681cab149b65b97c4e227198 # shellcheck-v0.11.0.linux.x86_64.tar.xz
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Install actionlint ${{ env.ACTIONLINT_VERSION }} + shellcheck ${{ env.SHELLCHECK_VERSION }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
tmp="${RUNNER_TEMP:-/tmp}"
|
||||
bin="$tmp/lint-bin"
|
||||
mkdir -p "$bin"
|
||||
curl -fsSL --retry 3 -o "$tmp/actionlint.tar.gz" \
|
||||
"https://github.com/rhysd/actionlint/releases/download/v${ACTIONLINT_VERSION}/actionlint_${ACTIONLINT_VERSION}_linux_amd64.tar.gz"
|
||||
echo "${ACTIONLINT_SHA256} $tmp/actionlint.tar.gz" | sha256sum -c -
|
||||
tar -xzf "$tmp/actionlint.tar.gz" -C "$bin" actionlint
|
||||
curl -fsSL --retry 3 -o "$tmp/shellcheck.tar.xz" \
|
||||
"https://github.com/koalaman/shellcheck/releases/download/${SHELLCHECK_VERSION}/shellcheck-${SHELLCHECK_VERSION}.linux.x86_64.tar.xz"
|
||||
echo "${SHELLCHECK_SHA256} $tmp/shellcheck.tar.xz" | sha256sum -c -
|
||||
tar -xJf "$tmp/shellcheck.tar.xz" -C "$bin" --strip-components=1 "shellcheck-${SHELLCHECK_VERSION}/shellcheck"
|
||||
echo "$bin" >> "$GITHUB_PATH"
|
||||
|
||||
# The files by name: actionlint only finds .github/workflows by itself. .github/actionlint.yaml
|
||||
# ignores only the Gitea features actionlint does not know; everything else stays an error.
|
||||
- name: actionlint (workflow syntax and expressions)
|
||||
run: |
|
||||
actionlint -version
|
||||
actionlint -color -config-file .github/actionlint.yaml \
|
||||
-shellcheck "$(command -v shellcheck)" .gitea/workflows/*.yml
|
||||
|
||||
scan:
|
||||
permissions:
|
||||
contents: read
|
||||
uses: poli0981/.github/.gitea/workflows/security.yml@b93b3711b3049a879cfdfd515f7e72c23864da8f # ops v2026.11.5
|
||||
with:
|
||||
dotnet: true
|
||||
dotnet-runs-on: windows-latest # WPF (net10.0-windows) restores only on Windows
|
||||
dotnet-solution: CommandForge.slnx
|
||||
@@ -3,14 +3,13 @@
|
||||
This project adopts the **[Contributor Covenant, version 2.1](https://www.contributor-covenant.org/version/2/1/code_of_conduct/)**.
|
||||
|
||||
In short: be respectful and constructive. Harassment, insults, personal attacks, and other
|
||||
behavior that violates
|
||||
[GitHub's Acceptable Use Policies](https://docs.github.com/site-policy/acceptable-use-policies)
|
||||
are not tolerated in this project's spaces (issues, pull requests, discussions, and comments).
|
||||
abusive behavior are not tolerated in this project's spaces (issues, merge requests, e-mail and
|
||||
comments, on the GitLab mirror or anywhere else the project is discussed).
|
||||
|
||||
Please read the full text linked above.
|
||||
|
||||
## Reporting
|
||||
|
||||
To report unacceptable behavior, email **[code@poli0981.dev](mailto:code@poli0981.dev)**. Reports
|
||||
are handled privately; don't put sensitive details in a public issue. You can also use GitHub's
|
||||
**Report content** option on the comment or issue concerned.
|
||||
are handled privately; don't put sensitive details in a public issue. On the GitLab mirror you can
|
||||
also use GitLab's **Report abuse** option on the comment or issue concerned.
|
||||
+38
-29
@@ -2,7 +2,21 @@
|
||||
|
||||
Thanks for your interest! CommandForge is a GPLv3, offline-first Windows tool that runs
|
||||
system-level commands, so **safety and clarity matter more than speed**. Please read this before
|
||||
opening an issue or pull request.
|
||||
opening an issue or merge request.
|
||||
|
||||
## Where things live
|
||||
|
||||
- **Source (canonical):** [`git.poli0981.dev/poli0981/CommandForge`](https://git.poli0981.dev/poli0981/CommandForge), the maintainer's
|
||||
Gitea. Its registration is closed, so it is read-only for everyone else; CI (Gitea Actions) runs
|
||||
there.
|
||||
- **Issues and merge requests:** the public mirror [`gitlab.com/poli0981/CommandForge`](https://gitlab.com/poli0981/CommandForge),
|
||||
which Gitea keeps up to date. GitLab CI does not run on the mirror: the maintainer applies an
|
||||
accepted merge request on Gitea, where CI runs, and the mirror then shows it as merged (or it is
|
||||
closed with a link to the commit).
|
||||
- **Patches by e-mail:** `git format-patch` / `git send-email` to
|
||||
[code@poli0981.dev](mailto:code@poli0981.dev) work too.
|
||||
- **Security:** [security@poli0981.dev](mailto:security@poli0981.dev) only, never a public issue
|
||||
(see [SECURITY.md](SECURITY.md)).
|
||||
|
||||
## Maintenance mode: what we accept
|
||||
|
||||
@@ -14,8 +28,8 @@ so the work now goes into keeping it secure, correct and accessible, not into ne
|
||||
|
||||
1. **Dependency updates**, regularly.
|
||||
2. **Security fixes.** A High or Critical vulnerability in a dependency or in the toolchain — for
|
||||
example the .NET runtime the app ships with, or Node.js, which the build's GitHub Actions run
|
||||
on — gets an urgent patch release; a Moderate one goes into the next routine update. A new
|
||||
example the .NET runtime the app ships with, or Node.js, which the CI's actions run on — gets
|
||||
an urgent patch release; a Moderate one goes into the next routine update. A new
|
||||
feature is added only when it is genuinely necessary, for example to keep the app safe or
|
||||
working on a new Windows build.
|
||||
3. **Major platform updates**, such as moving to a newer .NET.
|
||||
@@ -25,10 +39,8 @@ so the work now goes into keeping it secure, correct and accessible, not into ne
|
||||
5. **Translation fixes** for English, Vietnamese, Japanese, Simplified Chinese and Spanish: wording
|
||||
that doesn't suit the culture or the local tone, and spelling that could mislead.
|
||||
|
||||
**Not accepted:** issues and pull requests for new features, unless the feature clearly fits the
|
||||
project and is genuinely necessary; others are closed with a link to this section. Ideas are welcome
|
||||
in [Discussions › Ideas](https://github.com/poli0981/CommandForge/discussions/categories/ideas),
|
||||
without any commitment.
|
||||
**Not accepted:** issues and merge requests for new features, unless the feature clearly fits the
|
||||
project and is genuinely necessary; others are closed with a link to this section.
|
||||
|
||||
## Quick start
|
||||
|
||||
@@ -45,36 +57,33 @@ See [BUILD.md](../BUILD.md) for packaging and CI.
|
||||
|
||||
## Reporting issues
|
||||
|
||||
- Use the issue forms: **Bug report**, **Command — add, fix or remove**, **Translation fix**,
|
||||
**Accessibility problem**, and **Feature request** (within the policy above).
|
||||
- Open an [issue on the GitLab mirror](https://gitlab.com/poli0981/CommandForge/-/issues/new) and pick a template: **Bug**,
|
||||
**Command**, **Translation**, **Accessibility** or **Feature request** (within the policy above).
|
||||
In the app, **More → Report a bug** fills the Bug template in for you.
|
||||
- **Get straight to the point**: what you expected, what happened, exact steps, your Windows
|
||||
version/build and the app version (**More → About** in the app).
|
||||
- For **security vulnerabilities, do NOT open a public issue** — see [SECURITY.md](SECURITY.md).
|
||||
- Questions: [Discussions](https://github.com/poli0981/CommandForge/discussions); ideas:
|
||||
[Discussions › Ideas](https://github.com/poli0981/CommandForge/discussions/categories/ideas),
|
||||
without commitment; or email [code@poli0981.dev](mailto:code@poli0981.dev).
|
||||
- Questions: e-mail [code@poli0981.dev](mailto:code@poli0981.dev).
|
||||
- An accessibility barrier can also go to
|
||||
[accessibility@poli0981.dev](mailto:accessibility@poli0981.dev) — see
|
||||
[ACCESSIBILITY.md](../ACCESSIBILITY.md).
|
||||
|
||||
## Pull requests
|
||||
## Merge requests and patches
|
||||
|
||||
- Keep PRs **focused and small**; one logical change per PR.
|
||||
- Keep changes **focused and small**; one logical change per merge request or patch series.
|
||||
- Match existing style; run `dotnet format` and keep the build at **0 warnings** (analyzers,
|
||||
including SonarAnalyzer, run as part of the build).
|
||||
- **Don't delete or disable tests** to make CI pass; add tests for new behavior. SonarCloud's
|
||||
quality gate expects at least 80% test coverage on new code (XAML code-behind excepted), so put
|
||||
logic in view models and helpers that tests can reach.
|
||||
- **Sign your commits** (GPG, SSH or S/MIME) — `main` only accepts verified signatures. Commit
|
||||
messages follow [Conventional Commits](https://www.conventionalcommits.org/)
|
||||
- **Don't delete or disable tests** to make CI pass; add tests for new behavior, and put logic in
|
||||
view models and helpers that tests can reach (XAML code-behind is hard to test).
|
||||
- **Sign your commits** (GPG or SSH) where you can; the maintainer's commits and release tags are
|
||||
signed. Commit messages follow [Conventional Commits](https://www.conventionalcommits.org/)
|
||||
(`fix(catalog): …`, `feat(ui): …`).
|
||||
- PRs need the required checks to pass: `build`, `package`, CodeQL (`Analyze (csharp)`,
|
||||
`Analyze (actions)`) and `dependency-review`. The SonarCloud quality gate and the Qodana report
|
||||
(zero problems expected) are shown on PRs from this repository too (fork PRs don't get the
|
||||
analysis tokens).
|
||||
- **Dependencies:** package versions live in each `.csproj` (GitHub's dependency graph doesn't read
|
||||
`Directory.Packages.props`). Discuss a new package before adding it; runtime dependencies must be
|
||||
GPLv3-compatible (dependency review enforces a license allow-list).
|
||||
- The maintainer runs your change through CI on Gitea before merging: `Build` (`build` and
|
||||
`package`) must pass, and `Security` (gitleaks, Opengrep, osv-scanner, NuGetAudit, actionlint)
|
||||
and the Qodana report (zero problems expected) are checked too.
|
||||
- **Dependencies:** package versions live in each `.csproj` (not in `Directory.Packages.props`).
|
||||
Discuss a new package before adding it; runtime dependencies must be GPLv3-compatible. Renovate
|
||||
proposes updates on its own.
|
||||
- **UI text** goes in the `.resx` files, never hardcoded, and every key needs a value in all five
|
||||
languages: `Strings.resx` (English), `Strings.vi.resx`, `Strings.ja.resx`, `Strings.zh-Hans.resx`
|
||||
and `Strings.es.resx`. A test fails when a key the UI uses is missing from any of them.
|
||||
@@ -125,12 +134,12 @@ To protect users, the following are **closed without review** and may result in
|
||||
ban — no exceptions:
|
||||
|
||||
- **Suspected malicious code.** If a PR appears to contain a supply-chain attack, obfuscation,
|
||||
credential harvesting, a cryptominer, or any malware — even if CodeQL and Dependabot don't flag
|
||||
credential harvesting, a cryptominer, or any malware — even if the automated scans don't flag
|
||||
it — the maintainer may investigate manually. **Detection equals a ban.**
|
||||
- **Unverified or suspicious links** in issues, PRs, or comments (pastebin scrapers, redirect
|
||||
chains, unfamiliar shortlinks, link-shortener URLs without context).
|
||||
- **Behavior or language violating**
|
||||
[GitHub's Acceptable Use Policies](https://docs.github.com/site-policy/acceptable-use-policies).
|
||||
- **Behavior or language violating** the [Code of Conduct](CODE_OF_CONDUCT.md), or the terms of
|
||||
the site where it is posted (GitLab's, on the mirror).
|
||||
- **Off-topic / rambling reports** that don't get to the point (e.g. *"Good morning, today is a
|
||||
beautiful day, I was just wondering if maybe…"*). Get straight to the problem.
|
||||
- **PRs that touch hundreds of files for a one-line fix** (a typical sign of an auto-formatter run
|
||||
|
||||
@@ -15,8 +15,8 @@ body:
|
||||
If you couldn't read or answer a **Caution or Dangerous confirmation**, say so below: it is a safety problem
|
||||
too, and it is handled first.
|
||||
|
||||
Rather not use GitHub, or not post in public? Write to **accessibility@poli0981.dev** instead. What CommandForge
|
||||
aims for and what it can't do yet: [ACCESSIBILITY.md](../blob/main/ACCESSIBILITY.md).
|
||||
Rather not post in public? Write to **accessibility@poli0981.dev** instead. What CommandForge
|
||||
aims for and what it can't do yet: [ACCESSIBILITY.md](../src/branch/main/ACCESSIBILITY.md).
|
||||
|
||||
- type: textarea
|
||||
id: task
|
||||
|
||||
@@ -6,9 +6,9 @@ body:
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for the report. **Get straight to the point** — vague or off-topic reports may be
|
||||
closed (see [CONTRIBUTING.md](../blob/main/.github/CONTRIBUTING.md)).
|
||||
**Do not report security vulnerabilities here** — use
|
||||
[private reporting](../security/advisories/new) instead.
|
||||
closed (see [CONTRIBUTING.md](../src/branch/main/.github/CONTRIBUTING.md)).
|
||||
**Do not report security vulnerabilities here** — e-mail
|
||||
**security@poli0981.dev** instead.
|
||||
|
||||
A catalog command that is outdated or uses the wrong syntax has its own form (**Command — add,
|
||||
fix or remove**), and so does a barrier for the keyboard, a screen reader or larger text
|
||||
@@ -58,5 +58,5 @@ body:
|
||||
options:
|
||||
- label: I'm using the latest release.
|
||||
required: true
|
||||
- label: This is not a security vulnerability (those go through private reporting).
|
||||
- label: This is not a security vulnerability (those go to security@poli0981.dev).
|
||||
required: true
|
||||
@@ -7,11 +7,11 @@ body:
|
||||
value: |
|
||||
Every command in CommandForge is a vetted entry of its read-only catalog. A request is checked
|
||||
against Microsoft's documentation and tried before it ships — see
|
||||
[Adding a command](../blob/main/.github/CONTRIBUTING.md#adding-a-command).
|
||||
[Adding a command](../src/branch/main/.github/CONTRIBUTING.md#adding-a-command).
|
||||
|
||||
**A command that could cause harm** — it deletes what it shouldn't, weakens security, or does
|
||||
something other than it says — is a security problem: report it
|
||||
[privately](../security/advisories/new), not here.
|
||||
something other than it says — is a security problem: e-mail it to
|
||||
**security@poli0981.dev**, not here.
|
||||
- type: dropdown
|
||||
id: request
|
||||
attributes:
|
||||
@@ -79,5 +79,5 @@ body:
|
||||
options:
|
||||
- label: The command is a tool that comes with Windows (nothing downloaded from elsewhere).
|
||||
required: true
|
||||
- label: It is not a command that could cause harm (those go through private reporting).
|
||||
- label: It is not a command that could cause harm (those go to security@poli0981.dev).
|
||||
required: true
|
||||
@@ -1,14 +1,14 @@
|
||||
# Gitea reads these forms (.github/ISSUE_TEMPLATE), but only the maintainer can open issues there:
|
||||
# the instance's registration is closed. Everyone else uses the public mirror on GitLab, which reads
|
||||
# .gitlab/issue_templates instead.
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Security vulnerability or harmful command (private)
|
||||
url: https://github.com/poli0981/CommandForge/security/advisories/new
|
||||
about: Report security vulnerabilities, and catalog commands that could cause harm, privately — do NOT open a public issue.
|
||||
- name: Idea (no commitment)
|
||||
url: https://github.com/poli0981/CommandForge/discussions/categories/ideas
|
||||
about: CommandForge is in maintenance mode; ideas are welcome in Discussions, without commitment.
|
||||
- name: Question / discussion
|
||||
url: https://github.com/poli0981/CommandForge/discussions
|
||||
about: Ask a question before filing an issue.
|
||||
- name: Report an issue or open a merge request (GitLab mirror)
|
||||
url: https://gitlab.com/poli0981/CommandForge/-/issues/new
|
||||
about: Issues and merge requests from everyone go to the public mirror on GitLab.
|
||||
- name: Security vulnerability or harmful command (private, by e-mail)
|
||||
url: https://git.poli0981.dev/poli0981/CommandForge/src/branch/main/.github/SECURITY.md
|
||||
about: Write to security@poli0981.dev; do NOT open a public issue, here or on GitLab.
|
||||
- name: Accessibility statement
|
||||
url: https://github.com/poli0981/CommandForge/blob/main/ACCESSIBILITY.md
|
||||
url: https://git.poli0981.dev/poli0981/CommandForge/src/branch/main/ACCESSIBILITY.md
|
||||
about: What works with the keyboard, screen readers and larger text, and the known limitations.
|
||||
@@ -8,10 +8,9 @@ body:
|
||||
**CommandForge is in maintenance mode.** A new feature is added only when it clearly fits the
|
||||
project and is genuinely necessary — for example, to keep the app safe or working on a new
|
||||
Windows build. Other requests are closed with a link to
|
||||
[the policy](../blob/main/.github/CONTRIBUTING.md#maintenance-mode-what-we-accept).
|
||||
[the policy](../src/branch/main/.github/CONTRIBUTING.md#maintenance-mode-what-we-accept).
|
||||
|
||||
- A catalog command to add, fix or remove has its own form: **Command — add, fix or remove**.
|
||||
- An idea to share, without commitment: [Discussions › Ideas](../discussions/categories/ideas).
|
||||
A catalog command to add, fix or remove has its own form: **Command — add, fix or remove**.
|
||||
- type: checkboxes
|
||||
id: scope
|
||||
attributes:
|
||||
@@ -30,7 +29,7 @@ body:
|
||||
id: necessity
|
||||
attributes:
|
||||
label: Why is it necessary?
|
||||
description: What breaks, or stays unsafe or out of reach, without it? An idea that is nice to have belongs in Discussions › Ideas.
|
||||
description: What breaks, or stays unsafe or out of reach, without it?
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
|
||||
@@ -23,7 +23,7 @@ Do NOT delete tests or use --no-verify to bypass hooks.
|
||||
- [ ] `dotnet test` passes (and I added/updated tests for new behavior)
|
||||
- [ ] `dotnet format --verify-no-changes` passes; no unrelated reformatting
|
||||
- [ ] No tests deleted/disabled; hooks not bypassed (`--no-verify` not used)
|
||||
- [ ] My commits are signed (`main` requires verified signatures)
|
||||
- [ ] My commits are signed (GPG or SSH)
|
||||
- [ ] New or changed UI text is in all five `Strings*.resx` files (EN, VI, JA, zh-Hans, ES) — no hardcoded strings
|
||||
- [ ] If I added a command: it's a vetted catalog entry with correct `requiresAdmin`/`dangerLevel`, strings in all five languages, and no arbitrary-execution path
|
||||
- [ ] If I changed a screen: every control without text has an `AutomationProperties.Name` from the `.resx`, list items are named by what they show, icons are `ctl:DecorativeIcon`, and I tried it with the keyboard alone (and Narrator if I could) — see [ACCESSIBILITY.md](../ACCESSIBILITY.md#for-contributors)
|
||||
|
||||
+23
-18
@@ -6,8 +6,8 @@ CommandForge runs system-level commands, some as administrator, so security is a
|
||||
|
||||
| Version | Supported |
|
||||
|---|---|
|
||||
| 2.2.x (latest) | ✅ |
|
||||
| < 2.2 | ❌ — please update |
|
||||
| 2.3.x (latest) | ✅ |
|
||||
| < 2.3 | ❌ — please update (2.2.0 and older can't update themselves: install the latest release once by hand, see [UPDATES.md](../UPDATES.md)) |
|
||||
|
||||
Only the **latest release** receives security fixes. Please update before reporting.
|
||||
|
||||
@@ -18,11 +18,12 @@ command that could cause harm is reported here too, privately.
|
||||
|
||||
## Reporting a vulnerability
|
||||
|
||||
**Do not open a public issue for security vulnerabilities.** Report privately in either of these ways:
|
||||
**Report privately by e-mail: [security@poli0981.dev](mailto:security@poli0981.dev).**
|
||||
|
||||
- **[GitHub private vulnerability reporting](https://github.com/poli0981/CommandForge/security/advisories/new)**
|
||||
(Security → Advisories → Report a vulnerability) — preferred, or
|
||||
- **email: [security@poli0981.dev](mailto:security@poli0981.dev)**.
|
||||
**Do not open a public issue for security vulnerabilities** — not on the GitLab mirror
|
||||
(`gitlab.com/poli0981/CommandForge`), where issues are public, and not anywhere else. If one is
|
||||
opened there by mistake, it is made confidential and the conversation continues by e-mail. (GitHub's
|
||||
private vulnerability reporting is gone with the GitHub account.)
|
||||
|
||||
Please include:
|
||||
|
||||
@@ -66,8 +67,9 @@ runs elevated.
|
||||
can't be turned off. A System Restore Point can be created first.
|
||||
- **Containment.** Commands whose output is captured run in a kill-on-close job object, so closing
|
||||
or crashing the app doesn't leave them running.
|
||||
- **No telemetry.** The only network connection the app makes is the GitHub update check (see
|
||||
[PRIVACY.md](../PRIVACY.md)).
|
||||
- **No telemetry.** The only network connection the app makes is the update check against
|
||||
`https://releases.poli0981.dev/commandforge` (see [PRIVACY.md](../PRIVACY.md)). The feed is
|
||||
static files over HTTPS; no token or account is involved.
|
||||
|
||||
### Known limitations
|
||||
|
||||
@@ -90,18 +92,21 @@ runs elevated.
|
||||
Releases are **not Authenticode-signed yet**, so SmartScreen may warn about an unknown publisher
|
||||
and some antivirus engines may show false positives (common for admin tools). Instead:
|
||||
|
||||
- Every release is built by GitHub Actions from a tagged commit and carries **build-provenance
|
||||
attestations** for the installer and packages. Verify a download with
|
||||
`gh attestation verify <file> --repo poli0981/CommandForge`.
|
||||
- **SHA-256 checksums** (`checksums.txt`), an **SPDX SBOM** (`sbom.spdx.json`) and **VirusTotal**
|
||||
scan links come with every release.
|
||||
- Every release is built by the release workflow on Gitea Actions
|
||||
(`git.poli0981.dev/poli0981/CommandForge`) from a signed tag on `main`; the workflow and its
|
||||
logs are public. Build-provenance attestations ended with the move from GitHub (Gitea has no
|
||||
OIDC signing).
|
||||
- **SHA-256 checksums** (`<version>/SHA256SUMS`), a **CycloneDX SBOM** (`<version>/sbom.cdx.json`)
|
||||
and, when a scan was made, **VirusTotal** links come with every release, under
|
||||
`https://releases.poli0981.dev/commandforge/`.
|
||||
- The code is **not obfuscated** (obfuscation is a leading cause of false positives), and the
|
||||
source is public under the GPLv3.
|
||||
- CI runs **CodeQL** (C# and GitHub Actions), **dependency review**, **OpenSSF Scorecard**,
|
||||
**SonarCloud**, **Qodana** (JetBrains' inspections and security rules) and **Snyk**; every
|
||||
restore audits direct and transitive NuGet packages;
|
||||
Dependabot keeps dependencies and the SHA-pinned actions current; `main` only accepts pull
|
||||
requests that pass the required checks.
|
||||
- CI runs **Qodana** (JetBrains' inspections and security rules), **gitleaks** over the whole
|
||||
history, **Opengrep** (SAST), **osv-scanner**, and a **NuGetAudit** restore that fails on known
|
||||
vulnerabilities in direct and transitive packages; the workflows are linted with **actionlint**
|
||||
and every action is pinned to a commit SHA. A self-hosted **Renovate** keeps dependencies and
|
||||
those pins current, with separate pull requests for security fixes; `main` is protected and
|
||||
takes changes through pull requests that pass the build.
|
||||
|
||||
Code signing (Azure Trusted Signing, or SignPath Foundation for open source) is planned for a
|
||||
future release.
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# actionlint settings (security.yml, job `workflow-lint`, and a local `actionlint` run from the
|
||||
# repository root), as in the ops repository poli0981/.github. Only Gitea features that actionlint
|
||||
# does not know are ignored here; everything else stays an error.
|
||||
paths:
|
||||
.gitea/workflows/*.yml:
|
||||
ignore:
|
||||
# Gitea's own token scope for releases (ops runbook §3.2 item 5)
|
||||
- 'unknown permission scope "releases"'
|
||||
# Gitea resolves full-URL actions; a bare owner/repo goes to github.com (ops runbook §1)
|
||||
- 'specifying action "https://gitea\.com/[^"]+" in invalid format'
|
||||
@@ -1,61 +0,0 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: nuget
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: weekly
|
||||
day: monday
|
||||
open-pull-requests-limit: 5
|
||||
commit-message:
|
||||
prefix: "deps"
|
||||
# Labels that exist in the repository (a missing label is silently dropped).
|
||||
labels: ["dependencies", ".NET"]
|
||||
cooldown:
|
||||
default-days: 3
|
||||
semver-major-days: 14
|
||||
# The app stays on the .NET 10 LTS line: Microsoft.Extensions.* majors follow .NET majors, and
|
||||
# moving to a new .NET major is a deliberate migration done by hand, not a Dependabot bump.
|
||||
ignore:
|
||||
- dependency-name: "Microsoft.Extensions.*"
|
||||
update-types: ["version-update:semver-major"]
|
||||
groups:
|
||||
microsoft-extensions:
|
||||
patterns: ["Microsoft.Extensions.*"]
|
||||
serilog:
|
||||
patterns: ["Serilog*"]
|
||||
# The Velopack library and the vpk CLI (.config/dotnet-tools.json) must move together.
|
||||
velopack:
|
||||
patterns: ["Velopack", "vpk"]
|
||||
testing:
|
||||
patterns: ["xunit*", "Microsoft.NET.Test.Sdk", "coverlet.*"]
|
||||
# Includes the SonarScanner CLI pinned in .config/dotnet-tools.json.
|
||||
build-tooling:
|
||||
patterns: ["SonarAnalyzer.CSharp", "dotnet-sonarscanner", "Microsoft.Windows.CsWin32"]
|
||||
|
||||
- package-ecosystem: dotnet-sdk
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: weekly
|
||||
day: monday
|
||||
commit-message:
|
||||
prefix: "build"
|
||||
labels: ["dependencies", ".NET"]
|
||||
# Patch and feature-band SDKs only; a new .NET major (11, 12…) is moved to by hand.
|
||||
ignore:
|
||||
- dependency-name: "*"
|
||||
update-types: ["version-update:semver-major"]
|
||||
|
||||
- package-ecosystem: github-actions
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: weekly
|
||||
day: monday
|
||||
open-pull-requests-limit: 5
|
||||
commit-message:
|
||||
prefix: "ci"
|
||||
labels: ["dependencies", "github_actions"]
|
||||
cooldown:
|
||||
default-days: 3
|
||||
groups:
|
||||
actions:
|
||||
patterns: ["*"]
|
||||
@@ -1,27 +0,0 @@
|
||||
name: Announce Release
|
||||
|
||||
# Posts a release announcement to Discord (reuses the shared workflow in poli0981/.github).
|
||||
# Tag releases are announced by release.yml itself (a release published with GITHUB_TOKEN does
|
||||
# not fire the `release` event); this workflow covers releases published by hand and re-runs.
|
||||
# Requires repo secret DISCORD_RELEASES_WEBHOOK (or DISCORD_REPO_WEBHOOK); optional
|
||||
# DISCORD_PING_ROLE_ID.
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
description: Release tag to announce (e.g. v2.0.0)
|
||||
required: true
|
||||
type: string
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
announce:
|
||||
uses: poli0981/.github/.github/workflows/announce-release.yml@c3e118a01d40e95b36b2c3466dc206638c11eb5a # main, 2026-07-06
|
||||
with:
|
||||
tag_override: ${{ github.event.inputs.tag || '' }}
|
||||
secrets: inherit
|
||||
@@ -1,67 +0,0 @@
|
||||
name: CodeQL
|
||||
|
||||
# Project-specific CodeQL (not the shared reusable workflow): the C# code is a WPF
|
||||
# (net10.0-windows) app that only builds on Windows from a .slnx solution. The workflows
|
||||
# themselves are analysed too (`actions` language).
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
schedule:
|
||||
- cron: '37 14 * * 1' # Mondays 14:37 UTC
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze (${{ matrix.language }})
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 30
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- language: csharp
|
||||
os: windows-latest
|
||||
build-mode: manual
|
||||
- language: actions
|
||||
os: ubuntu-latest
|
||||
build-mode: none
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- if: matrix.language == 'csharp'
|
||||
uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6.1.0
|
||||
with:
|
||||
global-json-file: global.json
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@33d7b85da1a04171e211befe2c739303b9a4c066 # v4.39.3
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
build-mode: ${{ matrix.build-mode }}
|
||||
queries: security-extended
|
||||
|
||||
- if: matrix.build-mode == 'manual'
|
||||
name: Build
|
||||
# Roslyn analyzers add nothing to CodeQL's extraction and slow the traced build down.
|
||||
run: dotnet build CommandForge.slnx -c Release -p:RunAnalyzers=false
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@33d7b85da1a04171e211befe2c739303b9a4c066 # v4.39.3
|
||||
with:
|
||||
category: "/language:${{ matrix.language }}"
|
||||
@@ -1,32 +0,0 @@
|
||||
name: Dependency Review
|
||||
|
||||
# Blocks pull requests that add dependencies with known vulnerabilities (moderate or worse) or
|
||||
# with licenses that are not compatible with GPLv3.
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
dependency-review:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write # summary comment on failure
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- uses: actions/dependency-review-action@a1d282b36b6f3519aa1f3fc636f609c47dddb294 # v5.0.0
|
||||
with:
|
||||
fail-on-severity: moderate
|
||||
comment-summary-in-pr: on-failure
|
||||
allow-licenses: >-
|
||||
MIT, Apache-2.0, BSD-2-Clause, BSD-3-Clause, ISC, 0BSD, Zlib, BSL-1.0,
|
||||
Unlicense, CC0-1.0, MPL-2.0, OFL-1.1, LGPL-2.1-or-later, LGPL-3.0-only,
|
||||
LGPL-3.0-or-later, GPL-3.0-only, GPL-3.0-or-later
|
||||
@@ -1,26 +0,0 @@
|
||||
name: Notify CI Failure
|
||||
|
||||
# Posts a Discord alert when the Build, SonarCloud or Qodana workflow fails on main (reuses the
|
||||
# shared workflow in poli0981/.github). Requires repo secret DISCORD_CI_WEBHOOK.
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["Build", "SonarCloud", "Qodana"]
|
||||
types: [completed]
|
||||
|
||||
# The reusable workflow requests actions: read; without granting it here every run was a
|
||||
# startup_failure (the repository default token is read-only for contents only).
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
notify:
|
||||
# The three workflows only run on `push` for main, so this limits alerts to main without trusting
|
||||
# forgeable values (branch names, actor logins) — and skips pull-request runs (including
|
||||
# Dependabot's), which have no access to the webhook secret anyway.
|
||||
if: >-
|
||||
github.event.workflow_run.conclusion == 'failure' &&
|
||||
github.event.workflow_run.event == 'push'
|
||||
uses: poli0981/.github/.github/workflows/notify-ci-failure.yml@c3e118a01d40e95b36b2c3466dc206638c11eb5a # main, 2026-07-06
|
||||
secrets: inherit
|
||||
@@ -1,112 +0,0 @@
|
||||
name: Qodana
|
||||
|
||||
# JetBrains Qodana for .NET (`qodana-dotnet`, Rider's engine, on the Ultimate licence of the Qodana
|
||||
# Cloud project): ReSharper's C#, XAML and .resx inspections, the IntelliJ platform's Markdown and XML
|
||||
# inspections and JetBrains' security rules, over the whole solution. Results go to Qodana Cloud, to
|
||||
# annotations and a summary comment on the pull request, and to the run's `qodana-report` artifact
|
||||
# (SARIF and the linter's logs, for a reader without a Qodana Cloud account).
|
||||
#
|
||||
# - Native mode on a Windows runner (qodana.yaml: `withinDocker: false`): WPF (net10.0-windows) only
|
||||
# loads on Windows, and the linter reads the projects with the SDK this job installs from
|
||||
# global.json. Every setting is in qodana.yaml; nothing is an action argument.
|
||||
# - The solution is built first, so a build that fails is one red step with the compiler's own
|
||||
# message rather than a report of unresolved symbols.
|
||||
# - `pr-mode: false`: the whole solution every time, so a pull request and `main` are judged by the
|
||||
# same list. The gate (qodana.yaml) is zero problems.
|
||||
# - Advisory: not a required check of the `main` ruleset, so a finding, a Qodana Cloud outage or a
|
||||
# lapsed licence is a red job beside a green build, never a blocked merge.
|
||||
# - No `contents: write`: the job never pushes quick-fixes.
|
||||
# Requires the repository secret QODANA_TOKEN.
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
env:
|
||||
DOTNET_NOLOGO: true
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: true
|
||||
|
||||
jobs:
|
||||
token:
|
||||
# Pull requests from forks and from Dependabot get no repository secrets. Checking for the token
|
||||
# skips those runs without trusting actor or repository names from the event.
|
||||
name: Check for QODANA_TOKEN
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
permissions: {}
|
||||
outputs:
|
||||
available: ${{ steps.check.outputs.available }}
|
||||
steps:
|
||||
- name: Check for QODANA_TOKEN
|
||||
id: check
|
||||
env:
|
||||
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
|
||||
run: |
|
||||
if [ -n "$QODANA_TOKEN" ]; then
|
||||
echo "available=true" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "available=false" >> "$GITHUB_OUTPUT"
|
||||
echo "::notice::QODANA_TOKEN is not available to this run (fork or Dependabot pull request); skipping the analysis."
|
||||
fi
|
||||
|
||||
qodana:
|
||||
name: Qodana
|
||||
needs: token
|
||||
if: needs.token.outputs.available == 'true'
|
||||
# WPF (net10.0-windows) only builds on Windows, and the linter runs natively beside the SDK.
|
||||
runs-on: windows-latest
|
||||
timeout-minutes: 60
|
||||
permissions:
|
||||
contents: read
|
||||
checks: write # the annotations
|
||||
pull-requests: write # the summary comment
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
# The pull request's own commit, not its merge commit (empty on a push or a dispatch, which
|
||||
# then check out the commit that started them).
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
fetch-depth: 0 # full history: Qodana's reports are VCS-aware
|
||||
persist-credentials: false
|
||||
|
||||
- uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6.1.0
|
||||
with:
|
||||
global-json-file: global.json
|
||||
|
||||
# Outside the workspace: the linter reads every file under the repository root.
|
||||
- name: Cache NuGet packages
|
||||
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||
with:
|
||||
path: ~/.nuget/packages
|
||||
key: nuget-qodana-${{ runner.os }}-${{ hashFiles('global.json', 'Directory.Build.props', '**/*.csproj') }}
|
||||
restore-keys: nuget-qodana-${{ runner.os }}-
|
||||
|
||||
- name: Restore
|
||||
run: dotnet restore CommandForge.slnx
|
||||
|
||||
- name: Build what the linter loads
|
||||
run: dotnet build CommandForge.slnx -c Release --no-restore
|
||||
|
||||
# Caches are saved from `main` only (a pull request reads them), under keys of this job's own.
|
||||
- name: Qodana Scan
|
||||
uses: JetBrains/qodana-action@3e8d76ff0e0241618abd808682f426afe84bab3f # v2026.2.2
|
||||
with:
|
||||
pr-mode: false
|
||||
upload-result: true
|
||||
artifact-name: qodana-report
|
||||
cache-default-branch-only: true
|
||||
primary-cache-key: qodana-${{ github.ref_name }}-${{ github.sha }}
|
||||
additional-cache-key: qodana-main
|
||||
env:
|
||||
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
|
||||
QODANA_ENDPOINT: https://qodana.cloud
|
||||
@@ -1,191 +0,0 @@
|
||||
name: Release
|
||||
|
||||
# Triggered by pushing a SemVer tag (vX.Y.Z). Builds a self-contained, Velopack-packaged
|
||||
# release and publishes it to GitHub Releases with build-provenance attestations, SHA-256
|
||||
# checksums, an SPDX SBOM and (optionally) a VirusTotal scan. No code signing yet (see SECURITY.md).
|
||||
|
||||
on:
|
||||
push:
|
||||
tags: ['v*']
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: 'Version without the leading v (e.g. 2.0.0)'
|
||||
required: true
|
||||
type: string
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: release
|
||||
cancel-in-progress: false
|
||||
|
||||
env:
|
||||
DOTNET_NOLOGO: true
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: true
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: windows-latest
|
||||
timeout-minutes: 45
|
||||
permissions:
|
||||
contents: write # create the release and upload assets
|
||||
id-token: write # OIDC for build-provenance attestations
|
||||
attestations: write
|
||||
outputs:
|
||||
tag: ${{ steps.ver.outputs.tag }}
|
||||
env:
|
||||
REPO_URL: https://github.com/${{ github.repository }}
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
VT_API_KEY: ${{ secrets.VT_API_KEY }}
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6.1.0
|
||||
with:
|
||||
global-json-file: global.json
|
||||
|
||||
- name: Resolve version and tag
|
||||
id: ver
|
||||
shell: pwsh
|
||||
env:
|
||||
EVENT_NAME: ${{ github.event_name }}
|
||||
INPUT_VERSION: ${{ github.event.inputs.version }}
|
||||
REF_NAME: ${{ github.ref_name }}
|
||||
run: |
|
||||
if ($env:EVENT_NAME -eq 'workflow_dispatch') {
|
||||
$version = $env:INPUT_VERSION
|
||||
$tag = "v$version"
|
||||
} else {
|
||||
$tag = $env:REF_NAME
|
||||
$version = $tag -replace '^v', ''
|
||||
}
|
||||
if ($version -notmatch '^\d+\.\d+\.\d+$') { throw "Version '$version' is not X.Y.Z" }
|
||||
"version=$version" >> $env:GITHUB_OUTPUT
|
||||
"tag=$tag" >> $env:GITHUB_OUTPUT
|
||||
Write-Host "Releasing $version (tag $tag)"
|
||||
|
||||
- name: Restore pinned tools (vpk)
|
||||
run: dotnet tool restore
|
||||
|
||||
- name: Download previous release (delta base)
|
||||
continue-on-error: true # the very first release has nothing to download
|
||||
shell: pwsh
|
||||
run: dotnet vpk download github --repoUrl $env:REPO_URL --token $env:GH_TOKEN
|
||||
|
||||
- name: Publish + pack (Velopack)
|
||||
shell: pwsh
|
||||
env:
|
||||
VERSION: ${{ steps.ver.outputs.version }}
|
||||
run: ./scripts/pack.ps1 -Version $env:VERSION
|
||||
|
||||
- name: Attest build provenance
|
||||
uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2
|
||||
with:
|
||||
# Only what this run built: Releases/ also holds the previous version's full package,
|
||||
# downloaded above just to compute the delta.
|
||||
subject-path: |
|
||||
Releases/*-Setup.exe
|
||||
Releases/*-Portable.zip
|
||||
Releases/CommandForge-${{ steps.ver.outputs.version }}-*.nupkg
|
||||
|
||||
# Upload as a DRAFT first: publishing is what makes installed copies auto-update, so the
|
||||
# release only goes live once every asset (SBOM, checksums, scan links) is attached.
|
||||
- name: Create draft GitHub Release (Velopack)
|
||||
shell: pwsh
|
||||
env:
|
||||
VERSION: ${{ steps.ver.outputs.version }}
|
||||
TAG: ${{ steps.ver.outputs.tag }}
|
||||
run: >-
|
||||
dotnet vpk upload github
|
||||
--repoUrl $env:REPO_URL
|
||||
--token $env:GH_TOKEN
|
||||
--releaseName "CommandForge $env:VERSION"
|
||||
--tag $env:TAG
|
||||
|
||||
- name: SBOM + SHA-256 checksums
|
||||
shell: pwsh
|
||||
env:
|
||||
TAG: ${{ steps.ver.outputs.tag }}
|
||||
REPOSITORY: ${{ github.repository }}
|
||||
run: |
|
||||
$rel = Join-Path (Get-Location) 'Releases'
|
||||
$sbom = Join-Path $rel 'sbom.spdx.json'
|
||||
gh api "repos/$env:REPOSITORY/dependency-graph/sbom" --jq '.sbom' | Out-File $sbom -Encoding utf8NoBOM
|
||||
$checksums = Join-Path $rel 'checksums.txt'
|
||||
# Hash exactly what the release offers for download: the assets vpk uploaded plus the
|
||||
# SBOM (Releases/ also holds unpublished files, such as the previous full package).
|
||||
$published = @(gh release view $env:TAG --json assets --jq '.assets[].name') + 'sbom.spdx.json'
|
||||
# Filter with Where-Object, not Get-ChildItem -Exclude (which returns nothing without a
|
||||
# trailing wildcard/-Recurse and once produced an empty checksums.txt).
|
||||
Get-ChildItem -Path $rel -File |
|
||||
Where-Object { $_.Name -ne 'checksums.txt' -and $published -contains $_.Name } |
|
||||
Get-FileHash -Algorithm SHA256 |
|
||||
ForEach-Object { '{0} {1}' -f $_.Hash.ToLower(), (Split-Path $_.Path -Leaf) } |
|
||||
Out-File $checksums -Encoding ascii
|
||||
gh release upload $env:TAG $sbom $checksums --clobber
|
||||
|
||||
# Set before publishing, so the release and its Discord announcement never go out empty.
|
||||
- name: Release notes from CHANGELOG.md
|
||||
shell: pwsh
|
||||
env:
|
||||
VERSION: ${{ steps.ver.outputs.version }}
|
||||
TAG: ${{ steps.ver.outputs.tag }}
|
||||
run: |
|
||||
$changelog = (Get-Content CHANGELOG.md -Raw) -replace "`r`n", "`n"
|
||||
$pattern = "(?ms)^## \[$([regex]::Escape($env:VERSION))\][^\n]*\n(.*?)(?=^## \[|^\[[^\]]+\]: |\z)"
|
||||
$section = [regex]::Match($changelog, $pattern, 'None', [TimeSpan]::FromSeconds(5))
|
||||
if ($section.Success -and $section.Groups[1].Value.Trim()) {
|
||||
$section.Groups[1].Value.Trim() | gh release edit $env:TAG --notes-file -
|
||||
} else {
|
||||
Write-Warning "CHANGELOG.md has no section for $env:VERSION; the release notes stay empty."
|
||||
}
|
||||
|
||||
- name: Publish the release
|
||||
shell: pwsh
|
||||
env:
|
||||
TAG: ${{ steps.ver.outputs.tag }}
|
||||
run: gh release edit $env:TAG --draft=false --latest
|
||||
|
||||
- name: VirusTotal scan (optional)
|
||||
id: vt
|
||||
if: env.VT_API_KEY != ''
|
||||
uses: crazy-max/ghaction-virustotal@936d8c5c00afe97d3d9a1af26d017cfdf26800a2 # v5.0.0
|
||||
with:
|
||||
vt_api_key: ${{ env.VT_API_KEY }}
|
||||
files: |
|
||||
Releases/*-Setup.exe
|
||||
Releases/CommandForge-${{ steps.ver.outputs.version }}-full.nupkg
|
||||
|
||||
# The action's own update_release_body only works on `release` events, and this workflow
|
||||
# runs on tag pushes, so the report links are appended here.
|
||||
- name: Add VirusTotal links to the release notes
|
||||
if: steps.vt.outputs.analysis != ''
|
||||
shell: pwsh
|
||||
env:
|
||||
TAG: ${{ steps.ver.outputs.tag }}
|
||||
ANALYSIS: ${{ steps.vt.outputs.analysis }}
|
||||
run: |
|
||||
# ANALYSIS is "path=analysis-url,path=analysis-url"; link each file's permanent report.
|
||||
$links = foreach ($pair in $env:ANALYSIS -split ',') {
|
||||
$file = ($pair -split '=', 2)[0]
|
||||
$hash = (Get-FileHash $file -Algorithm SHA256).Hash.ToLower()
|
||||
'- [{0}](https://www.virustotal.com/gui/file/{1})' -f (Split-Path $file -Leaf), $hash
|
||||
}
|
||||
$body = (gh release view $env:TAG --json body --jq '.body') -join "`n"
|
||||
$notes = (@($body.TrimEnd(), '', '### VirusTotal', '') + $links) -join "`n"
|
||||
$notes | gh release edit $env:TAG --notes-file -
|
||||
|
||||
announce:
|
||||
# A release published with GITHUB_TOKEN does not fire the `release` event, so the standalone
|
||||
# announce workflow never ran for tag releases — call the shared announcer directly instead.
|
||||
needs: release
|
||||
permissions:
|
||||
contents: read
|
||||
uses: poli0981/.github/.github/workflows/announce-release.yml@c3e118a01d40e95b36b2c3466dc206638c11eb5a # main, 2026-07-06
|
||||
with:
|
||||
tag_override: ${{ needs.release.outputs.tag }}
|
||||
secrets: inherit
|
||||
@@ -1,45 +0,0 @@
|
||||
name: Scorecard
|
||||
|
||||
# OpenSSF Scorecard supply-chain checks; results land in Security → Code scanning.
|
||||
|
||||
on:
|
||||
branch_protection_rule:
|
||||
schedule:
|
||||
- cron: '25 6 * * 1' # Mondays 06:25 UTC
|
||||
push:
|
||||
branches: [main]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
analysis:
|
||||
name: Scorecard analysis
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write # upload SARIF
|
||||
id-token: write # publish results to the OpenSSF API / badge
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- uses: ossf/scorecard-action@fa7117db83c52d787ae5a89f350999701505d78e # v2.5.0
|
||||
with:
|
||||
results_file: results.sarif
|
||||
results_format: sarif
|
||||
publish_results: true
|
||||
|
||||
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
||||
with:
|
||||
name: scorecard-sarif
|
||||
path: results.sarif
|
||||
retention-days: 5
|
||||
|
||||
- uses: github/codeql-action/upload-sarif@33d7b85da1a04171e211befe2c739303b9a4c066 # v4.39.3
|
||||
with:
|
||||
sarif_file: results.sarif
|
||||
@@ -1,126 +0,0 @@
|
||||
name: SonarCloud
|
||||
|
||||
# CI-based SonarCloud analysis (it replaced Automatic Analysis, which can't import coverage): the
|
||||
# solution is built between the scanner's begin and end steps, the tests run with OpenCover
|
||||
# coverage, and the SonarCloud GitHub App reports the quality gate on pull requests. The scanner
|
||||
# turns TreatWarningsAsErrors off for its build, so build.yml stays the warnings-as-errors check.
|
||||
# Requires the repository secret SONAR_TOKEN.
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
env:
|
||||
DOTNET_NOLOGO: true
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: true
|
||||
|
||||
jobs:
|
||||
token:
|
||||
# Pull requests from forks and from Dependabot get no repository secrets. Checking for the token
|
||||
# skips those runs without trusting actor or repository names from the event.
|
||||
name: Check for SONAR_TOKEN
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
permissions: {}
|
||||
outputs:
|
||||
available: ${{ steps.check.outputs.available }}
|
||||
steps:
|
||||
- name: Check for SONAR_TOKEN
|
||||
id: check
|
||||
env:
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
run: |
|
||||
if [ -n "$SONAR_TOKEN" ]; then
|
||||
echo "available=true" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "available=false" >> "$GITHUB_OUTPUT"
|
||||
echo "::notice::SONAR_TOKEN is not available to this run (fork or Dependabot pull request); skipping the analysis."
|
||||
fi
|
||||
|
||||
analysis:
|
||||
name: SonarCloud
|
||||
needs: token
|
||||
if: needs.token.outputs.available == 'true'
|
||||
# WPF (net10.0-windows) only builds on Windows.
|
||||
runs-on: windows-latest
|
||||
timeout-minutes: 30
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
fetch-depth: 0 # full history: SonarCloud uses blame to tell new code from old
|
||||
persist-credentials: false
|
||||
|
||||
- uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6.1.0
|
||||
with:
|
||||
global-json-file: global.json
|
||||
|
||||
# Both caches stay outside the workspace: the scanner also analyzes every .json, .yml and .ps1
|
||||
# file under the repository root.
|
||||
- name: Cache NuGet packages
|
||||
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||
with:
|
||||
path: ~/.nuget/packages
|
||||
key: nuget-sonar-${{ runner.os }}-${{ hashFiles('global.json', 'Directory.Build.props', '**/*.csproj', '.config/dotnet-tools.json') }}
|
||||
restore-keys: nuget-sonar-${{ runner.os }}-
|
||||
|
||||
- name: Cache SonarCloud analyzers and JRE
|
||||
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||
with:
|
||||
path: ~/.sonar/cache
|
||||
key: sonar-${{ runner.os }}-${{ hashFiles('.config/dotnet-tools.json') }}
|
||||
restore-keys: sonar-${{ runner.os }}-
|
||||
|
||||
- name: Restore pinned tools (dotnet-sonarscanner)
|
||||
run: dotnet tool restore
|
||||
|
||||
# The project version drives SonarCloud's "previous version" new-code period.
|
||||
# Roslyn rules already fail the build in build.yml, so their Info-level suggestions aren't
|
||||
# imported as external issues. Coverage skips XAML code-behind and the two entry points (the
|
||||
# app and the Elevator); the catalog JSON and the .resx files repeat structure by design.
|
||||
- name: Begin analysis
|
||||
shell: pwsh
|
||||
env:
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
run: |
|
||||
$version = "$(dotnet msbuild src/CommandForge.Domain/CommandForge.Domain.csproj -getProperty:Version | Select-Object -Last 1)".Trim()
|
||||
if ($LASTEXITCODE -ne 0 -or $version -notmatch '^\d+\.\d+\.\d+$') { throw "Unexpected project version '$version'." }
|
||||
$scannerArgs = @(
|
||||
'begin', '/k:poli0981_CommandForge', '/o:poli0981', "/v:$version",
|
||||
'/d:sonar.host.url=https://sonarcloud.io', "/d:sonar.token=$env:SONAR_TOKEN",
|
||||
'/d:sonar.cs.opencover.reportsPaths=TestResults/**/coverage.opencover.xml',
|
||||
'/d:sonar.cs.vstest.reportsPaths=TestResults/*.trx',
|
||||
'/d:sonar.cs.roslyn.ignoreIssues=true',
|
||||
'/d:sonar.exclusions=**/bin/**,**/obj/**,**/TestResults/**',
|
||||
'/d:sonar.coverage.exclusions=**/*.xaml.cs,**/Program.cs',
|
||||
'/d:sonar.cpd.exclusions=**/Catalog/*.json,**/*.resx'
|
||||
)
|
||||
dotnet sonarscanner @scannerArgs
|
||||
if ($LASTEXITCODE -ne 0) { throw "SonarScanner begin failed with exit code $LASTEXITCODE." }
|
||||
|
||||
- name: Build
|
||||
# Real source paths in the PDBs (not the /_/ deterministic ones), so coverage maps to files.
|
||||
run: dotnet build CommandForge.slnx -c Release --no-incremental -p:ContinuousIntegrationBuild=false
|
||||
|
||||
- name: Test with coverage
|
||||
run: >-
|
||||
dotnet test CommandForge.slnx -c Release --no-build
|
||||
--collect "XPlat Code Coverage;Format=opencover"
|
||||
--logger "trx;LogFileName=test-results.trx"
|
||||
--results-directory TestResults
|
||||
|
||||
- name: End analysis
|
||||
env:
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
run: dotnet sonarscanner end "/d:sonar.token=$env:SONAR_TOKEN"
|
||||
@@ -24,6 +24,8 @@ publish/
|
||||
AppPackages/
|
||||
*.nupkg
|
||||
*.snupkg
|
||||
# scripts/release-assets.ps1 (SBOM, SHA256SUMS, release notes)
|
||||
r2-release/
|
||||
|
||||
# ── .NET / NuGet ────────────────────────────────────────────────
|
||||
project.lock.json
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
<!--
|
||||
Thank you for telling us. You never need to tell us anything about yourself or a disability: what you
|
||||
use and what happened is enough. Screenshots and recordings help but are optional. Accessibility fixes
|
||||
are always in scope.
|
||||
|
||||
If you couldn't read or answer a Caution or Dangerous confirmation, say so below: it is a safety
|
||||
problem too, and it is handled first.
|
||||
|
||||
Rather not post in public? Write to accessibility@poli0981.dev instead. What CommandForge aims for and
|
||||
what it can't do yet: https://git.poli0981.dev/poli0981/CommandForge/src/branch/main/ACCESSIBILITY.md
|
||||
-->
|
||||
|
||||
## What were you trying to do?
|
||||
|
||||
<!-- e.g. run a command from the catalog, read a command's output, change the theme -->
|
||||
|
||||
## What happened instead?
|
||||
|
||||
<!-- What you heard, saw or could not do, and what you expected. -->
|
||||
|
||||
## How to get there
|
||||
|
||||
1. Open the catalog (Ctrl+F)
|
||||
2. Tab to …
|
||||
3. …
|
||||
|
||||
## CommandForge version
|
||||
|
||||
<!-- More (⋯) → About, or Settings → About -->
|
||||
|
||||
## Windows version
|
||||
|
||||
<!-- e.g. Windows 11 24H2 (26100): run winver -->
|
||||
|
||||
## What do you use?
|
||||
|
||||
<!-- Keyboard only / Narrator / NVDA / JAWS / Windows Magnifier / a Windows contrast theme /
|
||||
a larger text size or display scaling / Voice Access or other speech input / something else -->
|
||||
|
||||
## Its version, if you know it
|
||||
|
||||
<!-- e.g. NVDA 2026.1 -->
|
||||
|
||||
## How much does it stop you?
|
||||
|
||||
<!-- Optional: Not sure / Critical (I can't do the task at all) / Serious (only with great difficulty or
|
||||
a workaround) / Moderate (it is tiring or inconsistent) / Minor (it barely gets in the way) -->
|
||||
|
||||
## Anything else
|
||||
|
||||
<!-- A screenshot, a recording, or the log file from More (⋯) → Report a bug (you review it before
|
||||
attaching). -->
|
||||
|
||||
/label ~accessibility
|
||||
@@ -0,0 +1,39 @@
|
||||
<!--
|
||||
Thanks for the report. Get straight to the point: vague or off-topic reports may be closed (see
|
||||
CONTRIBUTING.md: https://git.poli0981.dev/poli0981/CommandForge/src/branch/main/.github/CONTRIBUTING.md).
|
||||
Do NOT report security vulnerabilities here: e-mail security@poli0981.dev instead.
|
||||
|
||||
A catalog command that is outdated or uses the wrong syntax has its own template (Command), and so
|
||||
does a barrier for the keyboard, a screen reader or larger text (Accessibility). In the app,
|
||||
More (⋯) → Report a bug fills this template in.
|
||||
-->
|
||||
|
||||
## What happened?
|
||||
|
||||
<!-- What you expected vs. what actually happened. -->
|
||||
|
||||
## Steps to reproduce
|
||||
|
||||
1. Open …
|
||||
2. Run command …
|
||||
3. See …
|
||||
|
||||
## CommandForge version
|
||||
|
||||
<!-- More (⋯) → About CommandForge, e.g. 2.3.0 -->
|
||||
|
||||
## Windows version / build
|
||||
|
||||
<!-- e.g. Windows 11 23H2 (22631): run `winver` -->
|
||||
|
||||
## Logs (optional)
|
||||
|
||||
<!-- Optionally attach the log from More (⋯) → Report a bug → Export log (.zip). Review it first: it
|
||||
may contain machine-specific paths and names. Do not paste secrets. -->
|
||||
|
||||
## Confirmations
|
||||
|
||||
- [ ] I'm using the latest release.
|
||||
- [ ] This is not a security vulnerability (those go to security@poli0981.dev).
|
||||
|
||||
/label ~bug
|
||||
@@ -0,0 +1,52 @@
|
||||
<!--
|
||||
Every command in CommandForge is a vetted entry of its read-only catalog. A request is checked
|
||||
against Microsoft's documentation and tried before it ships: see "Adding a command" in
|
||||
https://git.poli0981.dev/poli0981/CommandForge/src/branch/main/.github/CONTRIBUTING.md#adding-a-command
|
||||
|
||||
A command that could cause harm (it deletes what it shouldn't, weakens security, or does something
|
||||
other than it says) is a security problem: e-mail security@poli0981.dev, do NOT report it here.
|
||||
-->
|
||||
|
||||
## What should change?
|
||||
|
||||
<!-- One of: Add a command / Fix a command (outdated, wrong syntax, wrong danger level) / Remove a command -->
|
||||
|
||||
## Command (to fix or remove)
|
||||
|
||||
<!-- Its title as the app shows it, or its ID from the command's details, e.g. Flush DNS cache (net.flushdns) -->
|
||||
|
||||
## Command line
|
||||
|
||||
<!-- The exact command line it should run (for a new or fixed command). -->
|
||||
|
||||
```shell
|
||||
|
||||
```
|
||||
|
||||
## What it does and why
|
||||
|
||||
<!-- What the command does and who needs it; for a fix, what goes wrong today. -->
|
||||
|
||||
## Danger level
|
||||
|
||||
<!-- Safe: read-only or undone the way it was made. Caution: changes system state, recoverable.
|
||||
Dangerous: may lose data or leave Windows unstable. Or: Not sure. -->
|
||||
|
||||
## Needs administrator rights?
|
||||
|
||||
<!-- Yes / No / Not sure -->
|
||||
|
||||
## Windows versions
|
||||
|
||||
<!-- Where it works, or where it stopped working, e.g. Windows 11 24H2 and later -->
|
||||
|
||||
## Sources
|
||||
|
||||
<!-- Microsoft's documentation, or another reliable reference for the command and its syntax. -->
|
||||
|
||||
## Confirmations
|
||||
|
||||
- [ ] The command is a tool that comes with Windows (nothing downloaded from elsewhere).
|
||||
- [ ] It is not a command that could cause harm (those go to security@poli0981.dev).
|
||||
|
||||
/label ~catalog
|
||||
@@ -0,0 +1,28 @@
|
||||
<!--
|
||||
CommandForge is in maintenance mode. A new feature is added only when it clearly fits the project
|
||||
and is genuinely necessary, for example to keep the app safe or working on a new Windows build.
|
||||
Other requests are closed with a link to the policy:
|
||||
https://git.poli0981.dev/poli0981/CommandForge/src/branch/main/.github/CONTRIBUTING.md#maintenance-mode-what-we-accept
|
||||
|
||||
A catalog command to add, fix or remove has its own template: Command.
|
||||
-->
|
||||
|
||||
## Maintenance mode
|
||||
|
||||
- [ ] I have read the maintenance-mode policy, and this is not a catalog command.
|
||||
|
||||
## Problem / motivation
|
||||
|
||||
<!-- What are you trying to do, and why is it hard today? -->
|
||||
|
||||
## Why is it necessary?
|
||||
|
||||
<!-- What breaks, or stays unsafe or out of reach, without it? -->
|
||||
|
||||
## Proposed solution
|
||||
|
||||
<!-- What should CommandForge do? -->
|
||||
|
||||
## Alternatives considered
|
||||
|
||||
/label ~enhancement
|
||||
@@ -0,0 +1,31 @@
|
||||
<!--
|
||||
CommandForge is shown in English, Vietnamese, Japanese, Simplified Chinese and Spanish. The text other
|
||||
than English is AI-translated, so corrections from people who speak the language are very welcome.
|
||||
-->
|
||||
|
||||
## Language
|
||||
|
||||
<!-- English / Tiếng Việt / 日本語 / 简体中文 / Español -->
|
||||
|
||||
## Where in the app
|
||||
|
||||
<!-- e.g. Settings › Appearance, or the confirmation of a Dangerous command -->
|
||||
|
||||
## Text today
|
||||
|
||||
## Suggested text
|
||||
|
||||
## What is wrong with it?
|
||||
|
||||
<!-- It doesn't suit the culture or the local tone / The spelling or wording could mislead /
|
||||
The meaning is wrong / Something else -->
|
||||
|
||||
## Anything else
|
||||
|
||||
<!-- Why the suggested text is better, or other places with the same wording. -->
|
||||
|
||||
## Confirmations
|
||||
|
||||
- [ ] I'm using the latest release (the text may have changed already).
|
||||
|
||||
/label ~translation
|
||||
@@ -0,0 +1,33 @@
|
||||
<!--
|
||||
Keep merge requests focused and small. Read CONTRIBUTING.md before submitting:
|
||||
https://git.poli0981.dev/poli0981/CommandForge/src/branch/main/.github/CONTRIBUTING.md
|
||||
|
||||
This is the GitLab mirror. GitLab CI does not run here: the maintainer applies the change on Gitea
|
||||
(the canonical repository), where CI runs, and the mirror then shows this merge request as merged.
|
||||
Do NOT delete tests or use --no-verify to bypass hooks.
|
||||
-->
|
||||
|
||||
## Summary
|
||||
|
||||
<!-- What does this merge request change, and why? -->
|
||||
|
||||
## Related issue
|
||||
|
||||
<!-- e.g. Closes #123 -->
|
||||
|
||||
## Scope
|
||||
|
||||
<!-- CommandForge is in maintenance mode: .github/CONTRIBUTING.md#maintenance-mode-what-we-accept -->
|
||||
|
||||
- [ ] This is within maintenance mode: a dependency or security update, a platform update, a catalog command added, fixed or removed, a bug, UI/UX or accessibility fix, or a translation fix, or a new feature agreed in an issue as genuinely necessary
|
||||
|
||||
## Checklist
|
||||
|
||||
- [ ] `dotnet build -c Release` passes with **0 warnings**
|
||||
- [ ] `dotnet test` passes (and I added/updated tests for new behavior)
|
||||
- [ ] `dotnet format --verify-no-changes` passes; no unrelated reformatting
|
||||
- [ ] No tests deleted/disabled; hooks not bypassed (`--no-verify` not used)
|
||||
- [ ] New or changed UI text is in all five `Strings*.resx` files (EN, VI, JA, zh-Hans, ES), no hardcoded strings
|
||||
- [ ] If I added a command: it's a vetted catalog entry with correct `requiresAdmin`/`dangerLevel`, strings in all five languages, and no arbitrary-execution path
|
||||
- [ ] If I changed a screen: every control without text has an `AutomationProperties.Name` from the `.resx`, list items are named by what they show, icons are `ctl:DecorativeIcon`, and I tried it with the keyboard alone (and Narrator if I could): see ACCESSIBILITY.md, "For contributors"
|
||||
- [ ] **AI disclosure:** I have disclosed any AI assistance used (delete if none)
|
||||
+3
-3
@@ -138,10 +138,10 @@ Each one with what to do instead. A barrier that is not on this list is worth re
|
||||
|
||||
## Report an accessibility problem
|
||||
|
||||
1. Open an issue with the
|
||||
[Accessibility problem form](https://github.com/poli0981/CommandForge/issues/new?template=accessibility.yml),
|
||||
1. Open an issue on the GitLab mirror with the
|
||||
[Accessibility template](https://gitlab.com/poli0981/CommandForge/-/issues/new?issuable_template=Accessibility),
|
||||
or write to **[accessibility@poli0981.dev](mailto:accessibility@poli0981.dev)** if you'd rather not
|
||||
use GitHub or not post in public.
|
||||
use GitLab or not post in public.
|
||||
2. Say what you were trying to do and what happened instead; your CommandForge version (More ▸ About)
|
||||
and your Windows version; and what you use — the keyboard alone, Narrator, NVDA, JAWS, Magnifier,
|
||||
a contrast theme, a larger text size — with its version. The steps to get there help, and so does
|
||||
|
||||
@@ -37,10 +37,10 @@ dotnet format CommandForge.slnx --verify-no-changes # CI gate
|
||||
```
|
||||
|
||||
The build treats warnings as errors and enforces the .NET analyzers, code style
|
||||
(`EnforceCodeStyleInBuild`) and **SonarAnalyzer.CSharp** (the same rules SonarCloud applies),
|
||||
(`EnforceCodeStyleInBuild`) and **SonarAnalyzer.CSharp** (Sonar's C# rules as a Roslyn analyzer),
|
||||
including unused-using and unused-member rules.
|
||||
|
||||
To see coverage the way CI measures it (Coverlet, OpenCover format):
|
||||
To measure test coverage (Coverlet, OpenCover format):
|
||||
|
||||
```bash
|
||||
dotnet test CommandForge.slnx --collect "XPlat Code Coverage;Format=opencover"
|
||||
@@ -49,14 +49,16 @@ dotnet test CommandForge.slnx --collect "XPlat Code Coverage;Format=opencover"
|
||||
## Dependencies
|
||||
|
||||
- Package versions live in **each `.csproj`**; SonarAnalyzer is referenced once from
|
||||
`Directory.Build.props`. Central Package Management is deliberately not used: GitHub's dependency
|
||||
graph (Dependabot alerts, dependency review, the release SBOM) doesn't read
|
||||
`Directory.Packages.props`.
|
||||
`Directory.Build.props`. Central Package Management is not used (a convention from the GitHub
|
||||
days, when the dependency graph didn't read `Directory.Packages.props`; Renovate reads both).
|
||||
- Every restore runs a **NuGet audit** of direct and transitive packages; moderate or higher
|
||||
advisories fail the build.
|
||||
- Dependabot groups updates (Velopack and the `vpk` tool move together) with a cooldown. It skips
|
||||
new major versions of the .NET SDK and of `Microsoft.Extensions.*`: moving to a new .NET major is
|
||||
a deliberate migration, done by hand.
|
||||
- A self-hosted **Renovate** on Gitea (the shared preset `poli0981/renovate-config`, plus
|
||||
`renovate.json`) proposes updates: minor and patch ones grouped, each held for 3 days after
|
||||
release, security fixes at once. Velopack and the `vpk` tool move together; majors wait for
|
||||
approval on the Dependency Dashboard, and new majors of the .NET SDK and of
|
||||
`Microsoft.Extensions.*` are never proposed: moving to a new .NET major is a deliberate
|
||||
migration, done by hand.
|
||||
|
||||
## Publish (self-contained) + package
|
||||
|
||||
@@ -88,31 +90,33 @@ It writes these artifacts to `Releases/`:
|
||||
present; see [UPDATES.md](UPDATES.md))
|
||||
- `releases.win.json` / `RELEASES` — the update manifest read by the app
|
||||
|
||||
`scripts/release-assets.ps1 -Version <X.Y.Z>`, run after `pack.ps1`, adds what a release publishes
|
||||
next to them: the CycloneDX SBOM, `SHA256SUMS` and the release notes, under `r2-release/` (the
|
||||
release workflow runs both; locally they are a dry run).
|
||||
|
||||
> No Authenticode signing yet — see [SECURITY.md](.github/SECURITY.md). Don't add a signing step
|
||||
> until Azure Trusted Signing (or SignPath Foundation for OSS) is set up.
|
||||
|
||||
## CI
|
||||
|
||||
All workflows pin actions to full commit SHAs and use least-privilege permissions.
|
||||
CI runs on **Gitea Actions** at `git.poli0981.dev/poli0981/CommandForge`, on the maintainer's
|
||||
own runner: `windows-latest` jobs run in host mode on a Windows 11 PC, `ubuntu-latest` jobs in
|
||||
Docker. The runner is online when the PC is on, so a run can wait; scheduled jobs only fall in
|
||||
13:00–16:00 UTC. The shared workflows come from the ops repository `poli0981/.github`, pinned by
|
||||
commit SHA (its migration runbook is `docs/GITEA-MIGRATION.md` there). All workflows pin actions
|
||||
to full commit SHAs and use least-privilege permissions.
|
||||
|
||||
| Workflow | What it does |
|
||||
|---|---|
|
||||
| `build.yml` | `build`: restore, `dotnet format --verify-no-changes`, Release build, tests (results and coverage uploaded). `package`: publish and `vpk pack` exactly like a release. |
|
||||
| `codeql.yml` | CodeQL for C# (Windows, manual build) and for the workflows themselves (`actions`). |
|
||||
| `sonarcloud.yml` | SonarCloud analysis with test coverage: the SonarScanner for .NET (pinned in `.config/dotnet-tools.json`) wraps a Release build and an OpenCover test run, and the SonarCloud app reports the quality gate on the PR. Needs the `SONAR_TOKEN` secret, so PRs from forks and Dependabot are skipped. |
|
||||
| `qodana.yml` | JetBrains Qodana for .NET (Rider's inspections, native mode on Windows) over the whole solution, after a Release build; settings in `qodana.yaml`, and the gate is zero problems. Results go to Qodana Cloud, to annotations and a comment on the PR, and to the `qodana-report` artifact. Advisory (not a required check). Needs the `QODANA_TOKEN` secret, so PRs from forks and Dependabot are skipped. |
|
||||
| `dependency-review.yml` | Fails a PR that adds a dependency with a moderate+ vulnerability or a license outside the GPLv3-compatible allow-list. |
|
||||
| `scorecard.yml` | OpenSSF Scorecard, reported to code scanning. |
|
||||
| `release.yml` | Tag-triggered release — see [RELEASING.md](RELEASING.md). |
|
||||
| `notify-ci-failure.yml` | Posts a Discord alert when the Build, SonarCloud or Qodana workflow fails on `main` (needs the `DISCORD_CI_WEBHOOK` secret). |
|
||||
| `build.yml` | `build`: restore, `dotnet format --verify-no-changes`, Release build, tests (results and coverage kept as an artifact). `package`: publish and `vpk pack` exactly like a release. |
|
||||
| `security.yml` | `workflow-lint`: actionlint + shellcheck on the workflows. `scan` (ops `security.yml`): gitleaks over the full history, Opengrep (SAST, report only), osv-scanner, and a NuGetAudit restore that fails on high/critical advisories. Also weekly, Friday 14:11 UTC. |
|
||||
| `qodana.yml` | JetBrains Qodana for .NET (Rider's inspections, native mode on Windows) over the whole solution, after a Release build, through the ops `reusable-qodana.yml` (Qodana CLI); settings in `qodana.yaml`, and the gate is zero problems. Results go to Qodana Cloud and the `qodana-report` artifact. Advisory. Needs the `QODANA_TOKEN` secret. |
|
||||
| `release.yml` | Tag-triggered release to Cloudflare R2 and a Gitea release — see [RELEASING.md](RELEASING.md). A manual run on a branch is a dry run. |
|
||||
| `announce-release.yml` | Posts a release to Discord (also called by `release.yml`). |
|
||||
| `notify-ci-failure.yml` | Posts a Discord alert when Build, Qodana or Security fails on `main` (`DISCORD_CI_WEBHOOK`). |
|
||||
| `notify-release-pipeline.yml` | Posts every Release run's result to Discord (`DISCORD_RELEASE_PIPELINE_WEBHOOK`). |
|
||||
|
||||
The SonarCloud quality gate ("Sonar way") expects new code to be at least 80% covered by tests,
|
||||
with no new issues. XAML code-behind and the two entry points (`Program.cs` of the app and of the
|
||||
Elevator) are left out of coverage. Roslyn rules aren't imported as external issues there, since
|
||||
the build already fails on them. Snyk also checks every PR.
|
||||
|
||||
`main` is protected by a repository ruleset: changes land through pull requests; `build`,
|
||||
`package`, `Analyze (csharp)`, `Analyze (actions)` and `dependency-review` must pass; and a PR
|
||||
can't introduce CodeQL errors or high-severity security alerts.
|
||||
`main` is protected on Gitea: no force push or deletion, and changes land through pull requests
|
||||
whose `Build` checks pass.
|
||||
|
||||
See [UPDATES.md](UPDATES.md) for how auto-update works.
|
||||
+56
-12
@@ -7,6 +7,49 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [2.3.0] — 2026-11-26
|
||||
|
||||
CommandForge has moved off GitHub, where the account behind the project was suspended: the source
|
||||
now lives at [git.poli0981.dev](https://git.poli0981.dev/poli0981/CommandForge), issues go to the
|
||||
[GitLab mirror](https://gitlab.com/poli0981/CommandForge/-/issues), and releases and updates come
|
||||
from `releases.poli0981.dev`. **If you have 2.2.0 or older, install this version once by hand**
|
||||
([installer](https://releases.poli0981.dev/commandforge/CommandForge-win-Setup.exe)): those
|
||||
versions look for updates on GitHub and will never find one. Run it over your installation; your
|
||||
settings, favorites, history, recipes and commands stay.
|
||||
|
||||
### Fixed
|
||||
- **Updates** work again: the app checks `https://releases.poli0981.dev/commandforge` (Cloudflare
|
||||
R2) for new versions, the only address it contacts on its own. When a check fails, the message
|
||||
names "the update server" instead of GitHub; offline, not found (404), refused or rate-limited
|
||||
(403/429) and server errors (5xx) are still told apart.
|
||||
- **Links** that opened GitHub open the project on Gitea: **Source code** (it was "GitHub") in
|
||||
About and Settings, the user guide, the accessibility statement, and the full texts of the EULA,
|
||||
GPLv3, Disclaimer and Privacy policy ("Read the full text online").
|
||||
|
||||
### Changed
|
||||
- **Report a bug** opens a new issue on the GitLab mirror with the title and the Bug template
|
||||
already answered: what happened (and a crash's error code), the app version and the Windows
|
||||
version. Nothing is sent until you submit it.
|
||||
- **Privacy policy:** the update check goes to `releases.poli0981.dev`, served by Cloudflare,
|
||||
instead of GitHub. Nothing else changed (no telemetry, no data collected), so you aren't asked to
|
||||
accept the terms again.
|
||||
- **Security reports** go to security@poli0981.dev only; accessibility barriers to the GitLab
|
||||
*Accessibility* template or accessibility@poli0981.dev.
|
||||
- **Release files:** every release publishes `SHA256SUMS` and a CycloneDX SBOM next to its files
|
||||
(`releases.poli0981.dev/commandforge/<version>/`). The checksums cover what the version ships:
|
||||
the installer, the portable zip and its packages. (The `checksums.txt` of 2.1.0 and 2.2.0 had
|
||||
wrong lines for the two feed files, which are rewritten on every release.)
|
||||
- **CI** runs on Gitea Actions: Build, Security (gitleaks, Opengrep, osv-scanner, NuGetAudit,
|
||||
actionlint) and Qodana through its CLI replace CodeQL, SonarCloud, OpenSSF Scorecard and
|
||||
dependency review; a self-hosted Renovate replaces Dependabot.
|
||||
- Dependencies: SonarAnalyzer 10.37; the CycloneDX tool 6.3.2 (release SBOM) is added and the
|
||||
SonarScanner removed. The app keeps the .NET 10.0.15 runtime (SDK 10.0.404), still the latest.
|
||||
|
||||
### Removed
|
||||
- Build-provenance attestations (`gh attestation verify`), GitHub Discussions and GitHub's private
|
||||
vulnerability reporting: none of them exists outside GitHub. Releases are still built from signed
|
||||
tags by a public workflow, with checksums, an SBOM and an optional VirusTotal scan.
|
||||
|
||||
## [2.2.0] — 2026-11-16
|
||||
|
||||
CommandForge is now **stable and in maintenance mode** (see
|
||||
@@ -374,15 +417,16 @@ Initial public release.
|
||||
checksums (and an optional VirusTotal scan). No telemetry — the only network use is checking
|
||||
GitHub for updates.
|
||||
|
||||
[Unreleased]: https://github.com/poli0981/CommandForge/compare/v2.2.0...HEAD
|
||||
[2.2.0]: https://github.com/poli0981/CommandForge/compare/v2.1.0...v2.2.0
|
||||
[2.1.0]: https://github.com/poli0981/CommandForge/compare/v2.0.0...v2.1.0
|
||||
[2.0.0]: https://github.com/poli0981/CommandForge/compare/v1.5.1...v2.0.0
|
||||
[1.5.1]: https://github.com/poli0981/CommandForge/compare/v1.5.0...v1.5.1
|
||||
[1.5.0]: https://github.com/poli0981/CommandForge/compare/v1.4.0...v1.5.0
|
||||
[1.4.0]: https://github.com/poli0981/CommandForge/compare/v1.3.0...v1.4.0
|
||||
[1.3.0]: https://github.com/poli0981/CommandForge/compare/v1.2.0...v1.3.0
|
||||
[1.2.0]: https://github.com/poli0981/CommandForge/compare/v1.1.1...v1.2.0
|
||||
[1.1.1]: https://github.com/poli0981/CommandForge/compare/v1.1.0...v1.1.1
|
||||
[1.1.0]: https://github.com/poli0981/CommandForge/compare/v1.0.0...v1.1.0
|
||||
[1.0.0]: https://github.com/poli0981/CommandForge/releases/tag/v1.0.0
|
||||
[Unreleased]: https://git.poli0981.dev/poli0981/CommandForge/compare/v2.3.0...main
|
||||
[2.3.0]: https://git.poli0981.dev/poli0981/CommandForge/compare/v2.2.0...v2.3.0
|
||||
[2.2.0]: https://git.poli0981.dev/poli0981/CommandForge/compare/v2.1.0...v2.2.0
|
||||
[2.1.0]: https://git.poli0981.dev/poli0981/CommandForge/compare/v2.0.0...v2.1.0
|
||||
[2.0.0]: https://git.poli0981.dev/poli0981/CommandForge/compare/v1.5.1...v2.0.0
|
||||
[1.5.1]: https://git.poli0981.dev/poli0981/CommandForge/compare/v1.5.0...v1.5.1
|
||||
[1.5.0]: https://git.poli0981.dev/poli0981/CommandForge/compare/v1.4.0...v1.5.0
|
||||
[1.4.0]: https://git.poli0981.dev/poli0981/CommandForge/compare/v1.3.0...v1.4.0
|
||||
[1.3.0]: https://git.poli0981.dev/poli0981/CommandForge/compare/v1.2.0...v1.3.0
|
||||
[1.2.0]: https://git.poli0981.dev/poli0981/CommandForge/compare/v1.1.1...v1.2.0
|
||||
[1.1.1]: https://git.poli0981.dev/poli0981/CommandForge/compare/v1.1.0...v1.1.1
|
||||
[1.1.0]: https://git.poli0981.dev/poli0981/CommandForge/compare/v1.0.0...v1.1.0
|
||||
[1.0.0]: https://git.poli0981.dev/poli0981/CommandForge/src/tag/v1.0.0
|
||||
@@ -10,11 +10,12 @@
|
||||
|
||||
- **Chỉ Windows 10 (22H2) và 11**, x64 (ARM64 nếu được).
|
||||
- **Open-source, GPLv3.**
|
||||
- Cài & cập nhật bằng **Velopack** (unpackaged, không qua Store).
|
||||
- Cài & cập nhật bằng **Velopack** (unpackaged, không qua Store); feed + gói trên Cloudflare R2 `https://releases.poli0981.dev/commandforge`.
|
||||
- Mã nguồn chuẩn trên **Gitea** `git.poli0981.dev/poli0981/CommandForge` (tài khoản GitHub đã bị khóa từ 11/2026); issue/MR qua mirror GitLab `gitlab.com/poli0981/CommandForge` (xem [mục 9](#9-forge--ci)).
|
||||
- **Trạng thái: ổn định, chế độ bảo trì** từ v2.2.0 (2026-11-16). Chỉ nhận: cập nhật dependency;
|
||||
vá bảo mật (High/Critical → bản vá khẩn, Moderate → đợt cập nhật định kỳ kế tiếp); nâng cấp nền
|
||||
tảng lớn (.NET mới); thêm/bớt/sửa lệnh catalog (lỗi thời, sai cú pháp, có thể gây hại — loại gây
|
||||
hại báo riêng qua Security Advisory); sửa lỗi, UI/UX, accessibility; sửa bản dịch. Tính năng mới
|
||||
hại báo riêng qua email `security@`); sửa lỗi, UI/UX, accessibility; sửa bản dịch. Tính năng mới
|
||||
chỉ khi thật sự phù hợp và cần thiết. Nguồn chuẩn của chính sách:
|
||||
`.github/CONTRIBUTING.md#maintenance-mode-what-we-accept`.
|
||||
|
||||
@@ -27,8 +28,8 @@
|
||||
3. **Khởi động lại:** Phát hiện cần reboot bằng **exit code `3010`** (`ERROR_SUCCESS_REBOOT_REQUIRED`), không chỉ parse text.
|
||||
4. **Ranh giới kiến trúc:** `Domain` không phụ thuộc gì. `Application` chỉ phụ thuộc `Domain`. `Infrastructure`/`Wpf` hiện thực các interface của `Application`. **Không bao giờ** để `Domain`/`Application` tham chiếu WPF hay Win32.
|
||||
5. **Không obfuscate.** Mã GPLv3 vốn công khai; obfuscate vừa vô nghĩa vừa gây false-positive antivirus.
|
||||
6. **Hiện chưa ký số Authenticode** (sẽ thêm Azure Trusted Signing/SignPath sau — xem `docs/Build.md`). Đừng thêm bước ký Authenticode vào build/CI lúc này. Attestation build-provenance (Sigstore, `actions/attest-build-provenance`), SBOM và checksums trong `release.yml` là được phép và phải giữ.
|
||||
7. **Không telemetry.** Mạng duy nhất được phép: gọi GitHub để kiểm tra cập nhật. Bất kỳ thu thập dữ liệu nào khác đều bị cấm (vi phạm `docs/Privacy.md`).
|
||||
6. **Hiện chưa ký số Authenticode** (sẽ thêm Azure Trusted Signing/SignPath sau — xem `docs/Build.md`). Đừng thêm bước ký Authenticode vào build/CI lúc này. SBOM (CycloneDX) và `SHA256SUMS` do `scripts/release-assets.ps1` tạo trong `release.yml` (tải lên `releases.poli0981.dev/commandforge/<version>/`) là bắt buộc và phải giữ. Attestation build-provenance đã bỏ khi rời GitHub (Gitea không có OIDC — quyết định D7 của runbook).
|
||||
7. **Không telemetry.** Mạng duy nhất được phép: kiểm tra/tải cập nhật từ `https://releases.poli0981.dev/commandforge` (`ProductLinks.UpdateFeed`). Bất kỳ thu thập dữ liệu nào khác đều bị cấm (vi phạm `docs/Privacy.md`).
|
||||
8. **Xác nhận trước lệnh nguy hiểm.** Lệnh `Caution`/`Dangerous` phải có hộp thoại xác nhận; không cho phép tắt xác nhận với nhóm `Dangerous`.
|
||||
|
||||
---
|
||||
@@ -38,8 +39,8 @@
|
||||
- **.NET 10 (LTS), C# 14** · **WPF** + **WPF-UI 4.3** (Fluent, lepoco) — đã thay Material Design từ v2.0.0
|
||||
- **CommunityToolkit.Mvvm** (MVVM) · **Microsoft.Extensions.DependencyInjection** (`ServiceCollection` + `ValidateOnBuild`; **không** dùng Generic Host)
|
||||
- **CsWin32** (P/Invoke) · **Serilog** (logging) · `System.Threading.Channels`
|
||||
- **Velopack** (`vpk` pin làm local tool trong `.config/dotnet-tools.json`) cho cài đặt + cập nhật qua GitHub Releases
|
||||
- Test: **xUnit v3** (`xunit.v3.mtp-off`, chạy qua VSTest) · **SonarAnalyzer.CSharp** chạy trong build
|
||||
- **Velopack** (`vpk` pin làm local tool trong `.config/dotnet-tools.json`) cho cài đặt + cập nhật qua Cloudflare R2 (HTTP source); **CycloneDX** (local tool) tạo SBOM khi phát hành
|
||||
- Test: **xUnit v3** (`xunit.v3.mtp-off`, chạy qua VSTest) · **SonarAnalyzer.CSharp** (Roslyn analyzer) chạy trong build · **Qodana** trong CI (không còn SonarCloud — D1)
|
||||
- i18n: `.resx` 5 ngôn ngữ (EN/VI/JA/zh-Hans/ES)
|
||||
|
||||
---
|
||||
@@ -50,7 +51,7 @@
|
||||
src/
|
||||
CommandForge.Domain/ # entities thuần
|
||||
CommandForge.Application/ # use-cases + interfaces (ports)
|
||||
CommandForge.Infrastructure/ # Process, registry, Velopack, GitHub, Serilog
|
||||
CommandForge.Infrastructure/ # Process, registry, Velopack, Serilog
|
||||
CommandForge.Wpf/ # View + ViewModel + DI bootstrap + .resx (namespace: CommandForge.Desktop)
|
||||
helper/
|
||||
CommandForge.Elevator/ # tiến trình phụ chạy lệnh Admin (named pipe)
|
||||
@@ -73,7 +74,7 @@ dotnet tool restore
|
||||
pwsh ./scripts/pack.ps1 -Version <ver>
|
||||
```
|
||||
|
||||
Phát hành thật: tag ký GPG `vX.Y.Z` trên `main` → `release.yml` (xem `RELEASING.md`).
|
||||
Phát hành thật: tag ký GPG `vX.Y.Z` trên `main` (khớp `<Version>`) → `.gitea/workflows/release.yml` → R2 + release Gitea + Discord (xem `RELEASING.md`). Chạy tay Release trên nhánh = dry run (không upload).
|
||||
|
||||
---
|
||||
|
||||
@@ -87,7 +88,7 @@ Phát hành thật: tag ký GPG `vX.Y.Z` trên `main` → `release.yml` (xem `RE
|
||||
truyền thông tin chỉ bằng màu; thông báo cho Narrator qua `INotificationService.Announce`.
|
||||
`AccessibilityTests` và `WpfAccessibilityRuntimeTests` (STA, template WPF-UI thật) kiểm tra.
|
||||
- WPF-UI: mỗi trang (UserControl trong NavigationView) phải đặt `Foreground="{DynamicResource TextFillColorPrimaryBrush}"` ở gốc (Frame không truyền màu chữ xuống); lớp con của `ContentDialog` phải gọi `SetResourceReference(StyleProperty, typeof(ContentDialog))` — `XamlConventionsTests` kiểm tra cả hai. Cỡ chữ dùng `DynamicResource AppFontSize*`.
|
||||
- Version package đặt trong **từng `.csproj`** (không dùng Central Package Management — dependency graph của GitHub không đọc `Directory.Packages.props`).
|
||||
- Version package đặt trong **từng `.csproj`** (không dùng Central Package Management — quy ước có từ thời GitHub; Renovate đọc được cả hai).
|
||||
- Nullable reference types **bật**; `TreatWarningsAsErrors` **bật**; analyzers **bật**.
|
||||
- `async/await` xuyên suốt cho I/O; không `async void` (trừ event handler); luôn truyền `CancellationToken`.
|
||||
- MVVM bằng source-generator của CommunityToolkit (`[ObservableProperty]`, `[RelayCommand]`).
|
||||
@@ -124,6 +125,16 @@ Phát hành thật: tag ký GPG `vX.Y.Z` trên `main` → `release.yml` (xem `RE
|
||||
|
||||
> ⚠️ Thư mục `docs/` nằm trong `.gitignore` (tài liệu nội bộ, chỉ có trên máy).
|
||||
|
||||
**Tài liệu công khai (ở gốc repo, được commit):** `README.md`, `ACCESSIBILITY.md` (tuyên bố trợ năng — mục tiêu WCAG 2.2 AA, không phải tuyên bố tuân thủ; link "Accessibility" trong About), `USAGE.md` (hướng dẫn người dùng — link "User guide" trong app), `CHANGELOG.md`, `BUILD.md`, `RELEASING.md`, `UPDATES.md`, `PRIVACY.md`, `EULA.md`, `DISCLAIMER.md`, `THIRD-PARTY-NOTICES.md`, `MAINTAINERS.md`, `LICENSE`, và trong `.github/`: `SECURITY.md`, `CONTRIBUTING.md`, `CODE_OF_CONDUCT.md`. Legal Gate trỏ tới EULA/PRIVACY/DISCLAIMER/LICENSE công khai.
|
||||
**Tài liệu công khai (ở gốc repo, được commit):** `README.md`, `ACCESSIBILITY.md` (tuyên bố trợ năng — mục tiêu WCAG 2.2 AA, không phải tuyên bố tuân thủ; link "Accessibility" trong About), `USAGE.md` (hướng dẫn người dùng — link "User guide" trong app), `CHANGELOG.md`, `BUILD.md`, `RELEASING.md`, `UPDATES.md`, `PRIVACY.md`, `EULA.md`, `DISCLAIMER.md`, `THIRD-PARTY-NOTICES.md`, `MAINTAINERS.md`, `LICENSE`, và trong `.github/`: `SECURITY.md`, `CONTRIBUTING.md`, `CODE_OF_CONDUCT.md`. Legal Gate trỏ tới EULA/PRIVACY/DISCLAIMER/LICENSE công khai (trên Gitea, qua `ProductLinks`). Template issue/MR cho GitLab ở `.gitlab/`; `.github/ISSUE_TEMPLATE` giữ cho Gitea.
|
||||
|
||||
**Email liên hệ (@poli0981.dev):** `security@` (lỗ hổng, cùng GitHub private vulnerability reporting) · `accessibility@` (rào cản trợ năng, cùng form *Accessibility problem*) · `privacy@` · `legal@` · `copyright@` / `dmca@` / `takedown@` (bản quyền, DMCA, yêu cầu gỡ bỏ khác) · `code@` (mã nguồn, đóng góp, báo cáo Code of Conduct) · `collab@` · `press@` · `sponsor@`. Không dùng `games@` cho dự án này.
|
||||
**Email liên hệ (@poli0981.dev):** `security@` (lỗ hổng — kênh riêng tư duy nhất, không bao giờ qua issue công khai) · `accessibility@` (rào cản trợ năng, cùng template *Accessibility* trên GitLab) · `privacy@` · `legal@` · `copyright@` / `dmca@` / `takedown@` (bản quyền, DMCA, yêu cầu gỡ bỏ khác) · `code@` (mã nguồn, đóng góp, báo cáo Code of Conduct) · `collab@` · `press@` · `sponsor@`. Không dùng `games@` cho dự án này.
|
||||
|
||||
---
|
||||
|
||||
## 9. Forge & CI
|
||||
|
||||
- **Gitea** (`https://git.poli0981.dev`, Gitea 28.x) là nhà chính; remote `origin` = Gitea (SSH cổng 2222), `github` = remote cũ (tài khoản bị khóa — **không bao giờ push/xóa**). Mirror công khai GitLab nhận issue/MR; registration của Gitea đóng. Runbook di chuyển: `E:\.github\docs\GITEA-MIGRATION.md` (repo ops `poli0981/.github`).
|
||||
- CI = **Gitea Actions** trong `.gitea/workflows/` (không còn `.github/workflows`). Runner là PC của maintainer: `windows-latest` = host mode (PowerShell, không cô lập; `setup-dotnet` cài vào tool cache), `ubuntu-latest` = Docker. Cron chỉ trong 13:00–16:00 UTC, phút lẻ, slot đăng ký trong `docs/migration/README.md` của repo ops (CommandForge: `Security` thứ Sáu 14:11 UTC).
|
||||
- Workflow dùng chung từ repo ops, **pin theo SHA của tag ops** (`# ops vYYYY.MM.N`) kèm `ops_ref` cùng SHA; Renovate không bump các pin này — bump tay khi repo ops có tag mới. Mọi action bên thứ ba pin SHA 40 ký tự + comment version. Upload artifact bằng `christopherhx/gitea-upload-artifact`.
|
||||
- Không có trên Gitea: CodeQL, Dependabot, SonarCloud, Scorecard, dependency review, attestations/OIDC, GitHub Pages/Discussions/Releases, `gh` CLI (dùng Gitea REST API với job token). Thay bằng: Qodana (CLI), `security.yml` (gitleaks, Opengrep, osv-scanner, NuGetAudit, actionlint), Renovate (`renovate.json` + preset `poli0981/renovate-config`).
|
||||
- Bí mật phát hành (`R2_RELEASES_*`, biến `R2_ACCOUNT_ID`, cấp user) chỉ dùng trong `release.yml` (tag/dispatch), qua biến môi trường `VPK_*`, không bao giờ trên dòng lệnh hay trong job `pull_request`/schedule.
|
||||
+3
-2
@@ -69,8 +69,9 @@ infringes your rights, please contact us first so it can be corrected quickly:
|
||||
- **Other takedown requests** (trademark, impersonation, unlawful content):
|
||||
[takedown@poli0981.dev](mailto:takedown@poli0981.dev)
|
||||
|
||||
Because the project is hosted on GitHub, you can also use GitHub's
|
||||
[DMCA Takedown Policy](https://docs.github.com/site-policy/content-removal-policies/dmca-takedown-policy).
|
||||
The source is hosted on the maintainer's own server (`git.poli0981.dev`), so these addresses are
|
||||
the way to reach the project. For content on its public mirror on GitLab, GitLab's own DMCA
|
||||
process also applies.
|
||||
|
||||
## Contact
|
||||
|
||||
|
||||
@@ -30,7 +30,8 @@
|
||||
<NuGetAuditLevel>low</NuGetAuditLevel>
|
||||
<WarningsNotAsErrors>$(WarningsNotAsErrors);NU1901</WarningsNotAsErrors>
|
||||
|
||||
<!-- Normalized source paths in PDBs for CI builds (reproducible artifacts). -->
|
||||
<!-- Normalized source paths in PDBs for CI builds (reproducible artifacts). Gitea Actions sets
|
||||
GITHUB_ACTIONS=true too, for compatibility. -->
|
||||
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">true</ContinuousIntegrationBuild>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -50,17 +51,17 @@
|
||||
<Company>poli0981</Company>
|
||||
<Copyright>Copyright © 2026 poli0981</Copyright>
|
||||
<Description>Run complex Windows system commands through a visual, categorized interface.</Description>
|
||||
<RepositoryUrl>https://github.com/poli0981/CommandForge</RepositoryUrl>
|
||||
<PackageProjectUrl>https://github.com/poli0981/CommandForge</PackageProjectUrl>
|
||||
<RepositoryUrl>https://git.poli0981.dev/poli0981/CommandForge</RepositoryUrl>
|
||||
<PackageProjectUrl>https://git.poli0981.dev/poli0981/CommandForge</PackageProjectUrl>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<Version>2.2.0</Version>
|
||||
<Version>2.3.0</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Same rules SonarCloud applies, enforced at build time (warnings are errors). Package versions
|
||||
live in each .csproj: GitHub's dependency graph (Dependabot alerts, dependency review, the
|
||||
release SBOM) reads .csproj files but not Directory.Packages.props. -->
|
||||
<!-- Sonar's C# rules as a Roslyn analyzer, enforced at build time (warnings are errors). Package
|
||||
versions live in each .csproj, not in Directory.Packages.props (the project's convention;
|
||||
Renovate and the CycloneDX SBOM read them there). -->
|
||||
<ItemGroup>
|
||||
<PackageReference Include="SonarAnalyzer.CSharp" Version="10.36.0.15337">
|
||||
<PackageReference Include="SonarAnalyzer.CSharp" Version="10.37.0.15768">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
|
||||
@@ -40,9 +40,9 @@ the use of, or inability to use, the software. (Consistent with **GPLv3 §16**.)
|
||||
|
||||
## 5. Acceptable use
|
||||
|
||||
- Use the software in compliance with all applicable laws in your jurisdiction, and in compliance
|
||||
with the [GitHub Terms of Service](https://docs.github.com/site-policy/github-terms/github-terms-of-service)
|
||||
when interacting with the project on GitHub.
|
||||
- Use the software in compliance with all applicable laws in your jurisdiction, and with the
|
||||
terms of the site you use when interacting with the project (for example GitLab's, for issues
|
||||
and merge requests on its mirror).
|
||||
- Use it only to administer **your own computers** or machines you are authorized to administer.
|
||||
- Do **not** use the software to damage, disrupt, defraud, or otherwise act unlawfully, or to
|
||||
violate the rights or privacy of others (including data-protection laws such as the GDPR and
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
CommandForge is currently maintained by:
|
||||
|
||||
- [@poli0981](https://github.com/poli0981) — author & maintainer
|
||||
- [poli0981](https://git.poli0981.dev/poli0981) — author & maintainer
|
||||
|
||||
Contact: [code@poli0981.dev](mailto:code@poli0981.dev) for the code and contributions; see the
|
||||
[README](README.md#contact) for the other addresses (security, privacy, legal…).
|
||||
|
||||
+14
-12
@@ -1,12 +1,12 @@
|
||||
# Privacy Policy — CommandForge
|
||||
|
||||
> This is a plain-language summary, not legal advice. Last updated: 2026-10-21.
|
||||
> This is a plain-language summary, not legal advice. Last updated: 2026-11-26.
|
||||
|
||||
## Summary
|
||||
|
||||
**CommandForge does not collect, store on any server, or transmit any of your personal data.**
|
||||
The app runs entirely **locally** on your machine. The **only** network connection the app itself
|
||||
makes is to GitHub, to check for and download software updates.
|
||||
makes is to `releases.poli0981.dev`, to check for and download software updates.
|
||||
|
||||
## Data stored on your PC (never leaves your machine)
|
||||
|
||||
@@ -31,12 +31,15 @@ details such as file paths, your user name or device names.
|
||||
|
||||
## Network connections
|
||||
|
||||
- **Update check:** the app contacts **GitHub** (the releases API and asset downloads) when it
|
||||
starts, if *Check for updates on startup* is on (the default), and whenever you choose **Check
|
||||
for updates** (`F5`). As with any download, GitHub sees your IP address and the request; see
|
||||
[GitHub's Privacy Statement](https://docs.github.com/site-policy/privacy-policies/github-general-privacy-statement).
|
||||
We receive no data from it.
|
||||
- **Links you open** — GitHub, the user guide, the license, *Report a bug* — open in your browser.
|
||||
- **Update check:** the app downloads the update feed (and, when you choose to update, the
|
||||
update package) from **`releases.poli0981.dev`** when it starts, if *Check for updates on
|
||||
startup* is on (the default), and whenever you choose **Check for updates** (`F5`). The files
|
||||
are stored on Cloudflare R2 and served by Cloudflare, which sees your IP address and the request
|
||||
like any web server; see [Cloudflare's Privacy Policy](https://www.cloudflare.com/privacypolicy/).
|
||||
The project keeps no logs of these downloads and receives no data from them. (Versions 2.2.0
|
||||
and older contacted GitHub instead.)
|
||||
- **Links you open** — the source code on `git.poli0981.dev`, the user guide, the license,
|
||||
*Report a bug* on GitLab — open in your browser, under those sites' own policies.
|
||||
- The app makes **no other network connections**. Some **commands you choose to run** use the
|
||||
network by their nature (for example winget, DNS and connectivity tests, Windows Update); that
|
||||
traffic goes between Windows and those services, not to us.
|
||||
@@ -48,7 +51,7 @@ tracking of any kind.
|
||||
|
||||
## Bug reports
|
||||
|
||||
*Report a bug* opens a pre-filled GitHub issue form in your browser with the app version, your
|
||||
*Report a bug* opens a pre-filled issue on the project's GitLab mirror in your browser with the app version, your
|
||||
Windows version and, after a crash, the error details. **Nothing is sent until you submit the form
|
||||
yourself**, and you can edit it first. If you attach exported logs, **review them before sharing**
|
||||
— they may include paths, user names or device names you may not wish to publish.
|
||||
@@ -66,6 +69,5 @@ to review the terms again on startup.
|
||||
## Contact
|
||||
|
||||
- Privacy questions: **[privacy@poli0981.dev](mailto:privacy@poli0981.dev)**
|
||||
- Security issues: see [SECURITY.md](.github/SECURITY.md) (security@poli0981.dev or private
|
||||
vulnerability reporting).
|
||||
- Repository: https://github.com/poli0981/CommandForge
|
||||
- Security issues: see [SECURITY.md](.github/SECURITY.md) (security@poli0981.dev).
|
||||
- Repository: https://git.poli0981.dev/poli0981/CommandForge (issues: https://gitlab.com/poli0981/CommandForge/-/issues)
|
||||
@@ -1,20 +1,23 @@
|
||||
# CommandForge
|
||||
|
||||
[](https://github.com/poli0981/CommandForge/releases/latest)
|
||||
[](https://git.poli0981.dev/poli0981/CommandForge/releases)
|
||||
[](#project-status)
|
||||
[](https://github.com/poli0981/CommandForge/actions/workflows/build.yml)
|
||||
[](https://github.com/poli0981/CommandForge/actions/workflows/codeql.yml)
|
||||
[](https://sonarcloud.io/summary/new_code?id=poli0981_CommandForge)
|
||||
[](https://sonarcloud.io/summary/new_code?id=poli0981_CommandForge)
|
||||
[](https://github.com/poli0981/CommandForge/actions/workflows/qodana.yml)
|
||||
[](https://scorecard.dev/viewer/?uri=github.com/poli0981/CommandForge)
|
||||
[](https://git.poli0981.dev/poli0981/CommandForge/actions?workflow=build.yml)
|
||||
[](https://git.poli0981.dev/poli0981/CommandForge/actions?workflow=security.yml)
|
||||
[](https://git.poli0981.dev/poli0981/CommandForge/actions?workflow=qodana.yml)
|
||||
[](ACCESSIBILITY.md)
|
||||

|
||||
[](LICENSE)
|
||||
[](LICENSE)
|
||||
|
||||
> Run powerful Windows maintenance commands from a clean, categorized GUI — no need to
|
||||
> memorize syntax.
|
||||
|
||||
> **Where things live** (since November 2026, when the GitHub account was suspended): source at
|
||||
> [`git.poli0981.dev/poli0981/CommandForge`](https://git.poli0981.dev/poli0981/CommandForge) (canonical). Mirror for issues and merge
|
||||
> requests: [`gitlab.com/poli0981/CommandForge`](https://gitlab.com/poli0981/CommandForge).
|
||||
> Downloads and updates: [`releases.poli0981.dev/commandforge/`](#install). Patches and questions:
|
||||
> `code@poli0981.dev`. Security: `security@poli0981.dev` (see [SECURITY.md](.github/SECURITY.md)).
|
||||
|
||||
CommandForge is an open-source Windows desktop app that wraps common system commands
|
||||
(winget, DISM, SFC, God Mode, registry tweaks, network reset, power plans, diagnostics…)
|
||||
in a visual, categorized interface. Every command is shown to you **before** it runs, with a
|
||||
@@ -22,8 +25,8 @@ clear danger level, a confirmation for anything risky, and an optional System Re
|
||||
|
||||
- **Windows 10 (22H2) and Windows 11**, x64.
|
||||
- **Open source, GPLv3.**
|
||||
- **Offline-first. No telemetry.** The only network connection the app makes is to GitHub, to
|
||||
check for updates.
|
||||
- **Offline-first. No telemetry.** The only network connection the app makes is the update
|
||||
check, to `releases.poli0981.dev`.
|
||||
- Installed and auto-updated with [Velopack](https://velopack.io/) (per-user, no UAC for updates).
|
||||
|
||||
> Built by a solo developer with AI assistance — see the [Disclaimer](DISCLAIMER.md) and the
|
||||
@@ -39,9 +42,7 @@ security updates (a High or Critical vulnerability gets an urgent patch release)
|
||||
updates such as a newer .NET, catalog commands added, fixed or removed, bug, UI/UX and
|
||||
accessibility fixes, and translation fixes. A new feature is added only when it is genuinely
|
||||
necessary. The whole policy is in
|
||||
[CONTRIBUTING.md](.github/CONTRIBUTING.md#maintenance-mode-what-we-accept); ideas are welcome in
|
||||
[Discussions › Ideas](https://github.com/poli0981/CommandForge/discussions/categories/ideas),
|
||||
without commitment.
|
||||
[CONTRIBUTING.md](.github/CONTRIBUTING.md#maintenance-mode-what-we-accept).
|
||||
|
||||
---
|
||||
|
||||
@@ -83,37 +84,38 @@ New here? Read the **[user guide](USAGE.md)**.
|
||||
|
||||
## Install
|
||||
|
||||
1. Download **`CommandForge-win-Setup.exe`** from the
|
||||
[latest release](https://github.com/poli0981/CommandForge/releases/latest).
|
||||
1. Download **[`CommandForge-win-Setup.exe`](https://releases.poli0981.dev/commandforge/CommandForge-win-Setup.exe)**
|
||||
(or the [portable zip](https://releases.poli0981.dev/commandforge/CommandForge-win-Portable.zip)).
|
||||
Every release, its notes and its checksums are on the [releases page](https://git.poli0981.dev/poli0981/CommandForge/releases).
|
||||
2. Run it. The app installs per-user (no admin rights needed) and updates itself from future
|
||||
releases.
|
||||
|
||||
Already installed? The app offers each new release as a normal update; your settings, favorites,
|
||||
history, recipes and commands carry over.
|
||||
|
||||
> **Coming from 2.2.0 or older?** Those versions checked GitHub for updates, and the GitHub account
|
||||
> is gone, so they will never see a new version. Download the installer above once and run it over
|
||||
> your installation: your data stays, and from 2.3.0 on updates come from `releases.poli0981.dev`.
|
||||
|
||||
### "Unknown publisher" and verifying your download
|
||||
|
||||
CommandForge is **not Authenticode-signed yet** (see [SECURITY.md](.github/SECURITY.md)), so
|
||||
SmartScreen may warn about an unknown publisher, and some antivirus engines may flag it (common
|
||||
for system-administration tools). To proceed: **More info → Run anyway**.
|
||||
|
||||
Every release is built by GitHub Actions from a tagged commit. You can check your download first:
|
||||
Every release is built by the release workflow on Gitea Actions from a signed tag, and its log is
|
||||
public. You can check your download first:
|
||||
|
||||
- **Build provenance** — with the [GitHub CLI](https://cli.github.com/), confirm the file was built
|
||||
by this repository's release workflow:
|
||||
|
||||
```powershell
|
||||
gh attestation verify .\CommandForge-win-Setup.exe --repo poli0981/CommandForge
|
||||
```
|
||||
|
||||
- **SHA-256** — compare with `checksums.txt` on the release page (case doesn't matter):
|
||||
- **SHA-256** — compare with `SHA256SUMS` of that release
|
||||
(`https://releases.poli0981.dev/commandforge/<version>/SHA256SUMS`, linked from the release
|
||||
notes; case doesn't matter):
|
||||
|
||||
```powershell
|
||||
(Get-FileHash .\CommandForge-win-Setup.exe -Algorithm SHA256).Hash
|
||||
```
|
||||
|
||||
- The release notes link a **VirusTotal** scan, and each release ships an SPDX **SBOM**
|
||||
(`sbom.spdx.json`).
|
||||
- Each release ships a CycloneDX **SBOM** (`sbom.cdx.json`, next to `SHA256SUMS`), and the release
|
||||
notes link a **VirusTotal** scan when one was made.
|
||||
|
||||
---
|
||||
|
||||
@@ -154,15 +156,16 @@ See [BUILD.md](BUILD.md) for packaging and CI, and [UPDATES.md](UPDATES.md) for
|
||||
|
||||
## Contact
|
||||
|
||||
Bugs, catalog commands, translations and accessibility problems go to
|
||||
[GitHub Issues](https://github.com/poli0981/CommandForge/issues/new/choose) (see
|
||||
[Project status](#project-status) for what is accepted), and questions and ideas to
|
||||
[Discussions](https://github.com/poli0981/CommandForge/discussions). For everything else:
|
||||
Bugs, catalog commands, translations and accessibility problems go to the issues of the
|
||||
[GitLab mirror](https://gitlab.com/poli0981/CommandForge/-/issues) (pick the matching template;
|
||||
see [Project status](#project-status) for what is accepted). The repository on Gitea is read-only
|
||||
for everyone but the maintainer. Patches can also come by e-mail (`git format-patch`) to
|
||||
code@poli0981.dev. For everything else:
|
||||
|
||||
| Topic | Address |
|
||||
|---|---|
|
||||
| Security vulnerabilities (private) | security@poli0981.dev, or [private vulnerability reporting](https://github.com/poli0981/CommandForge/security/advisories/new) |
|
||||
| Accessibility barriers | accessibility@poli0981.dev, or the [Accessibility problem form](https://github.com/poli0981/CommandForge/issues/new?template=accessibility.yml) |
|
||||
| Security vulnerabilities (private, never a public issue) | security@poli0981.dev |
|
||||
| Accessibility barriers | accessibility@poli0981.dev, or the [Accessibility template](https://gitlab.com/poli0981/CommandForge/-/issues/new?issuable_template=Accessibility) on GitLab |
|
||||
| Privacy | privacy@poli0981.dev |
|
||||
| Terms, licensing and other legal questions | legal@poli0981.dev |
|
||||
| Copyright questions and permissions | copyright@poli0981.dev |
|
||||
|
||||
+53
-44
@@ -1,16 +1,22 @@
|
||||
# Releasing CommandForge
|
||||
|
||||
Releases are automated by [`release.yml`](.github/workflows/release.yml), triggered by pushing a
|
||||
SemVer tag.
|
||||
Releases are automated by [`release.yml`](.gitea/workflows/release.yml) on Gitea Actions,
|
||||
triggered by pushing a signed SemVer tag. The files go to Cloudflare R2
|
||||
(`https://releases.poli0981.dev/commandforge/`), the notes and links to a release on
|
||||
[Gitea](https://git.poli0981.dev/poli0981/CommandForge/releases). The forge itself stores no
|
||||
binaries.
|
||||
|
||||
## Steps
|
||||
|
||||
1. Make sure `main` is green and contains everything for the release.
|
||||
2. Choose a SemVer version `X.Y.Z`. In a pull request, move the `[Unreleased]` notes in
|
||||
[CHANGELOG.md](CHANGELOG.md) under `## [X.Y.Z] — <date>`, add the compare link at the bottom,
|
||||
and set `<Version>` in `Directory.Build.props` (the dev-build default; the release build stamps
|
||||
the tag's version anyway). Merge it.
|
||||
3. Tag the merge commit on `main` with a **signed, annotated** tag and push it:
|
||||
and set `<Version>` in `Directory.Build.props` to `X.Y.Z` (the workflow refuses a tag that
|
||||
doesn't match it). Merge it.
|
||||
3. Optional dry run: **Actions → Release → Run workflow** on `main`. It builds, packs, writes the
|
||||
SBOM, checksums and notes, and reads the previous release from R2 (which checks the R2
|
||||
credentials), but uploads nothing; the files stay as the run's `r2-release` artifact.
|
||||
4. Tag the merge commit on `main` with a **signed, annotated** tag and push it:
|
||||
|
||||
```bash
|
||||
git switch main && git pull
|
||||
@@ -18,55 +24,58 @@ SemVer tag.
|
||||
git push origin vX.Y.Z
|
||||
```
|
||||
|
||||
The `release tags` ruleset protects `v*` tags: once pushed, a release tag can't be moved or
|
||||
deleted (only a repository admin can bypass this).
|
||||
4. The **Release** workflow runs on `windows-latest` and:
|
||||
- resolves the version from the tag (`vX.Y.Z` → `X.Y.Z`);
|
||||
- restores the pinned `vpk` tool and **downloads the previous release** so a delta package can
|
||||
be computed;
|
||||
5. The **Release** workflow runs on the Windows runner (host mode on the maintainer's PC) and:
|
||||
- checks that the tag matches `<Version>`;
|
||||
- restores the pinned tools (`vpk`, CycloneDX) and **downloads the previous release** from R2
|
||||
(`vpk download s3`) so a delta package can be computed;
|
||||
- publishes and packages with Velopack (`scripts/pack.ps1`);
|
||||
- creates **build-provenance attestations** for `Setup.exe`, the portable zip and this
|
||||
version's `.nupkg` files;
|
||||
- uploads everything as a **draft** GitHub Release, attaches the **SPDX SBOM**
|
||||
(`sbom.spdx.json`) and **`checksums.txt`** (SHA-256 of every published asset), sets the
|
||||
release notes to this version's section of `CHANGELOG.md`, then **publishes** it as the
|
||||
latest release — installed copies only see the update once every asset is in place;
|
||||
- if `VT_API_KEY` is set, submits `Setup.exe` and the full package to **VirusTotal** and appends
|
||||
the scan links to the release notes;
|
||||
- writes the **CycloneDX SBOM**, **`SHA256SUMS`** and the release notes (this version's section
|
||||
of `CHANGELOG.md` plus the download links) with `scripts/release-assets.ps1`;
|
||||
- if `VT_API_KEY` is set, submits `Setup.exe` and the full package to **VirusTotal** and adds
|
||||
the report links to the notes;
|
||||
- uploads to R2 with `vpk upload s3`: packages, installer and portable zip first, the feed
|
||||
(`releases.win.json`, `RELEASES`) last, keeping the ten newest releases; installed copies see
|
||||
the update from that moment;
|
||||
- checks that the feed, the installer, the portable zip and the full package answer `200`;
|
||||
- puts `SHA256SUMS` and `sbom.cdx.json` under `commandforge/X.Y.Z/` (the ops repo's
|
||||
`publish-r2.yml`; a file there is never overwritten);
|
||||
- creates the Gitea release `vX.Y.Z` with the notes and the links;
|
||||
- calls the shared announcer (`poli0981/.github`) to post the release to Discord.
|
||||
5. Check the release page: the assets are all there, and the attestation verifies:
|
||||
6. Check the [release page](https://git.poli0981.dev/poli0981/CommandForge/releases) and the
|
||||
files, for example:
|
||||
|
||||
```bash
|
||||
gh release download vX.Y.Z --pattern "*-Setup.exe"
|
||||
gh attestation verify CommandForge-win-Setup.exe --repo poli0981/CommandForge
|
||||
```powershell
|
||||
curl.exe -sI https://releases.poli0981.dev/commandforge/releases.win.json
|
||||
curl.exe -s https://releases.poli0981.dev/commandforge/X.Y.Z/SHA256SUMS
|
||||
```
|
||||
|
||||
The notes are the CHANGELOG section followed by the **VirusTotal** links; edit them on the
|
||||
release page if you want a shorter summary (keep the VirusTotal section). The SHA-256 sums are
|
||||
in `checksums.txt`.
|
||||
Edit the notes on the release page if you want a shorter summary (keep the download links,
|
||||
the checksums and the VirusTotal section).
|
||||
|
||||
You can also run the workflow manually (**Actions → Release → Run workflow**) with a `version`
|
||||
input; the upload step then creates the `vX.Y.Z` tag.
|
||||
A versioned file on R2 is never replaced. If a release fails after its packages were uploaded,
|
||||
fix the cause and release the next patch version rather than re-tagging.
|
||||
|
||||
## Repository secrets
|
||||
## Secrets and variables
|
||||
|
||||
| Secret | Used for | Required |
|
||||
|---|---|---|
|
||||
| `GITHUB_TOKEN` | Create the release, upload assets, read the SBOM | automatic |
|
||||
| `VT_API_KEY` | VirusTotal scan + links | optional (step skipped if unset) |
|
||||
| `DISCORD_RELEASES_WEBHOOK` (or `DISCORD_REPO_WEBHOOK`) | Release announcement to Discord | optional |
|
||||
| `DISCORD_PING_ROLE_ID` | Role ping on stable releases | optional |
|
||||
| `DISCORD_CI_WEBHOOK` | Build/SonarCloud/Qodana failure alerts to Discord | optional |
|
||||
| `SONAR_TOKEN` | SonarCloud analysis and coverage (`sonarcloud.yml`) | for the SonarCloud workflow (runs without it are skipped) |
|
||||
| `QODANA_TOKEN` | Qodana Cloud project token; selects the Ultimate licence (`qodana.yml`) | for the Qodana workflow (runs without it are skipped) |
|
||||
| Name | Kind | Where | Used for |
|
||||
|---|---|---|---|
|
||||
| `R2_RELEASES_ACCESS_KEY_ID`, `R2_RELEASES_SECRET_ACCESS_KEY` | secret | user level (Gitea → Settings → Actions) | `vpk download/upload s3` and `publish-r2.yml`: an R2 API token with Object Read & Write on `poli0981-releases` only |
|
||||
| `R2_ACCOUNT_ID` | variable | user level | The R2 endpoint (`https://<id>.r2.cloudflarestorage.com`) |
|
||||
| `GITEA_TOKEN` (`github.token`) | automatic | | Create the Gitea release; read it for the announcement |
|
||||
| `VT_API_KEY` | secret | user or repository level | VirusTotal scan + links (optional; skipped if unset) |
|
||||
| `DISCORD_RELEASES_WEBHOOK` (or `DISCORD_REPO_WEBHOOK`) | secret | repository | Release announcement to Discord |
|
||||
| `DISCORD_PING_ROLE_ID` | secret | repository | Role ping on stable releases (optional) |
|
||||
| `DISCORD_RELEASE_PIPELINE_WEBHOOK` | secret | repository | Result of every Release run |
|
||||
| `DISCORD_CI_WEBHOOK` | secret | repository | Build / Qodana / Security failures on `main` |
|
||||
| `QODANA_TOKEN` | secret | repository | Qodana Cloud project token; selects the Ultimate licence (`qodana.yml`) |
|
||||
|
||||
> `poli0981` is a user account (not an org), so secrets are set **per repository**
|
||||
> (Settings → Secrets and variables → Actions).
|
||||
Release credentials are only ever used by `release.yml`, which runs on a tag or a manual
|
||||
dispatch, never on a pull request or a schedule.
|
||||
|
||||
## Code signing
|
||||
|
||||
Not done yet: releases ship without an Authenticode signature, so users may see a SmartScreen
|
||||
"unknown publisher" warning. Mitigations: build-provenance attestations, SHA-256 checksums, an
|
||||
SBOM, VirusTotal, no obfuscation, and public source. When Azure Trusted Signing (or SignPath
|
||||
Foundation) is configured, add a signing step between `dotnet publish` and `vpk pack` in
|
||||
`scripts/pack.ps1`, and update [SECURITY.md](.github/SECURITY.md).
|
||||
"unknown publisher" warning. Mitigations: SHA-256 checksums, an SBOM, VirusTotal, public build
|
||||
logs, no obfuscation, and public source. When Azure Trusted Signing (or SignPath Foundation) is
|
||||
configured, add a signing step between `dotnet publish` and `vpk pack` in `scripts/pack.ps1`, and
|
||||
update [SECURITY.md](.github/SECURITY.md).
|
||||
@@ -26,8 +26,8 @@ and the Fluent System Icons (below); see the `ThirdPartyNotices.txt` in the WPF-
|
||||
| Component | Version | License | Project |
|
||||
|---|---|---|---|
|
||||
| Microsoft.Windows.CsWin32 | 0.3.371 | MIT | https://github.com/microsoft/CsWin32 |
|
||||
| SonarAnalyzer.CSharp | 10.36.0.15337 | SONAR Source-Available License v1.0 | https://github.com/SonarSource/sonar-dotnet |
|
||||
| dotnet-sonarscanner (SonarScanner for .NET, CI only) | 12.1.0 | LGPL-3.0 | https://github.com/SonarSource/sonar-scanner-msbuild |
|
||||
| SonarAnalyzer.CSharp | 10.37.0.15768 | SONAR Source-Available License v1.0 | https://github.com/SonarSource/sonar-dotnet |
|
||||
| CycloneDX module for .NET (release SBOM only) | 6.3.2 | Apache-2.0 | https://github.com/CycloneDX/cyclonedx-dotnet |
|
||||
| vpk (Velopack CLI) | 1.2.161 | MIT | https://github.com/velopack/velopack |
|
||||
| xunit.v3 (`xunit.v3.mtp-off`) | 4.0.3 | Apache-2.0 | https://github.com/xunit/xunit |
|
||||
| xunit.runner.visualstudio | 4.0.1 | Apache-2.0 | https://github.com/xunit/visualstudio.xunit |
|
||||
|
||||
+42
-29
@@ -5,15 +5,21 @@ CommandForge installs and updates itself with [Velopack](https://velopack.io/).
|
||||
|
||||
## For users
|
||||
|
||||
1. Download `CommandForge-win-Setup.exe` from the
|
||||
[latest release](https://github.com/poli0981/CommandForge/releases/latest) and run it. It
|
||||
installs per-user under `%LocalAppData%\CommandForge`.
|
||||
2. After that, the app checks GitHub Releases for newer versions — on startup if **Settings →
|
||||
Updates → Check for updates on startup** is on (the default), or when you choose **More (⋯) →
|
||||
Check for updates** or press `F5`.
|
||||
1. Download [`CommandForge-win-Setup.exe`](https://releases.poli0981.dev/commandforge/CommandForge-win-Setup.exe)
|
||||
and run it. It installs per-user under `%LocalAppData%\CommandForge`. The
|
||||
[releases page](https://git.poli0981.dev/poli0981/CommandForge/releases) lists every version
|
||||
with its notes and checksums.
|
||||
2. After that, the app checks `https://releases.poli0981.dev/commandforge` for newer versions — on
|
||||
startup if **Settings → Updates → Check for updates on startup** is on (the default), or when
|
||||
you choose **More (⋯) → Check for updates** or press `F5`.
|
||||
3. When a newer version exists, choose **Download & restart**. The app downloads the update (a
|
||||
small **delta** when possible), then restarts into the new version.
|
||||
|
||||
> **Versions 2.2.0 and older** checked GitHub Releases. The GitHub account behind the project was
|
||||
> suspended in November 2026, so those versions find nothing (the check ends with "No release feed
|
||||
> was found") and can't update themselves. Install 2.3.0 or later once by hand, over the old
|
||||
> version: settings, favorites, history, recipes and your commands stay where they are.
|
||||
|
||||
Good to know:
|
||||
|
||||
- Closing the update dialog — including with its **X** button — cancels the download.
|
||||
@@ -22,45 +28,52 @@ Good to know:
|
||||
restart** again when the command is done.
|
||||
- Before applying an update, the app ends the admin session, because the elevated helper runs
|
||||
from the folder that Velopack replaces.
|
||||
- Errors are shown in plain words: offline or timed out, no release feed found (404), rate limited
|
||||
(403/429), and GitHub server error (5xx).
|
||||
- Errors are shown in plain words: offline or timed out, no release feed found (404), the update
|
||||
server refused or rate-limited the request (403/429), and a server error (5xx).
|
||||
|
||||
The only network connection involved is to GitHub (see [PRIVACY.md](PRIVACY.md)).
|
||||
The only network connection involved is to `releases.poli0981.dev` (see [PRIVACY.md](PRIVACY.md)).
|
||||
|
||||
## How it works under the hood
|
||||
|
||||
- `Program.Main` calls `VelopackApp.Build().Run()` before WPF starts, to handle the
|
||||
install/update/uninstall hooks.
|
||||
- The app checks for updates via
|
||||
`UpdateManager(new GithubSource("https://github.com/poli0981/CommandForge", null, prerelease: false))`.
|
||||
- The app checks for updates via `new UpdateManager("https://releases.poli0981.dev/commandforge")`
|
||||
(`ProductLinks.UpdateFeed`): Velopack's HTTP source reads `releases.win.json` there and downloads
|
||||
the packages it lists from the same folder. No token, no API.
|
||||
- The folder is a Cloudflare R2 bucket served through Cloudflare. The feed files
|
||||
(`releases.win.json`, `RELEASES`) and the stable-named installer and portable zip bypass the
|
||||
edge cache; every other file name carries its version and is never overwritten.
|
||||
- Download and apply are separate steps, so the app can end the admin session and check for a
|
||||
running command just before it restarts.
|
||||
- Auto-update works for the installed app and for the portable zip from the releases page (both
|
||||
carry Velopack's `Update.exe`). A build you run from source can't update; the app detects this
|
||||
and says so instead of offering an update.
|
||||
- Auto-update works for the installed app and for the portable zip (both carry Velopack's
|
||||
`Update.exe`). A build you run from source can't update; the app detects this and says so
|
||||
instead of offering an update.
|
||||
|
||||
## Release artifacts and the delta mechanism
|
||||
## Release files and the delta mechanism
|
||||
|
||||
Each release (see [RELEASING.md](RELEASING.md)) uploads the contents of `Releases/`:
|
||||
Each release (see [RELEASING.md](RELEASING.md)) puts these files under
|
||||
`https://releases.poli0981.dev/commandforge/`:
|
||||
|
||||
| Asset | Purpose |
|
||||
| File | Purpose |
|
||||
|---|---|
|
||||
| `CommandForge-win-Setup.exe` | First-time installer |
|
||||
| `CommandForge-win-Setup.exe` | First-time installer (always the newest release) |
|
||||
| `CommandForge-win-Portable.zip` | The app without an installer; extract it anywhere and it updates itself in place (settings and logs still go to `%AppData%\CommandForge`) |
|
||||
| `CommandForge-<version>-full.nupkg` | Full package (fallback / first install of a version) |
|
||||
| `CommandForge-<version>-delta.nupkg` | Delta from the previous version (small download) |
|
||||
| `releases.win.json` / `RELEASES` | Update manifest the client reads |
|
||||
| `checksums.txt` | SHA-256 of the assets (manual verification) |
|
||||
| `sbom.spdx.json` | SPDX software bill of materials |
|
||||
| `releases.win.json` / `RELEASES` | Update manifest the client reads (uploaded last) |
|
||||
| `<version>/SHA256SUMS` | SHA-256 of what that version ships: installer, portable zip, packages, SBOM |
|
||||
| `<version>/sbom.cdx.json` | CycloneDX software bill of materials |
|
||||
|
||||
The installer, the portable zip and the packages also have build-provenance attestations (see the
|
||||
[README](README.md#unknown-publisher-and-verifying-your-download)).
|
||||
There is no directory listing: the release notes on the
|
||||
[releases page](https://git.poli0981.dev/poli0981/CommandForge/releases) link each file. The
|
||||
feed keeps the ten newest releases.
|
||||
|
||||
Velopack needs the **previous** `-full.nupkg` present while packing to compute a delta. The
|
||||
release workflow runs `vpk download github` before `vpk pack`, so every release after the first
|
||||
produces **both** a `-full.nupkg` and a `-delta.nupkg`. Clients on the previous version (for
|
||||
example 1.5.1 when 2.0.0 ships) download only the delta; the full package remains the fallback. The very first release had no previous version, so it shipped only a full package.
|
||||
release workflow runs `vpk download s3` before `vpk pack`, so every release after the first one
|
||||
on R2 produces **both** a `-full.nupkg` and a `-delta.nupkg`; clients on the previous version
|
||||
download only the delta, and the full package remains the fallback. 2.3.0, the first release on
|
||||
R2, had no previous version there, so it shipped only a full package.
|
||||
|
||||
> If you ever build a release **locally**, run `dotnet vpk download github --repoUrl <repo>`
|
||||
> first so the prior full package is available for the delta — otherwise only a full package is
|
||||
> produced.
|
||||
> If you ever build a release **locally**, run
|
||||
> `dotnet vpk download http --url https://releases.poli0981.dev/commandforge` first so the prior
|
||||
> full package is available for the delta — otherwise only a full package is produced.
|
||||
@@ -27,7 +27,7 @@ The first time you open CommandForge, it asks you to accept its terms:
|
||||
1. Pick your language in the list above the terms. English, Tiếng Việt, 日本語, 简体中文 and
|
||||
Español are available, and you can change it later in Settings.
|
||||
2. Read the summaries on the **EULA**, **GPLv3**, **Disclaimer** and **Privacy** tabs. **Read the
|
||||
full text on GitHub** opens the complete documents.
|
||||
full text online** opens the complete documents.
|
||||
3. Tick **I have read and agree to all of the terms**, then choose **Continue**.
|
||||
|
||||
You'll be asked again only if the terms change.
|
||||
@@ -188,7 +188,7 @@ Under **My commands** you can save your own command lines, such as a `ping` you
|
||||
| **Backup & profiles** | **Export…** / **Import…** your appearance, behavior and favorites as a `.json` file, and save named profiles (for example "Gaming PC" or "Office") that you can **Apply** or **Delete**. |
|
||||
| **Logs** | Log level, log size, **Open log folder**, **Export logs (.zip)**, **Delete old logs**. |
|
||||
| **Advanced** | Run mode (whether this copy updates itself), the config folder, the Debug panel, and **Reset to defaults** (keeps your accepted terms and logs). |
|
||||
| **About** | Version, license and GitHub links. |
|
||||
| **About** | Version, license and source code links. |
|
||||
|
||||
Theme, language and font size change immediately; no restart needed.
|
||||
|
||||
@@ -244,8 +244,9 @@ What works, what doesn't yet, and how to report a barrier:
|
||||
|
||||
## Updates
|
||||
|
||||
The app checks GitHub for new versions on startup (unless you turned that off) and when you press
|
||||
`F5`.
|
||||
The app checks `releases.poli0981.dev` for new versions on startup (unless you turned that off)
|
||||
and when you press `F5`. Version 2.2.0 and older checked GitHub, which is gone: install the new
|
||||
version once by hand (see [UPDATES.md](UPDATES.md)).
|
||||
|
||||
- When an update is available, choose **Download & restart**.
|
||||
- Closing the dialog cancels the download.
|
||||
@@ -279,5 +280,5 @@ afterwards.
|
||||
new prompt. If admin commands keep failing, use **End admin session** and try again.
|
||||
- **Output looks garbled**: please report it with the command and your Windows display language.
|
||||
- **Something went wrong**: the error dialog has an **Error code** and **Copy details**.
|
||||
**Report a bug** (also in the More menu) opens a pre-filled GitHub issue. Nothing is sent until
|
||||
you submit it. Export the logs to attach them, but review them first.
|
||||
**Report a bug** (also in the More menu) opens a pre-filled issue on the project's GitLab
|
||||
mirror. Nothing is sent until you submit it. Export the logs to attach them, but review them first.
|
||||
+3
-4
@@ -1,13 +1,13 @@
|
||||
# Qodana's settings for .github/workflows/qodana.yml.
|
||||
# Qodana's settings for .gitea/workflows/qodana.yml (the ops repo's reusable-qodana.yml, Qodana CLI).
|
||||
#
|
||||
# The linter is Qodana for .NET (`qodana-dotnet`: Rider's engine) in NATIVE mode, on the job's own
|
||||
# Windows runner with the .NET SDK that global.json names: the WPF projects (net10.0-windows) load
|
||||
# only on Windows. It needs the Ultimate licence of the Qodana Cloud project; the token is the
|
||||
# QODANA_TOKEN repository secret.
|
||||
#
|
||||
# Everything a run needs is here and nothing is an action argument, so `qodana scan` in the
|
||||
# Everything a run needs is here and nothing is a workflow argument, so `qodana scan` in the
|
||||
# repository root of a developer's PC (with QODANA_TOKEN set) reads the same settings. The linter's
|
||||
# version is the action's: the workflow pins the action, the action its CLI, the CLI its linter.
|
||||
# version is the CLI's: the ops workflow pins the CLI (SHA-256 verified), the CLI its linter.
|
||||
version: "1.0"
|
||||
linter: qodana-dotnet
|
||||
withinDocker: false
|
||||
@@ -50,7 +50,6 @@ exclude:
|
||||
- publish
|
||||
- TestResults
|
||||
- .nuget
|
||||
- .sonarqube
|
||||
- docs
|
||||
- .claude
|
||||
- .idea
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"extends": ["local>poli0981/renovate-config"],
|
||||
"packageRules": [
|
||||
{
|
||||
"description": "Maintenance mode: a major lands only in a planned release with its migration. It waits on the Dependency Dashboard until it is ticked there; minor and patch updates come in the preset's grouped pull request.",
|
||||
"matchUpdateTypes": ["major"],
|
||||
"dependencyDashboardApproval": true
|
||||
},
|
||||
{
|
||||
"description": "The app stays on the .NET 10 LTS line: Microsoft.Extensions.* majors follow .NET majors, and moving to a new .NET major (the SDK in global.json included) is a migration done by hand, never a bot bump.",
|
||||
"matchPackageNames": ["Microsoft.Extensions.**", "dotnet-sdk"],
|
||||
"matchUpdateTypes": ["major"],
|
||||
"enabled": false
|
||||
},
|
||||
{
|
||||
"description": "The Velopack library (CommandForge.Infrastructure, CommandForge.Wpf) and the vpk CLI (.config/dotnet-tools.json) must be the same version: one pull request of their own.",
|
||||
"matchPackageNames": ["Velopack", "vpk"],
|
||||
"groupName": "Velopack",
|
||||
"groupSlug": "velopack"
|
||||
}
|
||||
]
|
||||
}
|
||||
+3
-1
@@ -1,12 +1,14 @@
|
||||
#requires -Version 7
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Publishes CommandForge self-contained and packages it with Velopack (vpk) for GitHub Releases.
|
||||
Publishes CommandForge self-contained and packages it with Velopack (vpk).
|
||||
|
||||
.DESCRIPTION
|
||||
Produces, under Releases/:
|
||||
CommandForge-win-Setup.exe, CommandForge-win-Portable.zip, RELEASES, releases.win.json,
|
||||
*-full.nupkg, *-delta.nupkg
|
||||
scripts/release-assets.ps1 adds the SBOM, SHA256SUMS and the release notes; release.yml uploads
|
||||
the lot to Cloudflare R2 (https://releases.poli0981.dev/commandforge, `vpk upload s3`).
|
||||
Update is per-user (no UAC). The Elevator is published into the same folder by the
|
||||
PublishElevatorOnPublish MSBuild target, so vpk packages it automatically.
|
||||
|
||||
|
||||
@@ -0,0 +1,129 @@
|
||||
#requires -Version 7
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Writes the release's SBOM, SHA256SUMS and release notes next to the Velopack output.
|
||||
|
||||
.DESCRIPTION
|
||||
Run after scripts/pack.ps1 (release.yml does; it also runs locally, as a dry run). Produces:
|
||||
|
||||
<OutputDir>/versioned/<Version>/sbom.cdx.json CycloneDX SBOM of the solution (test projects
|
||||
left out; build-only packages listed with
|
||||
scope "excluded")
|
||||
<OutputDir>/versioned/<Version>/SHA256SUMS sha256sum format, one line per file below
|
||||
<OutputDir>/release-notes.md CHANGELOG.md section + download links
|
||||
|
||||
release.yml uploads `versioned/` to https://releases.poli0981.dev/commandforge/<Version>/ with the
|
||||
ops repo's publish-r2.yml, and uses release-notes.md as the Gitea release's body.
|
||||
|
||||
SHA256SUMS covers what this version ships: the installer and the portable zip (stable names
|
||||
at the folder root, replaced by the next release), this version's full and delta packages, and
|
||||
the SBOM. Not the feed files (releases.win.json, assets.win.json, RELEASES): `vpk upload`
|
||||
rewrites them on every release, so a checksum of them is stale at the next one.
|
||||
|
||||
.PARAMETER Version
|
||||
SemVer version without the leading 'v', e.g. 2.3.0.
|
||||
|
||||
.PARAMETER VirusTotalAnalysis
|
||||
Optional: the `analysis` output of crazy-max/ghaction-virustotal ("path=url,path=url"). Each
|
||||
file gets a link to its permanent VirusTotal report in the notes.
|
||||
|
||||
.EXAMPLE
|
||||
./scripts/pack.ps1 -Version 2.3.0; ./scripts/release-assets.ps1 -Version 2.3.0
|
||||
#>
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[Parameter(Mandatory = $true)]
|
||||
[string] $Version,
|
||||
|
||||
[string] $ReleasesDir = 'Releases',
|
||||
|
||||
[string] $OutputDir = 'r2-release',
|
||||
|
||||
[string] $BaseUrl = 'https://releases.poli0981.dev/commandforge',
|
||||
|
||||
[string] $VirusTotalAnalysis = ''
|
||||
)
|
||||
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
if ($Version -notmatch '^\d+\.\d+\.\d+$') { throw "Version '$Version' is not X.Y.Z" }
|
||||
|
||||
$repoRoot = Split-Path -Parent $PSScriptRoot
|
||||
Push-Location $repoRoot
|
||||
try {
|
||||
$releases = (Resolve-Path -LiteralPath $ReleasesDir).Path
|
||||
$versioned = Join-Path $OutputDir "versioned/$Version"
|
||||
New-Item -ItemType Directory -Force -Path $versioned | Out-Null
|
||||
|
||||
# --- What this version ships -------------------------------------------------------------
|
||||
$required = @('CommandForge-win-Setup.exe', 'CommandForge-win-Portable.zip', "CommandForge-$Version-full.nupkg")
|
||||
foreach ($name in $required) {
|
||||
if (-not (Test-Path -LiteralPath (Join-Path $releases $name) -PathType Leaf)) {
|
||||
throw "$ReleasesDir is missing $name (run scripts/pack.ps1 -Version $Version first)"
|
||||
}
|
||||
}
|
||||
# The delta exists only when the previous release was downloaded before packing.
|
||||
$delta = "CommandForge-$Version-delta.nupkg"
|
||||
$shipped = @($required) + @(if (Test-Path -LiteralPath (Join-Path $releases $delta)) { $delta })
|
||||
|
||||
# --- SBOM (CycloneDX) ----------------------------------------------------------------------
|
||||
Write-Host "Writing the CycloneDX SBOM..." -ForegroundColor Cyan
|
||||
dotnet tool run dotnet-CycloneDX CommandForge.slnx `
|
||||
--exclude-test-projects `
|
||||
--configuration Release `
|
||||
--output $versioned `
|
||||
--filename sbom.cdx.json `
|
||||
--output-format Json `
|
||||
--set-name CommandForge `
|
||||
--set-version $Version
|
||||
if ($LASTEXITCODE -ne 0) { throw "CycloneDX failed with exit code $LASTEXITCODE" }
|
||||
$sbom = Join-Path $versioned 'sbom.cdx.json'
|
||||
|
||||
# --- SHA256SUMS ----------------------------------------------------------------------------
|
||||
$files = @($shipped | ForEach-Object { Get-Item -LiteralPath (Join-Path $releases $_) }) + (Get-Item -LiteralPath $sbom)
|
||||
$lines = $files |
|
||||
Sort-Object Name |
|
||||
ForEach-Object { '{0} {1}' -f (Get-FileHash -Algorithm SHA256 -LiteralPath $_.FullName).Hash.ToLowerInvariant(), $_.Name }
|
||||
# LF line endings, as sha256sum writes and `sha256sum -c` expects.
|
||||
[IO.File]::WriteAllText((Join-Path $versioned 'SHA256SUMS'), (($lines -join "`n") + "`n"), [Text.Encoding]::ASCII)
|
||||
$lines | ForEach-Object { Write-Host $_ }
|
||||
|
||||
# --- Release notes -------------------------------------------------------------------------
|
||||
$changelog = (Get-Content CHANGELOG.md -Raw) -replace "`r`n", "`n"
|
||||
$pattern = "(?ms)^## \[$([regex]::Escape($Version))\][^\n]*\n(.*?)(?=^## \[|^\[[^\]]+\]: |\z)"
|
||||
$section = [regex]::Match($changelog, $pattern, 'None', [TimeSpan]::FromSeconds(5))
|
||||
if (-not ($section.Success -and $section.Groups[1].Value.Trim())) {
|
||||
throw "CHANGELOG.md has no section for $Version"
|
||||
}
|
||||
|
||||
$vbase = "$BaseUrl/$Version"
|
||||
$notes = [Collections.Generic.List[string]]::new()
|
||||
$notes.Add($section.Groups[1].Value.Trim())
|
||||
$notes.AddRange([string[]]@(
|
||||
'', '## Download (Windows 10/11, x64)', '',
|
||||
"- Installer: [CommandForge-win-Setup.exe]($BaseUrl/CommandForge-win-Setup.exe)",
|
||||
"- Portable: [CommandForge-win-Portable.zip]($BaseUrl/CommandForge-win-Portable.zip)",
|
||||
"- [SHA256SUMS]($vbase/SHA256SUMS) · [SBOM (CycloneDX)]($vbase/sbom.cdx.json)",
|
||||
'',
|
||||
'The installer and the portable zip always hold the newest release; the checksums below are this one''s.',
|
||||
'Installed copies update from the app (More (⋯) → Check for updates). Versions 2.2.0 and older',
|
||||
'checked GitHub, which is gone: install this version once by hand, over the old one.',
|
||||
'', '```', ($lines -join "`n"), '```'))
|
||||
|
||||
if ($VirusTotalAnalysis) {
|
||||
$notes.AddRange([string[]]@('', '### VirusTotal', ''))
|
||||
foreach ($pair in $VirusTotalAnalysis -split ',') {
|
||||
$file = ($pair -split '=', 2)[0]
|
||||
if (-not $file) { continue }
|
||||
$hash = (Get-FileHash -Algorithm SHA256 -LiteralPath $file).Hash.ToLowerInvariant()
|
||||
$notes.Add(('- [{0}](https://www.virustotal.com/gui/file/{1})' -f (Split-Path $file -Leaf), $hash))
|
||||
}
|
||||
}
|
||||
|
||||
$notesPath = Join-Path $OutputDir 'release-notes.md'
|
||||
[IO.File]::WriteAllText($notesPath, (($notes -join "`n") + "`n"), [Text.UTF8Encoding]::new($false))
|
||||
Write-Host "Release notes: $notesPath" -ForegroundColor Green
|
||||
}
|
||||
finally {
|
||||
Pop-Location
|
||||
}
|
||||
@@ -11,7 +11,7 @@ public interface ISettingsService
|
||||
/// <summary>The terms version the user last accepted, or <see langword="null"/> if none.</summary>
|
||||
public string? AcceptedTermsVersion { get; set; }
|
||||
|
||||
/// <summary>Whether to check GitHub Releases for updates on startup (default <see langword="true"/>). Local-only.</summary>
|
||||
/// <summary>Whether to check the update feed for updates on startup (default <see langword="true"/>). Local-only.</summary>
|
||||
public bool AutoCheckForUpdates { get; set; }
|
||||
|
||||
/// <summary>The UI color theme (default <see cref="AppTheme.System"/>).</summary>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
namespace CommandForge.Application.Ports;
|
||||
|
||||
/// <summary>
|
||||
/// Checks GitHub Releases for application updates (via Velopack) and applies them.
|
||||
/// Checks the release feed (<see cref="ProductLinks.UpdateFeed"/>) for application updates (via Velopack) and applies them.
|
||||
/// Per-user install ⇒ no UAC; applying ends any elevated session first.
|
||||
/// </summary>
|
||||
public interface IUpdateService
|
||||
@@ -9,7 +9,7 @@ public interface IUpdateService
|
||||
/// <summary>Whether the running app was installed via Velopack (false in dev/unpackaged).</summary>
|
||||
public bool IsUpdateSupported { get; }
|
||||
|
||||
/// <summary>Checks GitHub Releases for a newer version, mapping HTTP failures to <see cref="UpdateError"/>.</summary>
|
||||
/// <summary>Checks the release feed for a newer version, mapping HTTP failures to <see cref="UpdateError"/>.</summary>
|
||||
public Task<UpdateCheckResult> CheckForUpdatesAsync(CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -2,23 +2,24 @@ namespace CommandForge.Application.Ports;
|
||||
|
||||
/// <summary>
|
||||
/// Mapped failure categories for an update check or download (see <c>architectures.md</c> §5).
|
||||
/// GitHub uses 403 (primary rate limit) and 429 (secondary) — there is no 419.
|
||||
/// The feed is served by Cloudflare: 403 when its edge refuses a request, 429 when it limits them —
|
||||
/// there is no 419.
|
||||
/// </summary>
|
||||
public enum UpdateError
|
||||
{
|
||||
/// <summary>No error.</summary>
|
||||
None = 0,
|
||||
|
||||
/// <summary>No network / DNS failure / request could not reach GitHub.</summary>
|
||||
/// <summary>No network / DNS failure / request could not reach the update server.</summary>
|
||||
Offline,
|
||||
|
||||
/// <summary>404 — the release feed or repository was not found.</summary>
|
||||
/// <summary>404 — the release feed was not found.</summary>
|
||||
NotFound,
|
||||
|
||||
/// <summary>403 or 429 — GitHub rate limit reached.</summary>
|
||||
/// <summary>403 or 429 — the update server refused or rate-limited the request.</summary>
|
||||
RateLimited,
|
||||
|
||||
/// <summary>5xx — GitHub or its CDN returned a server error.</summary>
|
||||
/// <summary>5xx — the update server or its CDN returned a server error.</summary>
|
||||
ServerError,
|
||||
|
||||
/// <summary>The app is not Velopack-installed (dev/unpackaged); updates do not apply.</summary>
|
||||
|
||||
@@ -1,39 +1,61 @@
|
||||
namespace CommandForge.Application;
|
||||
|
||||
/// <summary>
|
||||
/// The project's canonical public links, in one place so the update source, About, Settings and
|
||||
/// the bug-report flow can never drift apart.
|
||||
/// The project's canonical public links, in one place so the update source, About, Settings, the
|
||||
/// legal pages and the bug-report flow can never drift apart. The source lives on the maintainer's
|
||||
/// Gitea (read-only for everyone else), issues on its GitLab mirror, releases on Cloudflare R2.
|
||||
/// </summary>
|
||||
#pragma warning disable S1075 // These are the product's fixed public URLs, not environment-specific paths.
|
||||
public static class ProductLinks
|
||||
{
|
||||
/// <summary>The GitHub repository (also the Velopack update source).</summary>
|
||||
public const string Repository = "https://github.com/poli0981/CommandForge";
|
||||
/// <summary>The canonical repository on Gitea.</summary>
|
||||
public const string Repository = "https://git.poli0981.dev/poli0981/CommandForge";
|
||||
|
||||
/// <summary>New-issue form used by "Report a bug".</summary>
|
||||
public const string NewIssue = Repository + "/issues/new";
|
||||
/// <summary>A file on the repository's main branch, as Gitea shows it.</summary>
|
||||
private const string MainBranch = Repository + "/src/branch/main/";
|
||||
|
||||
/// <summary>Releases page (downloads, checksums, release notes).</summary>
|
||||
/// <summary>
|
||||
/// The Velopack update feed (<c>releases.win.json</c> and the packages), served by Cloudflare
|
||||
/// from R2. The only address the app contacts on its own.
|
||||
/// </summary>
|
||||
public const string UpdateFeed = "https://releases.poli0981.dev/commandforge";
|
||||
|
||||
/// <summary>Releases page (release notes and download links).</summary>
|
||||
public const string Releases = Repository + "/releases";
|
||||
|
||||
/// <summary>Issues, on the public GitLab mirror (Gitea's registration is closed).</summary>
|
||||
public const string Issues = "https://gitlab.com/poli0981/CommandForge/-/issues";
|
||||
|
||||
/// <summary>New issue on the GitLab mirror, used by "Report a bug".</summary>
|
||||
public const string NewIssue = Issues + "/new";
|
||||
|
||||
/// <summary>The end-user guide in the repository.</summary>
|
||||
public const string UserGuide = Repository + "/blob/main/USAGE.md";
|
||||
public const string UserGuide = MainBranch + "USAGE.md";
|
||||
|
||||
/// <summary>Private vulnerability reporting.</summary>
|
||||
public const string SecurityAdvisory = Repository + "/security/advisories/new";
|
||||
|
||||
/// <summary>Private security reports by email (the alternative to <see cref="SecurityAdvisory"/>).</summary>
|
||||
/// <summary>Private security reports, by email only.</summary>
|
||||
public const string SecurityEmail = "security@poli0981.dev";
|
||||
|
||||
/// <summary>Questions about the code and contributions.</summary>
|
||||
/// <summary>Questions about the code, contributions and patches.</summary>
|
||||
public const string CodeEmail = "code@poli0981.dev";
|
||||
|
||||
/// <summary>The accessibility statement: what works, the known limitations, how to report a barrier.</summary>
|
||||
public const string AccessibilityStatement = Repository + "/blob/main/ACCESSIBILITY.md";
|
||||
public const string AccessibilityStatement = MainBranch + "ACCESSIBILITY.md";
|
||||
|
||||
/// <summary>Accessibility barriers by email (the alternative to the issue form).</summary>
|
||||
/// <summary>Accessibility barriers by email (the alternative to the issue template).</summary>
|
||||
public const string AccessibilityEmail = "accessibility@poli0981.dev";
|
||||
|
||||
/// <summary>The End User License Agreement in the repository.</summary>
|
||||
public const string Eula = MainBranch + "EULA.md";
|
||||
|
||||
/// <summary>The project's LICENSE file (GPLv3) in the repository.</summary>
|
||||
public const string LicenseFile = MainBranch + "LICENSE";
|
||||
|
||||
/// <summary>The disclaimer in the repository.</summary>
|
||||
public const string Disclaimer = MainBranch + "DISCLAIMER.md";
|
||||
|
||||
/// <summary>The privacy policy in the repository.</summary>
|
||||
public const string Privacy = MainBranch + "PRIVACY.md";
|
||||
|
||||
/// <summary>Full text of the GNU GPL v3.</summary>
|
||||
public const string License = "https://www.gnu.org/licenses/gpl-3.0.html";
|
||||
}
|
||||
|
||||
@@ -6,9 +6,10 @@ namespace CommandForge.Application.Updates;
|
||||
|
||||
/// <summary>
|
||||
/// Pure mapping of an HTTP status / exception to an <see cref="UpdateError"/>. No I/O, so it is
|
||||
/// unit-testable without a network. GitHub uses 403 (primary rate limit, with an
|
||||
/// <c>X-RateLimit-Remaining</c> header) and 429 (secondary); there is NO 419 (that is a Laravel
|
||||
/// CSRF code, not GitHub) so it must fall through to <see cref="UpdateError.Unknown"/>.
|
||||
/// unit-testable without a network. The feed (<see cref="ProductLinks.UpdateFeed"/>) is served by
|
||||
/// Cloudflare, whose edge answers 403 when it refuses a request and 429 when it rate-limits; both
|
||||
/// mean "try again later". There is NO 419 (that is a Laravel CSRF code, not an HTTP standard), so
|
||||
/// it must fall through to <see cref="UpdateError.Unknown"/>.
|
||||
/// </summary>
|
||||
public static class UpdateErrorMapper
|
||||
{
|
||||
|
||||
@@ -19,7 +19,7 @@ public sealed class CheckForUpdateUseCase
|
||||
/// <summary>Whether updates apply to this install (false in dev/unpackaged).</summary>
|
||||
public bool IsSupported => _updates.IsUpdateSupported;
|
||||
|
||||
/// <summary>Checks GitHub Releases for a newer version.</summary>
|
||||
/// <summary>Checks the release feed for a newer version.</summary>
|
||||
public Task<UpdateCheckResult> ExecuteAsync(CancellationToken cancellationToken = default)
|
||||
=> _updates.CheckForUpdatesAsync(cancellationToken);
|
||||
|
||||
|
||||
@@ -3,13 +3,13 @@ using CommandForge.Application.Ports;
|
||||
using CommandForge.Application.Updates;
|
||||
using Serilog;
|
||||
using Velopack;
|
||||
using Velopack.Sources;
|
||||
|
||||
namespace CommandForge.Infrastructure.Updates;
|
||||
|
||||
/// <summary>
|
||||
/// <see cref="IUpdateService"/> backed by Velopack's <see cref="UpdateManager"/> against this
|
||||
/// project's GitHub Releases. Per-user install ⇒ no UAC. Degrades to a no-op when the app is not
|
||||
/// project's release feed on Cloudflare R2 (<see cref="ProductLinks.UpdateFeed"/>, an HTTP source).
|
||||
/// Per-user install ⇒ no UAC. Degrades to a no-op when the app is not
|
||||
/// Velopack-managed (dev/unpackaged): the manager is built lazily and reports
|
||||
/// <see cref="UpdateError.NotInstalled"/> rather than throwing on construction.
|
||||
/// </summary>
|
||||
@@ -150,7 +150,7 @@ public sealed class VelopackUpdateService : IUpdateService
|
||||
{
|
||||
try
|
||||
{
|
||||
return new UpdateManager(new GithubSource(ProductLinks.Repository, accessToken: null, prerelease: false));
|
||||
return new UpdateManager(ProductLinks.UpdateFeed);
|
||||
}
|
||||
catch (InvalidOperationException ex)
|
||||
{
|
||||
|
||||
@@ -67,8 +67,8 @@
|
||||
<data name="LegalGateIntro" xml:space="preserve">
|
||||
<value>CommandForge ejecuta comandos de Windows a nivel de sistema. Revise y acepte los términos antes de continuar.</value>
|
||||
</data>
|
||||
<data name="LegalGateReadOnGitHub" xml:space="preserve">
|
||||
<value>Leer el texto completo en GitHub</value>
|
||||
<data name="LegalGateReadFullText" xml:space="preserve">
|
||||
<value>Leer el texto completo en línea</value>
|
||||
</data>
|
||||
<data name="LegalGateAgree" xml:space="preserve">
|
||||
<value>He leído y acepto todos los términos</value>
|
||||
@@ -746,16 +746,16 @@
|
||||
<value>Cerrar</value>
|
||||
</data>
|
||||
<data name="Update_Error_Offline" xml:space="preserve">
|
||||
<value>No se pudo conectar con GitHub. Comprueba tu conexión a Internet e inténtalo de nuevo.</value>
|
||||
<value>No se pudo conectar con el servidor de actualizaciones. Comprueba tu conexión a Internet e inténtalo de nuevo.</value>
|
||||
</data>
|
||||
<data name="Update_Error_NotFound" xml:space="preserve">
|
||||
<value>No se encontró ningún canal de versiones para esta aplicación.</value>
|
||||
</data>
|
||||
<data name="Update_Error_RateLimited" xml:space="preserve">
|
||||
<value>Se alcanzó el límite de solicitudes de GitHub. Inténtalo de nuevo más tarde.</value>
|
||||
<value>El servidor de actualizaciones está ocupado o rechazó la solicitud. Inténtalo de nuevo más tarde.</value>
|
||||
</data>
|
||||
<data name="Update_Error_ServerError" xml:space="preserve">
|
||||
<value>GitHub devolvió un error del servidor. Inténtalo de nuevo más tarde.</value>
|
||||
<value>El servidor de actualizaciones devolvió un error. Inténtalo de nuevo más tarde.</value>
|
||||
</data>
|
||||
<data name="Update_Error_NotInstalled" xml:space="preserve">
|
||||
<value>Las actualizaciones solo están disponibles en la versión instalada de la aplicación.</value>
|
||||
@@ -907,8 +907,8 @@
|
||||
<data name="Settings_License" xml:space="preserve">
|
||||
<value>Licencia (GPLv3)</value>
|
||||
</data>
|
||||
<data name="Settings_GitHub" xml:space="preserve">
|
||||
<value>GitHub</value>
|
||||
<data name="Settings_SourceCode" xml:space="preserve">
|
||||
<value>Código fuente</value>
|
||||
</data>
|
||||
<data name="Menu_LogViewer" xml:space="preserve">
|
||||
<value>Visor de registros</value>
|
||||
@@ -992,7 +992,7 @@
|
||||
<value>Error inesperado</value>
|
||||
</data>
|
||||
<data name="Error_Message" xml:space="preserve">
|
||||
<value>Algo salió mal. Puedes copiar los detalles o informar de esto en GitHub.</value>
|
||||
<value>Algo salió mal. Puedes copiar los detalles o informar de esto como error.</value>
|
||||
</data>
|
||||
<data name="Error_Code" xml:space="preserve">
|
||||
<value>Código de error:</value>
|
||||
@@ -1016,7 +1016,7 @@
|
||||
<value>Exportar registro (.zip)</value>
|
||||
</data>
|
||||
<data name="ReportBug_OpenIssue" xml:space="preserve">
|
||||
<value>Abrir incidencia en GitHub</value>
|
||||
<value>Abrir incidencia en GitLab</value>
|
||||
</data>
|
||||
<data name="ReportBug_Close" xml:space="preserve">
|
||||
<value>Cerrar</value>
|
||||
@@ -1263,7 +1263,7 @@
|
||||
<value>Úsalo bajo tu propio riesgo. Los comandos a nivel de sistema pueden cambiar la configuración o provocar pérdida de datos: haz una copia de seguridad y crea un punto de restauración antes de realizar operaciones arriesgadas. CommandForge no está afiliado a Microsoft.</value>
|
||||
</data>
|
||||
<data name="Legal_PrivacySummary" xml:space="preserve">
|
||||
<value>Prioriza el funcionamiento sin conexión. CommandForge no recopila datos personales ni tiene telemetría; la única conexión de red es la comprobación de actualizaciones en GitHub.</value>
|
||||
<value>Prioriza el funcionamiento sin conexión. CommandForge no recopila datos personales ni tiene telemetría; la única conexión de red es la comprobación de actualizaciones (releases.poli0981.dev).</value>
|
||||
</data>
|
||||
<data name="Menu_Terms" xml:space="preserve">
|
||||
<value>Términos y privacidad</value>
|
||||
@@ -2553,7 +2553,7 @@ Los detalles se escribieron en la carpeta de registros:
|
||||
<value>Preguntar antes de cerrar la aplicación mientras se ejecuta un comando.</value>
|
||||
</data>
|
||||
<data name="Settings_AutoCheckUpdatesDesc" xml:space="preserve">
|
||||
<value>Buscar una versión nueva en GitHub al iniciar la aplicación. No se envía nada más.</value>
|
||||
<value>Buscar una versión nueva en releases.poli0981.dev al iniciar la aplicación. No se envía nada más.</value>
|
||||
</data>
|
||||
<data name="Settings_LogLevelDesc" xml:space="preserve">
|
||||
<value>Cuánto detalle se guarda en los archivos de registro de este equipo.</value>
|
||||
|
||||
@@ -67,8 +67,8 @@
|
||||
<data name="LegalGateIntro" xml:space="preserve">
|
||||
<value>CommandForge はシステムレベルの Windows コマンドを実行します。続行する前に利用規約を確認し、同意してください。</value>
|
||||
</data>
|
||||
<data name="LegalGateReadOnGitHub" xml:space="preserve">
|
||||
<value>GitHub で全文を読む</value>
|
||||
<data name="LegalGateReadFullText" xml:space="preserve">
|
||||
<value>全文をオンラインで読む</value>
|
||||
</data>
|
||||
<data name="LegalGateAgree" xml:space="preserve">
|
||||
<value>すべての規約を読み、同意します</value>
|
||||
@@ -746,16 +746,16 @@
|
||||
<value>閉じる</value>
|
||||
</data>
|
||||
<data name="Update_Error_Offline" xml:space="preserve">
|
||||
<value>GitHub に接続できませんでした。インターネット接続を確認して再試行してください。</value>
|
||||
<value>更新サーバーに接続できませんでした。インターネット接続を確認して再試行してください。</value>
|
||||
</data>
|
||||
<data name="Update_Error_NotFound" xml:space="preserve">
|
||||
<value>このアプリのリリースフィードが見つかりませんでした。</value>
|
||||
</data>
|
||||
<data name="Update_Error_RateLimited" xml:space="preserve">
|
||||
<value>GitHub のレート制限に達しました。しばらくしてから再試行してください。</value>
|
||||
<value>更新サーバーが混雑しているか、要求を拒否しました。しばらくしてから再試行してください。</value>
|
||||
</data>
|
||||
<data name="Update_Error_ServerError" xml:space="preserve">
|
||||
<value>GitHub がサーバーエラーを返しました。しばらくしてから再試行してください。</value>
|
||||
<value>更新サーバーがエラーを返しました。しばらくしてから再試行してください。</value>
|
||||
</data>
|
||||
<data name="Update_Error_NotInstalled" xml:space="preserve">
|
||||
<value>更新はインストール版アプリでのみ利用できます。</value>
|
||||
@@ -907,8 +907,8 @@
|
||||
<data name="Settings_License" xml:space="preserve">
|
||||
<value>ライセンス(GPLv3)</value>
|
||||
</data>
|
||||
<data name="Settings_GitHub" xml:space="preserve">
|
||||
<value>GitHub</value>
|
||||
<data name="Settings_SourceCode" xml:space="preserve">
|
||||
<value>ソースコード</value>
|
||||
</data>
|
||||
<data name="Menu_LogViewer" xml:space="preserve">
|
||||
<value>ログビューアー</value>
|
||||
@@ -992,7 +992,7 @@
|
||||
<value>予期しないエラー</value>
|
||||
</data>
|
||||
<data name="Error_Message" xml:space="preserve">
|
||||
<value>問題が発生しました。詳細をコピーするか、GitHub で報告できます。</value>
|
||||
<value>問題が発生しました。詳細をコピーするか、バグとして報告できます。</value>
|
||||
</data>
|
||||
<data name="Error_Code" xml:space="preserve">
|
||||
<value>エラーコード:</value>
|
||||
@@ -1016,7 +1016,7 @@
|
||||
<value>ログをエクスポート(.zip)</value>
|
||||
</data>
|
||||
<data name="ReportBug_OpenIssue" xml:space="preserve">
|
||||
<value>GitHub で issue を作成</value>
|
||||
<value>GitLab で issue を作成</value>
|
||||
</data>
|
||||
<data name="ReportBug_Close" xml:space="preserve">
|
||||
<value>閉じる</value>
|
||||
@@ -1263,7 +1263,7 @@
|
||||
<value>自己責任でご使用ください。システムレベルのコマンドは構成を変更したりデータを失わせたりする可能性があります — リスクの高い操作の前にデータをバックアップし、復元ポイントを作成してください。CommandForge は Microsoft とは関係ありません。</value>
|
||||
</data>
|
||||
<data name="Legal_PrivacySummary" xml:space="preserve">
|
||||
<value>オフラインファースト。CommandForge は個人データを収集せず、テレメトリもありません。唯一のネットワーク接続は GitHub の更新確認です。</value>
|
||||
<value>オフラインファースト。CommandForge は個人データを収集せず、テレメトリもありません。唯一のネットワーク接続は更新確認(releases.poli0981.dev)です。</value>
|
||||
</data>
|
||||
<data name="Menu_Terms" xml:space="preserve">
|
||||
<value>規約とプライバシー</value>
|
||||
@@ -2553,7 +2553,7 @@
|
||||
<value>コマンドの実行中にアプリを閉じる前に確認します。</value>
|
||||
</data>
|
||||
<data name="Settings_AutoCheckUpdatesDesc" xml:space="preserve">
|
||||
<value>アプリの起動時に GitHub で新しいバージョンを確認します。それ以外の情報は送信しません。</value>
|
||||
<value>アプリの起動時に releases.poli0981.dev で新しいバージョンを確認します。それ以外の情報は送信しません。</value>
|
||||
</data>
|
||||
<data name="Settings_LogLevelDesc" xml:space="preserve">
|
||||
<value>この PC のログ ファイルに記録する詳細さ。</value>
|
||||
|
||||
@@ -67,8 +67,8 @@
|
||||
<data name="LegalGateIntro" xml:space="preserve">
|
||||
<value>CommandForge runs system-level Windows commands. Please review and accept the terms before continuing.</value>
|
||||
</data>
|
||||
<data name="LegalGateReadOnGitHub" xml:space="preserve">
|
||||
<value>Read the full text on GitHub</value>
|
||||
<data name="LegalGateReadFullText" xml:space="preserve">
|
||||
<value>Read the full text online</value>
|
||||
</data>
|
||||
<data name="LegalGateAgree" xml:space="preserve">
|
||||
<value>I have read and agree to all of the terms</value>
|
||||
@@ -746,16 +746,16 @@
|
||||
<value>Close</value>
|
||||
</data>
|
||||
<data name="Update_Error_Offline" xml:space="preserve">
|
||||
<value>Couldn't reach GitHub. Check your internet connection and try again.</value>
|
||||
<value>Couldn't reach the update server. Check your internet connection and try again.</value>
|
||||
</data>
|
||||
<data name="Update_Error_NotFound" xml:space="preserve">
|
||||
<value>No release feed was found for this app.</value>
|
||||
</data>
|
||||
<data name="Update_Error_RateLimited" xml:space="preserve">
|
||||
<value>GitHub rate limit reached. Please try again later.</value>
|
||||
<value>The update server is busy or refused the request. Please try again later.</value>
|
||||
</data>
|
||||
<data name="Update_Error_ServerError" xml:space="preserve">
|
||||
<value>GitHub returned a server error. Please try again later.</value>
|
||||
<value>The update server returned an error. Please try again later.</value>
|
||||
</data>
|
||||
<data name="Update_Error_NotInstalled" xml:space="preserve">
|
||||
<value>Updates are only available in the installed version of the app.</value>
|
||||
@@ -907,8 +907,8 @@
|
||||
<data name="Settings_License" xml:space="preserve">
|
||||
<value>License (GPLv3)</value>
|
||||
</data>
|
||||
<data name="Settings_GitHub" xml:space="preserve">
|
||||
<value>GitHub</value>
|
||||
<data name="Settings_SourceCode" xml:space="preserve">
|
||||
<value>Source code</value>
|
||||
</data>
|
||||
<data name="Menu_LogViewer" xml:space="preserve">
|
||||
<value>Log viewer</value>
|
||||
@@ -992,7 +992,7 @@
|
||||
<value>Unexpected error</value>
|
||||
</data>
|
||||
<data name="Error_Message" xml:space="preserve">
|
||||
<value>Something went wrong. You can copy the details or report this on GitHub.</value>
|
||||
<value>Something went wrong. You can copy the details or report this as a bug.</value>
|
||||
</data>
|
||||
<data name="Error_Code" xml:space="preserve">
|
||||
<value>Error code:</value>
|
||||
@@ -1016,7 +1016,7 @@
|
||||
<value>Export log (.zip)</value>
|
||||
</data>
|
||||
<data name="ReportBug_OpenIssue" xml:space="preserve">
|
||||
<value>Open issue on GitHub</value>
|
||||
<value>Open issue on GitLab</value>
|
||||
</data>
|
||||
<data name="ReportBug_Close" xml:space="preserve">
|
||||
<value>Close</value>
|
||||
@@ -1263,7 +1263,7 @@ Continue?</value>
|
||||
<value>Use at your own risk. System-level commands can change configuration or cause data loss — back up your data and create a restore point before risky operations. CommandForge is not affiliated with Microsoft.</value>
|
||||
</data>
|
||||
<data name="Legal_PrivacySummary" xml:space="preserve">
|
||||
<value>Offline-first. CommandForge collects no personal data and has no telemetry; the only network connection is the GitHub update check.</value>
|
||||
<value>Offline-first. CommandForge collects no personal data and has no telemetry; the only network connection is the update check (releases.poli0981.dev).</value>
|
||||
</data>
|
||||
<data name="Menu_Terms" xml:space="preserve">
|
||||
<value>Terms & Privacy</value>
|
||||
@@ -2553,7 +2553,7 @@ Details were written to the log folder:
|
||||
<value>Ask before closing the app while a command is running.</value>
|
||||
</data>
|
||||
<data name="Settings_AutoCheckUpdatesDesc" xml:space="preserve">
|
||||
<value>Check GitHub for a new version when the app starts. Nothing else is sent.</value>
|
||||
<value>Check releases.poli0981.dev for a new version when the app starts. Nothing else is sent.</value>
|
||||
</data>
|
||||
<data name="Settings_LogLevelDesc" xml:space="preserve">
|
||||
<value>How much detail goes into the log files on this PC.</value>
|
||||
|
||||
@@ -67,8 +67,8 @@
|
||||
<data name="LegalGateIntro" xml:space="preserve">
|
||||
<value>CommandForge chạy các lệnh cấp hệ thống của Windows. Vui lòng đọc và đồng ý với điều khoản trước khi tiếp tục.</value>
|
||||
</data>
|
||||
<data name="LegalGateReadOnGitHub" xml:space="preserve">
|
||||
<value>Đọc đầy đủ trên GitHub</value>
|
||||
<data name="LegalGateReadFullText" xml:space="preserve">
|
||||
<value>Đọc toàn văn trực tuyến</value>
|
||||
</data>
|
||||
<data name="LegalGateAgree" xml:space="preserve">
|
||||
<value>Tôi đã đọc và đồng ý với tất cả điều khoản</value>
|
||||
@@ -746,16 +746,16 @@
|
||||
<value>Đóng</value>
|
||||
</data>
|
||||
<data name="Update_Error_Offline" xml:space="preserve">
|
||||
<value>Không kết nối được GitHub. Kiểm tra mạng và thử lại.</value>
|
||||
<value>Không kết nối được máy chủ cập nhật. Kiểm tra mạng và thử lại.</value>
|
||||
</data>
|
||||
<data name="Update_Error_NotFound" xml:space="preserve">
|
||||
<value>Không tìm thấy nguồn phát hành cho ứng dụng.</value>
|
||||
</data>
|
||||
<data name="Update_Error_RateLimited" xml:space="preserve">
|
||||
<value>Đã đạt giới hạn truy vấn GitHub. Vui lòng thử lại sau.</value>
|
||||
<value>Máy chủ cập nhật đang bận hoặc từ chối yêu cầu. Vui lòng thử lại sau.</value>
|
||||
</data>
|
||||
<data name="Update_Error_ServerError" xml:space="preserve">
|
||||
<value>GitHub gặp lỗi máy chủ. Vui lòng thử lại sau.</value>
|
||||
<value>Máy chủ cập nhật gặp lỗi. Vui lòng thử lại sau.</value>
|
||||
</data>
|
||||
<data name="Update_Error_NotInstalled" xml:space="preserve">
|
||||
<value>Cập nhật chỉ khả dụng ở bản đã cài đặt.</value>
|
||||
@@ -907,8 +907,8 @@
|
||||
<data name="Settings_License" xml:space="preserve">
|
||||
<value>Giấy phép (GPLv3)</value>
|
||||
</data>
|
||||
<data name="Settings_GitHub" xml:space="preserve">
|
||||
<value>GitHub</value>
|
||||
<data name="Settings_SourceCode" xml:space="preserve">
|
||||
<value>Mã nguồn</value>
|
||||
</data>
|
||||
<data name="Menu_LogViewer" xml:space="preserve">
|
||||
<value>Xem nhật ký</value>
|
||||
@@ -992,7 +992,7 @@
|
||||
<value>Lỗi không mong muốn</value>
|
||||
</data>
|
||||
<data name="Error_Message" xml:space="preserve">
|
||||
<value>Đã xảy ra lỗi. Bạn có thể sao chép chi tiết hoặc báo lỗi trên GitHub.</value>
|
||||
<value>Đã xảy ra lỗi. Bạn có thể sao chép chi tiết hoặc báo lỗi.</value>
|
||||
</data>
|
||||
<data name="Error_Code" xml:space="preserve">
|
||||
<value>Mã lỗi:</value>
|
||||
@@ -1016,7 +1016,7 @@
|
||||
<value>Xuất log (.zip)</value>
|
||||
</data>
|
||||
<data name="ReportBug_OpenIssue" xml:space="preserve">
|
||||
<value>Mở issue trên GitHub</value>
|
||||
<value>Mở issue trên GitLab</value>
|
||||
</data>
|
||||
<data name="ReportBug_Close" xml:space="preserve">
|
||||
<value>Đóng</value>
|
||||
@@ -1263,7 +1263,7 @@ Tiếp tục?</value>
|
||||
<value>Sử dụng với rủi ro của riêng bạn. Lệnh cấp hệ thống có thể thay đổi cấu hình hoặc gây mất dữ liệu — hãy sao lưu và tạo điểm khôi phục trước các thao tác rủi ro. CommandForge không liên kết với Microsoft.</value>
|
||||
</data>
|
||||
<data name="Legal_PrivacySummary" xml:space="preserve">
|
||||
<value>Ưu tiên offline. CommandForge không thu thập dữ liệu cá nhân và không có telemetry; kết nối mạng duy nhất là kiểm tra cập nhật từ GitHub.</value>
|
||||
<value>Ưu tiên offline. CommandForge không thu thập dữ liệu cá nhân và không có telemetry; kết nối mạng duy nhất là kiểm tra cập nhật (releases.poli0981.dev).</value>
|
||||
</data>
|
||||
<data name="Menu_Terms" xml:space="preserve">
|
||||
<value>Điều khoản & Quyền riêng tư</value>
|
||||
@@ -2553,7 +2553,7 @@ Chi tiết đã được ghi vào thư mục log:
|
||||
<value>Hỏi trước khi đóng ứng dụng khi một lệnh đang chạy.</value>
|
||||
</data>
|
||||
<data name="Settings_AutoCheckUpdatesDesc" xml:space="preserve">
|
||||
<value>Kiểm tra phiên bản mới trên GitHub khi mở ứng dụng. Không gửi gì khác.</value>
|
||||
<value>Kiểm tra phiên bản mới trên releases.poli0981.dev khi mở ứng dụng. Không gửi gì khác.</value>
|
||||
</data>
|
||||
<data name="Settings_LogLevelDesc" xml:space="preserve">
|
||||
<value>Mức chi tiết ghi vào tệp nhật ký trên máy này.</value>
|
||||
|
||||
@@ -67,8 +67,8 @@
|
||||
<data name="LegalGateIntro" xml:space="preserve">
|
||||
<value>CommandForge 会运行系统级 Windows 命令。请在继续前阅读并接受相关条款。</value>
|
||||
</data>
|
||||
<data name="LegalGateReadOnGitHub" xml:space="preserve">
|
||||
<value>在 GitHub 上阅读完整文本</value>
|
||||
<data name="LegalGateReadFullText" xml:space="preserve">
|
||||
<value>在线阅读完整文本</value>
|
||||
</data>
|
||||
<data name="LegalGateAgree" xml:space="preserve">
|
||||
<value>我已阅读并同意所有条款</value>
|
||||
@@ -746,16 +746,16 @@
|
||||
<value>关闭</value>
|
||||
</data>
|
||||
<data name="Update_Error_Offline" xml:space="preserve">
|
||||
<value>无法连接到 GitHub。请检查你的网络连接后重试。</value>
|
||||
<value>无法连接到更新服务器。请检查你的网络连接后重试。</value>
|
||||
</data>
|
||||
<data name="Update_Error_NotFound" xml:space="preserve">
|
||||
<value>未找到此应用的发布源。</value>
|
||||
</data>
|
||||
<data name="Update_Error_RateLimited" xml:space="preserve">
|
||||
<value>已达到 GitHub 速率限制,请稍后重试。</value>
|
||||
<value>更新服务器繁忙或拒绝了请求,请稍后重试。</value>
|
||||
</data>
|
||||
<data name="Update_Error_ServerError" xml:space="preserve">
|
||||
<value>GitHub 返回了服务器错误,请稍后重试。</value>
|
||||
<value>更新服务器返回了错误,请稍后重试。</value>
|
||||
</data>
|
||||
<data name="Update_Error_NotInstalled" xml:space="preserve">
|
||||
<value>仅在已安装版本的应用中可使用更新功能。</value>
|
||||
@@ -907,8 +907,8 @@
|
||||
<data name="Settings_License" xml:space="preserve">
|
||||
<value>许可证(GPLv3)</value>
|
||||
</data>
|
||||
<data name="Settings_GitHub" xml:space="preserve">
|
||||
<value>GitHub</value>
|
||||
<data name="Settings_SourceCode" xml:space="preserve">
|
||||
<value>源代码</value>
|
||||
</data>
|
||||
<data name="Menu_LogViewer" xml:space="preserve">
|
||||
<value>日志查看器</value>
|
||||
@@ -992,7 +992,7 @@
|
||||
<value>意外错误</value>
|
||||
</data>
|
||||
<data name="Error_Message" xml:space="preserve">
|
||||
<value>出现了问题。你可以复制详细信息,或在 GitHub 上报告此问题。</value>
|
||||
<value>出现了问题。你可以复制详细信息,或将其作为错误报告。</value>
|
||||
</data>
|
||||
<data name="Error_Code" xml:space="preserve">
|
||||
<value>错误代码:</value>
|
||||
@@ -1016,7 +1016,7 @@
|
||||
<value>导出日志(.zip)</value>
|
||||
</data>
|
||||
<data name="ReportBug_OpenIssue" xml:space="preserve">
|
||||
<value>在 GitHub 上创建 issue</value>
|
||||
<value>在 GitLab 上创建 issue</value>
|
||||
</data>
|
||||
<data name="ReportBug_Close" xml:space="preserve">
|
||||
<value>关闭</value>
|
||||
@@ -1263,7 +1263,7 @@
|
||||
<value>使用风险自负。系统级命令可能更改配置或导致数据丢失——在执行有风险的操作前,请备份数据并创建还原点。CommandForge 与 Microsoft 无任何关联。</value>
|
||||
</data>
|
||||
<data name="Legal_PrivacySummary" xml:space="preserve">
|
||||
<value>离线优先。CommandForge 不收集任何个人数据,也没有遥测;唯一的网络连接是 GitHub 更新检查。</value>
|
||||
<value>离线优先。CommandForge 不收集任何个人数据,也没有遥测;唯一的网络连接是更新检查(releases.poli0981.dev)。</value>
|
||||
</data>
|
||||
<data name="Menu_Terms" xml:space="preserve">
|
||||
<value>条款与隐私</value>
|
||||
@@ -2553,7 +2553,7 @@
|
||||
<value>在命令运行时关闭应用前先确认。</value>
|
||||
</data>
|
||||
<data name="Settings_AutoCheckUpdatesDesc" xml:space="preserve">
|
||||
<value>启动应用时在 GitHub 上检查新版本。不会发送任何其他信息。</value>
|
||||
<value>启动应用时在 releases.poli0981.dev 上检查新版本。不会发送任何其他信息。</value>
|
||||
</data>
|
||||
<data name="Settings_LogLevelDesc" xml:space="preserve">
|
||||
<value>写入此电脑上日志文件的详细程度。</value>
|
||||
|
||||
@@ -13,15 +13,22 @@ namespace CommandForge.Desktop.ViewModels;
|
||||
|
||||
/// <summary>
|
||||
/// Drives the Report-a-bug dialog: shows auto-gathered environment, exports logs, and opens a
|
||||
/// prefilled GitHub issue. User-initiated only — nothing is sent automatically (Privacy).
|
||||
/// prefilled issue on the GitLab mirror. User-initiated only — nothing is sent automatically (Privacy).
|
||||
/// </summary>
|
||||
public sealed partial class ReportBugViewModel : ObservableObject
|
||||
{
|
||||
// Browsers and GitHub cap URL length; the body beyond this is left for the user to paste.
|
||||
// Browsers and servers cap URL length; the body beyond this is left for the user to paste.
|
||||
private const int MaxBodyCharsInUrl = 4000;
|
||||
|
||||
/// <summary>The issue form the report opens (its file name under .github/ISSUE_TEMPLATE).</summary>
|
||||
public const string BugReportForm = "bug_report.yml";
|
||||
/// <summary>The issue template the report follows: .gitlab/issue_templates/Bug.md on the GitLab mirror.</summary>
|
||||
public const string BugReportTemplate = "Bug";
|
||||
|
||||
/// <summary>The checklist at the end of the Bug template, left for the reporter to tick.</summary>
|
||||
public static readonly string[] Confirmations =
|
||||
[
|
||||
"- [ ] I'm using the latest release.",
|
||||
"- [ ] This is not a security vulnerability (those go to " + ProductLinks.SecurityEmail + ").",
|
||||
];
|
||||
|
||||
private readonly ILogMaintenance _maintenance;
|
||||
private readonly IDialogService _dialogs;
|
||||
@@ -93,9 +100,9 @@ public sealed partial class ReportBugViewModel : ObservableObject
|
||||
_errorCode));
|
||||
|
||||
/// <summary>
|
||||
/// Pure: the address of a new issue on the Bug report form (.github/ISSUE_TEMPLATE/bug_report.yml),
|
||||
/// its fields filled in by their ids. GitHub ignores a plain <c>body</c> in a repository with
|
||||
/// issue forms, and shows anyone who isn't a collaborator the list of forms instead.
|
||||
/// Pure: the address of a new issue on the GitLab mirror with its title and description filled
|
||||
/// in. The description is the Bug template (.gitlab/issue_templates/Bug.md) with its sections
|
||||
/// answered; GitLab shows it as is (a template picked in the URL would replace it).
|
||||
/// </summary>
|
||||
public static string BuildIssueUrl(string title, string appVersion, string windowsVersion, string? userDescription, string? errorCode)
|
||||
{
|
||||
@@ -104,14 +111,27 @@ public sealed partial class ReportBugViewModel : ObservableObject
|
||||
ArgumentNullException.ThrowIfNull(windowsVersion);
|
||||
(string Field, string Value)[] fields =
|
||||
[
|
||||
("template", BugReportForm),
|
||||
("title", title),
|
||||
("what-happened", TruncateForUrl(BuildWhatHappened(userDescription, errorCode))),
|
||||
("app-version", appVersion),
|
||||
("windows-version", windowsVersion),
|
||||
("logs", "_Attach the exported .zip here. Review its contents first — it may contain command output._"),
|
||||
("issue[title]", title),
|
||||
("issue[description]", BuildIssueBody(appVersion, windowsVersion, userDescription, errorCode)),
|
||||
];
|
||||
return ProductLinks.NewIssue + "?" + string.Join('&', fields.Select(field => field.Field + "=" + Uri.EscapeDataString(field.Value)));
|
||||
return ProductLinks.NewIssue + "?" + string.Join('&', fields.Select(field => Uri.EscapeDataString(field.Field) + "=" + Uri.EscapeDataString(field.Value)));
|
||||
}
|
||||
|
||||
/// <summary>Pure: the Bug template's sections, in its order, with what the app knows filled in.</summary>
|
||||
public static string BuildIssueBody(string appVersion, string windowsVersion, string? userDescription, string? errorCode)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(appVersion);
|
||||
ArgumentNullException.ThrowIfNull(windowsVersion);
|
||||
string[] lines =
|
||||
[
|
||||
"## What happened?", string.Empty, TruncateForUrl(BuildWhatHappened(userDescription, errorCode)), string.Empty,
|
||||
"## Steps to reproduce", string.Empty, "1. ", string.Empty,
|
||||
"## CommandForge version", string.Empty, appVersion, string.Empty,
|
||||
"## Windows version / build", string.Empty, windowsVersion, string.Empty,
|
||||
"## Logs (optional)", string.Empty, "_Attach the exported .zip here. Review its contents first — it may contain command output._", string.Empty,
|
||||
"## Confirmations", string.Empty, .. Confirmations,
|
||||
];
|
||||
return string.Join('\n', lines);
|
||||
}
|
||||
|
||||
/// <summary>Pure: the form's "What happened?" text: the user's words (or a prompt) and a crash's error code.</summary>
|
||||
|
||||
@@ -195,7 +195,7 @@ public sealed partial class SettingsViewModel : ObservableObject
|
||||
[RelayCommand]
|
||||
private async Task CheckNowAsync()
|
||||
{
|
||||
// Only a check that actually reached GitHub counts as "last checked".
|
||||
// Only a check that actually reached the update feed counts as "last checked".
|
||||
if (await _updateDialog.ShowAsync(startedFromStartup: false))
|
||||
{
|
||||
LastCheckedText = DateTime.Now.ToString("g", CultureInfo.CurrentCulture);
|
||||
|
||||
@@ -3,7 +3,7 @@ namespace CommandForge.Desktop.ViewModels;
|
||||
/// <summary>The state of the modal update flow.</summary>
|
||||
public enum UpdateUiState
|
||||
{
|
||||
/// <summary>Contacting GitHub Releases.</summary>
|
||||
/// <summary>Contacting the update feed.</summary>
|
||||
Checking,
|
||||
|
||||
/// <summary>Already on the latest version.</summary>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
<WrapPanel Margin="0,16,0,0">
|
||||
<ui:HyperlinkButton Content="{res:Loc Settings_License}" Click="OnLicenseClick" Margin="0,0,8,4" />
|
||||
<ui:HyperlinkButton Content="{res:Loc Settings_GitHub}" Click="OnGitHubClick" Margin="0,0,8,4" />
|
||||
<ui:HyperlinkButton Content="{res:Loc Settings_SourceCode}" Click="OnSourceCodeClick" Margin="0,0,8,4" />
|
||||
<ui:HyperlinkButton Content="{res:Loc Menu_UserGuide}" Click="OnUserGuideClick" Margin="0,0,8,4" />
|
||||
<ui:HyperlinkButton Content="{res:Loc Menu_Terms}" Click="OnTermsClick" Margin="0,0,8,4" />
|
||||
<ui:HyperlinkButton Content="{res:Loc About_Accessibility}" Click="OnAccessibilityClick" Margin="0,0,8,4" />
|
||||
|
||||
@@ -28,7 +28,7 @@ public partial class AboutView : UserControl
|
||||
|
||||
private void OnLicenseClick(object sender, RoutedEventArgs e) => _shell.TryOpen(ProductLinks.License);
|
||||
|
||||
private void OnGitHubClick(object sender, RoutedEventArgs e) => _shell.TryOpen(ProductLinks.Repository);
|
||||
private void OnSourceCodeClick(object sender, RoutedEventArgs e) => _shell.TryOpen(ProductLinks.Repository);
|
||||
|
||||
private void OnUserGuideClick(object sender, RoutedEventArgs e) => _shell.TryOpen(ProductLinks.UserGuide);
|
||||
|
||||
|
||||
@@ -3,21 +3,22 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
|
||||
xmlns:res="clr-namespace:CommandForge.Desktop.Resources"
|
||||
xmlns:conv="clr-namespace:CommandForge.Desktop.Converters">
|
||||
xmlns:conv="clr-namespace:CommandForge.Desktop.Converters"
|
||||
xmlns:app="clr-namespace:CommandForge.Application;assembly=CommandForge.Application">
|
||||
<UserControl.Resources>
|
||||
<!-- "Read on GitHub: EULA": the link's text, then the document it opens. -->
|
||||
<conv:RowActionNameConverter x:Key="ReadOnGitHubName" LabelKey="LegalGateReadOnGitHub" />
|
||||
<!-- "Read the full text online: EULA": the link's text, then the document it opens. -->
|
||||
<conv:RowActionNameConverter x:Key="ReadFullTextName" LabelKey="LegalGateReadFullText" />
|
||||
</UserControl.Resources>
|
||||
|
||||
<!-- Each document: a short summary and a link to the full text on GitHub (Tag = URL). -->
|
||||
<!-- Each document: a short summary and a link to the full text in the repository (Tag = URL, from ProductLinks). -->
|
||||
<TabControl AutomationProperties.Name="{res:Loc LegalViewer_Title}">
|
||||
<TabItem Header="{res:Loc TabEula}">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto" AutomationProperties.Name="{res:Loc TabEula}">
|
||||
<StackPanel Margin="4,16,4,4">
|
||||
<TextBlock Text="{res:Loc Legal_EulaSummary}" TextWrapping="Wrap" />
|
||||
<ui:HyperlinkButton Content="{res:Loc LegalGateReadOnGitHub}" Margin="-8,12,0,0" Click="OnLinkClick"
|
||||
Tag="https://github.com/poli0981/CommandForge/blob/main/EULA.md"
|
||||
AutomationProperties.Name="{Binding [TabEula], Source={x:Static res:LocalizationManager.Instance}, Converter={StaticResource ReadOnGitHubName}}" />
|
||||
<ui:HyperlinkButton Content="{res:Loc LegalGateReadFullText}" Margin="-8,12,0,0" Click="OnLinkClick"
|
||||
Tag="{x:Static app:ProductLinks.Eula}"
|
||||
AutomationProperties.Name="{Binding [TabEula], Source={x:Static res:LocalizationManager.Instance}, Converter={StaticResource ReadFullTextName}}" />
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</TabItem>
|
||||
@@ -25,9 +26,9 @@
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto" AutomationProperties.Name="{res:Loc TabGpl}">
|
||||
<StackPanel Margin="4,16,4,4">
|
||||
<TextBlock Text="{res:Loc Legal_GplSummary}" TextWrapping="Wrap" />
|
||||
<ui:HyperlinkButton Content="{res:Loc LegalGateReadOnGitHub}" Margin="-8,12,0,0" Click="OnLinkClick"
|
||||
Tag="https://github.com/poli0981/CommandForge/blob/main/LICENSE"
|
||||
AutomationProperties.Name="{Binding [TabGpl], Source={x:Static res:LocalizationManager.Instance}, Converter={StaticResource ReadOnGitHubName}}" />
|
||||
<ui:HyperlinkButton Content="{res:Loc LegalGateReadFullText}" Margin="-8,12,0,0" Click="OnLinkClick"
|
||||
Tag="{x:Static app:ProductLinks.LicenseFile}"
|
||||
AutomationProperties.Name="{Binding [TabGpl], Source={x:Static res:LocalizationManager.Instance}, Converter={StaticResource ReadFullTextName}}" />
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</TabItem>
|
||||
@@ -35,9 +36,9 @@
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto" AutomationProperties.Name="{res:Loc TabDisclaimer}">
|
||||
<StackPanel Margin="4,16,4,4">
|
||||
<TextBlock Text="{res:Loc Legal_DisclaimerSummary}" TextWrapping="Wrap" />
|
||||
<ui:HyperlinkButton Content="{res:Loc LegalGateReadOnGitHub}" Margin="-8,12,0,0" Click="OnLinkClick"
|
||||
Tag="https://github.com/poli0981/CommandForge/blob/main/DISCLAIMER.md"
|
||||
AutomationProperties.Name="{Binding [TabDisclaimer], Source={x:Static res:LocalizationManager.Instance}, Converter={StaticResource ReadOnGitHubName}}" />
|
||||
<ui:HyperlinkButton Content="{res:Loc LegalGateReadFullText}" Margin="-8,12,0,0" Click="OnLinkClick"
|
||||
Tag="{x:Static app:ProductLinks.Disclaimer}"
|
||||
AutomationProperties.Name="{Binding [TabDisclaimer], Source={x:Static res:LocalizationManager.Instance}, Converter={StaticResource ReadFullTextName}}" />
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</TabItem>
|
||||
@@ -45,9 +46,9 @@
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto" AutomationProperties.Name="{res:Loc TabPrivacy}">
|
||||
<StackPanel Margin="4,16,4,4">
|
||||
<TextBlock Text="{res:Loc Legal_PrivacySummary}" TextWrapping="Wrap" />
|
||||
<ui:HyperlinkButton Content="{res:Loc LegalGateReadOnGitHub}" Margin="-8,12,0,0" Click="OnLinkClick"
|
||||
Tag="https://github.com/poli0981/CommandForge/blob/main/PRIVACY.md"
|
||||
AutomationProperties.Name="{Binding [TabPrivacy], Source={x:Static res:LocalizationManager.Instance}, Converter={StaticResource ReadOnGitHubName}}" />
|
||||
<ui:HyperlinkButton Content="{res:Loc LegalGateReadFullText}" Margin="-8,12,0,0" Click="OnLinkClick"
|
||||
Tag="{x:Static app:ProductLinks.Privacy}"
|
||||
AutomationProperties.Name="{Binding [TabPrivacy], Source={x:Static res:LocalizationManager.Instance}, Converter={StaticResource ReadFullTextName}}" />
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</TabItem>
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace CommandForge.Desktop.Views;
|
||||
|
||||
/// <summary>
|
||||
/// The four legal documents (EULA / GPLv3 / Disclaimer / Privacy) as tabs with a summary and a
|
||||
/// link to the full text on GitHub. Reused by the first-run Legal Gate and the in-app Legal Viewer.
|
||||
/// link to the full text in the repository. Reused by the first-run Legal Gate and the in-app Legal Viewer.
|
||||
/// </summary>
|
||||
public partial class LegalDocumentsView : UserControl
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ using Wpf.Ui.Controls;
|
||||
|
||||
namespace CommandForge.Desktop.Views;
|
||||
|
||||
/// <summary>In-window "Report a bug" dialog (environment, export logs, open a prefilled GitHub issue).</summary>
|
||||
/// <summary>In-window "Report a bug" dialog (environment, export logs, open a prefilled issue on the GitLab mirror).</summary>
|
||||
public partial class ReportBugDialog : ContentDialog
|
||||
{
|
||||
private readonly ReportBugViewModel _viewModel;
|
||||
|
||||
@@ -365,7 +365,7 @@
|
||||
</ui:CardControl.Header>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<ui:Button Content="{res:Loc Settings_License}" Command="{Binding OpenLicenseCommand}" Margin="0,0,8,0" />
|
||||
<ui:Button Content="{res:Loc Settings_GitHub}" Command="{Binding OpenRepoCommand}" />
|
||||
<ui:Button Content="{res:Loc Settings_SourceCode}" Command="{Binding OpenRepoCommand}" />
|
||||
</StackPanel>
|
||||
</ui:CardControl>
|
||||
</StackPanel>
|
||||
|
||||
@@ -36,7 +36,8 @@ public sealed partial class AccessibilityDocumentTests
|
||||
[Fact]
|
||||
public void ABarrierHasAFormAndAnAddress()
|
||||
{
|
||||
Assert.Contains("issues/new?template=accessibility.yml", Statement, StringComparison.Ordinal);
|
||||
Assert.Contains(ProductLinks.NewIssue + "?issuable_template=Accessibility", Statement, StringComparison.Ordinal);
|
||||
Assert.True(File.Exists(Path.Combine(Root, ".gitlab", "issue_templates", "Accessibility.md")));
|
||||
Assert.True(File.Exists(Path.Combine(Root, ".github", "ISSUE_TEMPLATE", "accessibility.yml")));
|
||||
Assert.Contains(ProductLinks.AccessibilityEmail, Statement, StringComparison.Ordinal);
|
||||
}
|
||||
|
||||
@@ -49,7 +49,8 @@ public sealed partial class ProcessStartSitesTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("https://github.com/poli0981/CommandForge", true)]
|
||||
[InlineData("https://git.poli0981.dev/poli0981/CommandForge", true)]
|
||||
[InlineData("https://gitlab.com/poli0981/CommandForge/-/issues/new", true)]
|
||||
[InlineData("mailto:security@poli0981.dev", true)]
|
||||
[InlineData("http://example.com", false)]
|
||||
[InlineData("file:///C:/Windows/System32/cmd.exe", false)]
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
using CommandForge.Application;
|
||||
|
||||
namespace CommandForge.Tests;
|
||||
|
||||
/// <summary>
|
||||
/// The project left GitHub (the account is gone): the source is on Gitea, issues on the GitLab
|
||||
/// mirror, the update feed on Cloudflare R2. Nothing the app opens or contacts may point back.
|
||||
/// </summary>
|
||||
public sealed class ProductLinksTests
|
||||
{
|
||||
private static readonly string Root = FindRepositoryRoot();
|
||||
|
||||
[Fact]
|
||||
public void TheUpdateFeedIsTheR2FolderOverHttps()
|
||||
=> Assert.Equal("https://releases.poli0981.dev/commandforge", ProductLinks.UpdateFeed);
|
||||
|
||||
[Theory]
|
||||
[InlineData(ProductLinks.Repository)]
|
||||
[InlineData(ProductLinks.Releases)]
|
||||
[InlineData(ProductLinks.UserGuide)]
|
||||
[InlineData(ProductLinks.AccessibilityStatement)]
|
||||
[InlineData(ProductLinks.Eula)]
|
||||
[InlineData(ProductLinks.LicenseFile)]
|
||||
[InlineData(ProductLinks.Disclaimer)]
|
||||
[InlineData(ProductLinks.Privacy)]
|
||||
public void SourceLinksPointAtGitea(string link)
|
||||
=> Assert.StartsWith("https://git.poli0981.dev/poli0981/CommandForge", link, StringComparison.Ordinal);
|
||||
|
||||
[Fact]
|
||||
public void IssuesGoToTheGitLabMirror()
|
||||
=> Assert.StartsWith("https://gitlab.com/poli0981/CommandForge/-/issues", ProductLinks.NewIssue, StringComparison.Ordinal);
|
||||
|
||||
[Fact]
|
||||
public void NoSourceFileLinksToTheOldGitHubRepository()
|
||||
{
|
||||
var offenders = new[] { "src", "helper" }
|
||||
.SelectMany(folder => Directory.EnumerateFiles(Path.Combine(Root, folder), "*", SearchOption.AllDirectories))
|
||||
.Where(path => !IsBuildOutput(path) && Path.GetExtension(path) is ".cs" or ".xaml" or ".resx" or ".json" or ".csproj" or ".manifest")
|
||||
.Where(path => File.ReadAllText(path).Contains("github.com/poli0981", StringComparison.OrdinalIgnoreCase))
|
||||
.Select(path => Path.GetRelativePath(Root, path))
|
||||
.ToList();
|
||||
|
||||
Assert.True(offenders.Count == 0, "Still linking to GitHub: " + string.Join(", ", offenders));
|
||||
}
|
||||
|
||||
private static bool IsBuildOutput(string path)
|
||||
{
|
||||
var separator = Path.DirectorySeparatorChar;
|
||||
return path.Contains($"{separator}bin{separator}", StringComparison.OrdinalIgnoreCase)
|
||||
|| path.Contains($"{separator}obj{separator}", StringComparison.OrdinalIgnoreCase);
|
||||
}
|
||||
|
||||
private static string FindRepositoryRoot()
|
||||
{
|
||||
for (var directory = new DirectoryInfo(AppContext.BaseDirectory); directory is not null; directory = directory.Parent)
|
||||
{
|
||||
if (File.Exists(Path.Combine(directory.FullName, "CommandForge.slnx")))
|
||||
{
|
||||
return directory.FullName;
|
||||
}
|
||||
}
|
||||
|
||||
throw new InvalidOperationException("Could not find the repository root (CommandForge.slnx) above " + AppContext.BaseDirectory);
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,7 @@ namespace CommandForge.Tests;
|
||||
|
||||
/// <summary>
|
||||
/// Tests the pure bug-report builders: the environment block, the "What happened?" text and the
|
||||
/// address that opens the Bug report issue form with its fields filled in.
|
||||
/// address that opens a new issue on the GitLab mirror with the Bug template answered.
|
||||
/// </summary>
|
||||
public sealed partial class ReportBugTemplateTests
|
||||
{
|
||||
@@ -33,36 +33,40 @@ public sealed partial class ReportBugTemplateTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void IssueUrl_OpensTheBugFormWithItsFieldsFilledIn()
|
||||
public void IssueUrl_OpensANewGitLabIssueWithTitleAndDescription()
|
||||
{
|
||||
var url = ReportBugViewModel.BuildIssueUrl("[Crash 240101-000000-ABCD] ", "2.2.0", "Microsoft Windows 10.0.26100 (X64)", "spaces and #hash & more", "240101-000000-ABCD");
|
||||
var url = ReportBugViewModel.BuildIssueUrl("[Crash 240101-000000-ABCD] ", "2.3.0", "Microsoft Windows 10.0.26100 (X64)", "spaces and #hash & more", "240101-000000-ABCD");
|
||||
var fields = Query(url);
|
||||
|
||||
Assert.StartsWith(ProductLinks.NewIssue + "?template=bug_report.yml&", url, StringComparison.Ordinal);
|
||||
Assert.Equal("[Crash 240101-000000-ABCD] ", fields["title"]);
|
||||
Assert.Equal(ReportBugViewModel.BuildWhatHappened("spaces and #hash & more", "240101-000000-ABCD"), fields["what-happened"]);
|
||||
Assert.Equal("2.2.0", fields["app-version"]);
|
||||
Assert.Equal("Microsoft Windows 10.0.26100 (X64)", fields["windows-version"]);
|
||||
Assert.Contains("exported .zip", fields["logs"], StringComparison.Ordinal);
|
||||
Assert.StartsWith("https://gitlab.com/poli0981/CommandForge/-/issues/new?", url, StringComparison.Ordinal);
|
||||
Assert.Equal<string>(["issue[title]", "issue[description]"], fields.Keys);
|
||||
Assert.Equal("[Crash 240101-000000-ABCD] ", fields["issue[title]"]);
|
||||
|
||||
var body = fields["issue[description]"];
|
||||
Assert.Contains(ReportBugViewModel.BuildWhatHappened("spaces and #hash & more", "240101-000000-ABCD"), body, StringComparison.Ordinal);
|
||||
Assert.Contains("\n2.3.0\n", body, StringComparison.Ordinal);
|
||||
Assert.Contains("\nMicrosoft Windows 10.0.26100 (X64)\n", body, StringComparison.Ordinal);
|
||||
Assert.Contains("exported .zip", body, StringComparison.Ordinal);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void IssueUrl_FillsOnlyFieldsTheFormHas()
|
||||
public void IssueBody_AnswersTheBugTemplateSectionBySection()
|
||||
{
|
||||
var form = File.ReadAllText(Path.Combine(FindRepositoryRoot(), ".github", "ISSUE_TEMPLATE", ReportBugViewModel.BugReportForm));
|
||||
var ids = FieldId().Matches(form).Select(match => match.Groups["id"].Value).ToHashSet(StringComparer.Ordinal);
|
||||
var template = File.ReadAllText(Path.Combine(FindRepositoryRoot(), ".gitlab", "issue_templates", ReportBugViewModel.BugReportTemplate + ".md"));
|
||||
var body = ReportBugViewModel.BuildIssueBody("2.3.0", "Windows", null, null);
|
||||
|
||||
var filled = Query(ReportBugViewModel.BuildIssueUrl("[Bug] ", "2.2.0", "Windows", null, null)).Keys
|
||||
.Where(field => field is not "template" and not "title");
|
||||
|
||||
Assert.All(filled, field => Assert.Contains(field, ids));
|
||||
// The same headings in the same order, and the same checklist, as the template on GitLab.
|
||||
Assert.Equal(Heading().Matches(template).Select(match => match.Value.TrimEnd()), Heading().Matches(body).Select(match => match.Value.TrimEnd()));
|
||||
Assert.Equal(CheckBox().Matches(template).Select(match => match.Value.TrimEnd()), ReportBugViewModel.Confirmations);
|
||||
Assert.All(ReportBugViewModel.Confirmations, line => Assert.Contains(line, body, StringComparison.Ordinal));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void IssueUrl_KeepsALongDescriptionWithinUrlLimits()
|
||||
{
|
||||
var url = ReportBugViewModel.BuildIssueUrl("[Bug] ", "2.2.0", "Windows", new string('x', 20_000), null);
|
||||
Assert.Contains("truncated", Query(url)["what-happened"], StringComparison.Ordinal);
|
||||
var url = ReportBugViewModel.BuildIssueUrl("[Bug] ", "2.3.0", "Windows", new string('x', 20_000), null);
|
||||
Assert.Contains("truncated", Query(url)["issue[description]"], StringComparison.Ordinal);
|
||||
Assert.True(url.Length < 16_000, "URL length " + url.Length);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -75,17 +79,19 @@ public sealed partial class ReportBugTemplateTests
|
||||
|
||||
var url = Assert.Single(shell.Opened);
|
||||
var fields = Query(url);
|
||||
Assert.StartsWith(ProductLinks.NewIssue + "?template=bug_report.yml&", url, StringComparison.Ordinal);
|
||||
Assert.Equal("[Crash 240101-000000-ABCD] ", fields["title"]);
|
||||
Assert.Equal(ReportBugViewModel.BuildWhatHappened("it broke", "240101-000000-ABCD"), fields["what-happened"]);
|
||||
Assert.Contains(fields["app-version"], report.EnvironmentText, StringComparison.Ordinal);
|
||||
Assert.StartsWith(RuntimeInformation.OSDescription, fields["windows-version"], StringComparison.Ordinal);
|
||||
Assert.StartsWith(ProductLinks.NewIssue + "?", url, StringComparison.Ordinal);
|
||||
Assert.Equal("[Crash 240101-000000-ABCD] ", fields["issue[title]"]);
|
||||
var body = fields["issue[description]"];
|
||||
Assert.Contains(ReportBugViewModel.BuildWhatHappened("it broke", "240101-000000-ABCD"), body, StringComparison.Ordinal);
|
||||
Assert.Contains(RuntimeInformation.OSDescription, body, StringComparison.Ordinal);
|
||||
var appVersion = report.EnvironmentText.Split('\n')[0].Replace("App version: ", string.Empty, StringComparison.Ordinal).Trim();
|
||||
Assert.Contains("\n" + appVersion + "\n", body, StringComparison.Ordinal);
|
||||
}
|
||||
|
||||
private static Dictionary<string, string> Query(string url)
|
||||
=> new Uri(url).Query.TrimStart('?').Split('&')
|
||||
.Select(pair => pair.Split('=', 2))
|
||||
.ToDictionary(pair => pair[0], pair => Uri.UnescapeDataString(pair[1]), StringComparer.Ordinal);
|
||||
.ToDictionary(pair => Uri.UnescapeDataString(pair[0]), pair => Uri.UnescapeDataString(pair[1]), StringComparer.Ordinal);
|
||||
|
||||
private static string FindRepositoryRoot()
|
||||
{
|
||||
@@ -100,8 +106,11 @@ public sealed partial class ReportBugTemplateTests
|
||||
throw new InvalidOperationException("Could not find the repository root (CommandForge.slnx) above " + AppContext.BaseDirectory);
|
||||
}
|
||||
|
||||
[GeneratedRegex(@"^\s+id:\s*(?<id>[a-z0-9-]+)\s*$", RegexOptions.Multiline | RegexOptions.CultureInvariant, matchTimeoutMilliseconds: 2000)]
|
||||
private static partial Regex FieldId();
|
||||
[GeneratedRegex(@"^## .+$", RegexOptions.Multiline | RegexOptions.CultureInvariant, matchTimeoutMilliseconds: 2000)]
|
||||
private static partial Regex Heading();
|
||||
|
||||
[GeneratedRegex(@"^- \[ \] .+$", RegexOptions.Multiline | RegexOptions.CultureInvariant, matchTimeoutMilliseconds: 2000)]
|
||||
private static partial Regex CheckBox();
|
||||
|
||||
private sealed class RecordingShell : IShellService
|
||||
{
|
||||
|
||||
@@ -69,7 +69,7 @@ public sealed partial class ResxKeyTests
|
||||
"Settings_ConfirmCaution", "Settings_ConfirmDangerous", "Settings_DangerousLockedTooltip",
|
||||
"Settings_AutoRestorePoint", "Settings_AutoScroll", "Settings_WarnOnCancel",
|
||||
"Settings_AutoCheckUpdates", "Settings_CurrentVersion", "Settings_LastChecked", "Settings_CheckNow",
|
||||
"Settings_NoDataCollected", "Settings_License", "Settings_GitHub",
|
||||
"Settings_NoDataCollected", "Settings_License", "Settings_SourceCode",
|
||||
"Settings_Profiles", "Settings_ExportImport", "Settings_ExportImportHint",
|
||||
"Settings_ExportSettings", "Settings_ImportSettings", "Settings_SavedProfiles", "Settings_ProfilesHint",
|
||||
"Settings_ApplyProfile", "Settings_DeleteProfile", "Settings_SaveCurrentAsProfile",
|
||||
@@ -124,7 +124,7 @@ public sealed partial class ResxKeyTests
|
||||
string[] keys =
|
||||
[
|
||||
"LegalGateTitle", "LegalGateIntro", "LegalGateAgree", "LegalGateContinue", "LegalGateExit",
|
||||
"LegalGateReadOnGitHub", "TabEula", "TabGpl", "TabDisclaimer", "TabPrivacy",
|
||||
"LegalGateReadFullText", "TabEula", "TabGpl", "TabDisclaimer", "TabPrivacy",
|
||||
"Legal_EulaSummary", "Legal_GplSummary", "Legal_DisclaimerSummary", "Legal_PrivacySummary",
|
||||
"LegalViewer_Title",
|
||||
];
|
||||
|
||||
Reference in new issue
Block a user