fix: various changes to workspace, testing, linting, etc.
1 files deleted
5 files modified
1 files added
| | |
| | | semver-patch-days: 4 |
| | | assignees: |
| | | - davidsneighbour |
| | | target-branch: maintenance |
| | | target-branch: development |
| | | open-pull-requests-limit: 999 |
| | | pull-request-branch-name: |
| | | separator: / |
| | |
| | | semver-patch-days: 4 |
| | | assignees: |
| | | - davidsneighbour |
| | | target-branch: maintenance |
| | | target-branch: development |
| | | open-pull-requests-limit: 999 |
| | | pull-request-branch-name: |
| | | separator: / |
| | |
| | | default-days: 7 |
| | | assignees: |
| | | - davidsneighbour |
| | | target-branch: maintenance |
| | | target-branch: development |
| | | open-pull-requests-limit: 999 |
| | | pull-request-branch-name: |
| | | separator: / |
| | |
| | | |
| | | jobs: |
| | | validate-main-source-branch: |
| | | name: Require staging or maintenance as source branch for main |
| | | name: Require development as source branch for main |
| | | runs-on: ubuntu-latest |
| | | if: github.base_ref == 'main' |
| | | |
| | |
| | | run: | |
| | | set -euo pipefail |
| | | |
| | | if [ "${HEAD_REF}" != "staging" ] && [ "${HEAD_REF}" != "maintenance" ]; then |
| | | echo "::error::Pull requests into main must come from staging or maintenance. Current source branch: ${HEAD_REF}" |
| | | exit 1 |
| | | fi |
| | | |
| | | validate-staging-source-branch: |
| | | name: Require development or maintenance as source branch for staging |
| | | runs-on: ubuntu-latest |
| | | if: github.base_ref == 'staging' |
| | | |
| | | steps: |
| | | - name: Validate source branch |
| | | shell: bash |
| | | env: |
| | | HEAD_REF: ${{ github.head_ref }} |
| | | run: | |
| | | set -euo pipefail |
| | | |
| | | if [ "${HEAD_REF}" != "development" ] && [ "${HEAD_REF}" != "maintenance" ]; then |
| | | echo "::error::Pull requests into staging must come from development or maintenance. Current source branch: ${HEAD_REF}" |
| | | exit 1 |
| | | fi |
| | | |
| | | protect-package-lock: |
| | | name: Block package-lock.json outside maintenance |
| | | runs-on: ubuntu-latest |
| | | if: github.base_ref != 'maintenance' |
| | | |
| | | steps: |
| | | - name: Check out repository |
| | | uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd |
| | | with: |
| | | fetch-depth: 0 |
| | | persist-credentials: false |
| | | |
| | | - name: Fail if package-lock.json changed outside maintenance |
| | | shell: bash |
| | | env: |
| | | BASE_SHA: ${{ github.event.pull_request.base.sha }} |
| | | HEAD_SHA: ${{ github.event.pull_request.head.sha }} |
| | | BASE_REF: ${{ github.base_ref }} |
| | | run: | |
| | | set -euo pipefail |
| | | |
| | | changed_files=$(git diff --name-only "${BASE_SHA}...${HEAD_SHA}") |
| | | |
| | | if echo "${changed_files}" | grep -Fxq "package-lock.json"; then |
| | | echo "::error file=package-lock.json::package-lock.json may only be changed in PRs targeting maintenance. Current target branch: ${BASE_REF}" |
| | | if [ "${HEAD_REF}" != "development" ]; then |
| | | echo "::error::Pull requests into main must come from development. Current source branch: ${HEAD_REF}" |
| | | exit 1 |
| | | fi |
| | |
| | | }, |
| | | // no inline HTML elements, except for the allowed ones. in tables only the explicit allowed ones |
| | | "MD033": { |
| | | "allowed_elements": [ |
| | | "lite-youtube", |
| | | "color-grid", |
| | | "date-diff", |
| | | "kbd" |
| | | ], |
| | | "table_allowed_elements": [ |
| | | "kbd" |
| | | ] |
| | | "allowed_elements": ["lite-youtube", "color-grid", "date-diff", "kbd"], |
| | | "table_allowed_elements": ["kbd"] |
| | | }, |
| | | // use consistent rule markers (`---`) |
| | | "MD035": { |
| | |
| | | }, |
| | | // generic linktexts are prohibited |
| | | "MD059": { |
| | | "prohibited_texts": [ |
| | | "click here", |
| | | "here", |
| | | "link", |
| | | "more" |
| | | ] |
| | | "prohibited_texts": ["click here", "here", "link", "more"] |
| | | }, |
| | | // table style must be compact (single spaces around cell content) |
| | | "MD060": { |
| | | "style": "aligned" |
| | | "style": "compact" |
| | | }, |
| | | // @see https://www.npmjs.com/package/@github/markdownlint-github |
| | | // images should not contain default alternate texts |
| | | "GH001": true, |
| | | // links should not contain generic text ('click here', 'read more', etc.) |
| | | "GH002": { |
| | | "additional_banned_texts": [ |
| | | "Something", |
| | | "Click here" |
| | | ] |
| | | "additional_banned_texts": ["Something", "Click here"] |
| | | }, |
| | | // no empty alt texts for images |
| | | "GH003": true, |
| | |
| | | // words to ignore when applying letter case. |
| | | // |
| | | // string[] (default: []) |
| | | "ignore": [ |
| | | "JavaScript" |
| | | ], |
| | | }, |
| | | "ignore": ["JavaScript"] |
| | | } |
| | | } |
| | |
| | | flowchart LR |
| | | feature["feature/*, fix/*, docs/*, refactor/*"] --> development |
| | | development --> main |
| | | maintenance --> main |
| | | main --> development |
| | | ``` |
| | | |
| | |
| | | |
| | | | Branch | Purpose | Release role | Write policy | Merge | |
| | | | --- | --- | --- | --- | --- | |
| | | | `main` | Stable source of truth | releases | Protected. Only receives reviewed PRs from `staging` or `maintenance`. | Rebase | |
| | | | `main` | Stable source of truth | releases | Protected. Only receives reviewed PRs from `development`. | Rebase | |
| | | | `development` | Active development | pre-releases | Feature, fix, chore, and documentation PRs target this branch. | Squash | |
| | | | `maintenance` | Dependency maintenance | none | Maintainer-only branch for dependency version updates. | Rebase | |
| | | |
| | | ### Branch naming |
| | | |
| | |
| | | * `chore/<topic>` |
| | | * `refactor/<topic>` |
| | | |
| | | Dependency update branches MUST target `maintenance` unless the change is part of an intentional feature branch and does not touch lock files. |
| | | |
| | | After a successful rebase between those branches, push with lease: |
| | | |
| | | ```bash |
| New file |
| | |
| | | { |
| | | "folders": [ |
| | | { |
| | | "path": "." |
| | | }, |
| | | { |
| | | "path": "../documentation" |
| | | }, |
| | | { |
| | | "path": "../template-git-submod" |
| | | }, |
| | | { |
| | | "path": "../template-hugo-mod" |
| | | } |
| | | ], |
| | | "settings": { |
| | | "window.autoDetectColorScheme": false, |
| | | "markdown.extension.tableFormatter.enabled": false, |
| | | "chat.tools.terminal.autoApprove": { |
| | | "git fetch": true, |
| | | "git worktree": true, |
| | | "git add": true, |
| | | "git push": true |
| | | } |
| | | }, |
| | | "extensions": { |
| | | "recommendations": [ |
| | | "ms-vscode.vscode-github-issue-notebooks", |
| | | "github.vscode-pull-request-github", |
| | | "pkief.material-icon-theme", |
| | | "yzhang.markdown-all-in-one", |
| | | "davidanson.vscode-markdownlint", |
| | | "zizmor.zizmor-vscode", |
| | | "redhat.vscode-yaml", |
| | | "streetsidesoftware.code-spell-checker-cspell-bundled-dictionaries", |
| | | "budparr.language-hugo-vscode", |
| | | "jinliming2.vscode-go-template", |
| | | "gohugoio.gotmplfmt", |
| | | "dunstontc.vscode-go-syntax", |
| | | "casualjim.gotemplate", |
| | | "streetsidesoftware.code-spell-checker", |
| | | "streetsidesoftware.code-spell-checker-british-english", |
| | | "gohugoio.gotmplfmt", |
| | | "anthropic.claude-code" |
| | | ] |
| | | } |
| | | } |
| | |
| | | |
| | | shortcodes: |
| | | form-contact: |
| | | tests: ["scripts/test-hugo-quickstart.ts"] # TODO: add a dedicated form-contact test |
| | | tests: [ |
| | | "scripts/test-hugo-quickstart.ts", |
| | | ] # TODO: add a dedicated form-contact test |
| | | page-index: |
| | | tests: ["scripts/test-hugo-quickstart.ts"] # TODO: add a dedicated page-index test |
| | | tests: [ |
| | | "scripts/test-hugo-quickstart.ts", |
| | | ] # TODO: add a dedicated page-index test |
| | | since: |
| | | tests: [ |
| | | "scripts/test-hugo-quickstart.ts", |
| | | ] # TODO: add a dedicated since test |