diff --git a/.github/workflows/dco.yml b/.github/workflows/dco.yml new file mode 100644 index 0000000..7960df3 --- /dev/null +++ b/.github/workflows/dco.yml @@ -0,0 +1,51 @@ +name: DCO + +on: + pull_request: + types: [opened, synchronize, reopened] + +permissions: + contents: read + pull-requests: write + +jobs: + dco: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Check Signed-off-by on all commits + env: + BASE_SHA: ${{ github.event.pull_request.base.sha }} + HEAD_SHA: ${{ github.event.pull_request.head.sha }} + run: | + set -euo pipefail + commits=$(git rev-list --no-merges "$BASE_SHA".."$HEAD_SHA") + missing=0 + for sha in $commits; do + body=$(git log -1 --format='%B' "$sha") + if ! echo "$body" | grep -qE '^Signed-off-by: .+ <.+@.+>'; then + short=$(git rev-parse --short "$sha") + subject=$(git log -1 --format='%s' "$sha") + echo "::error file=::Missing Signed-off-by on commit $short ($subject)" + missing=$((missing + 1)) + fi + done + if [ "$missing" -gt 0 ]; then + echo "" + echo "❌ $missing commit(s) missing Signed-off-by." + echo "" + echo "To fix, rebase with signoff:" + echo " git rebase --signoff origin/${{ github.base_ref }}" + echo " git push --force-with-lease" + echo "" + echo "Or amend the last commit:" + echo " git commit --amend -s --no-edit" + echo "" + echo "See: https://developercertificate.org/" + exit 1 + fi + echo "✅ All commits have Signed-off-by" diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..b44713b --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,63 @@ +# Contributing to Dasher-Windows + +Thank you for your interest in improving Dasher for Windows! This guide covers +the specifics of this repository. For project-wide conventions (code of +conduct, security, RFCs), see the +[organisation CONTRIBUTING](https://github.com/dasher-project/.github/blob/main/CONTRIBUTING.md). + +## Quick start + +```bash +git clone --recurse-submodules https://github.com/dasher-project/Dasher-Windows.git +cd Dasher-Windows +dotnet build src/Dasher.Windows/Dasher.Windows.csproj +``` + +Requirements: + +- **.NET 10 SDK** (preview) +- **Windows 10 18362+** (TargetFramework is `net10.0-windows10.0.18362.0`) +- **Visual Studio 2022** or **Rider** (optional, for IDE support) + +## What lives where + +| Directory | Purpose | +| :-- | :-- | +| `src/Dasher.Windows/` | Main application (Avalonia UI + DasherCore P/Invoke) | +| `src/Dasher.Windows/Views/` | AXAML windows and controls | +| `src/Dasher.Windows/Engine/` | Native bridge (`NativeBridge.cs`), DasherCore interop | +| `src/Dasher.Windows/Services/` | Analytics, updates, platform services | +| `src/Dasher.Windows/Controls/` | Reusable UI controls (settings panel, etc.) | +| `DasherCore/` | **Submodule** — the C++ engine (do not edit here; PR upstream) | + +## Code style + +- C# 13+ features are welcome (target framework is net10.0). +- Enable `enable` — no `null` warnings. +- 4-space indentation; no trailing whitespace. +- Use `var` when the type is obvious from the right-hand side. +- Use file-scoped namespaces. +- AXAML uses `x:Static` for resource lookups and compiled bindings. + +## DasherCore changes + +DasherCore is a git submodule pointing to +[dasher-project/DasherCore](https://github.com/dasher-project/DasherCore). +**Do not modify it inside this repo.** If you need an engine change, open a PR +against DasherCore directly, then bump the submodule pin here once merged. + +## Definition of Done + +- [ ] Builds cleanly (`dotnet build` with zero warnings) +- [ ] Commits are signed off (DCO) — `git commit -s` +- [ ] If you changed a user-visible capability, update the + [feature status matrix](https://dasher.at/status/) (`website` repo: + `src/data/feature-status.json`) — the PR template has a checkbox for this +- [ ] If you changed UX/hardware interaction across platforms, check whether an + [RFC](https://github.com/dasher-project/governance/tree/main/rfcs) is needed + +## Pull request process + +1. Fork and branch from `main`. +2. Open a PR — the org-level PR template will prompt you on parity, RFCs, and + the feature matrix.