mirror of https://github.com/theNewDynamic/gohugo-theme-ananke.git

Patrick Kollitsch
yesterday c43eae25528e08a19e9bf4af4d5753ab814a1179
fix: various changes to workspace, testing, linting, etc.
1 files deleted
5 files modified
1 files added
169 ■■■■■ changed files
.github/dependabot.yml 6 ●●●● patch | view | raw | blame | history
.github/workflows/branch-protection.yml 52 ●●●●● patch | view | raw | blame | history
.markdownlint.jsonc 31 ●●●● patch | view | raw | blame | history
.vscode/extensions.json 15 ●●●●● patch | view | raw | blame | history
CONTRIBUTING.md 6 ●●●● patch | view | raw | blame | history
ananke.code-workspace 47 ●●●●● patch | view | raw | blame | history
tests/catalog.yaml 12 ●●●● patch | view | raw | blame | history
.github/dependabot.yml
@@ -17,7 +17,7 @@
      semver-patch-days: 4
    assignees:
      - davidsneighbour
    target-branch: maintenance
    target-branch: development
    open-pull-requests-limit: 999
    pull-request-branch-name:
      separator: /
@@ -38,7 +38,7 @@
      semver-patch-days: 4
    assignees:
      - davidsneighbour
    target-branch: maintenance
    target-branch: development
    open-pull-requests-limit: 999
    pull-request-branch-name:
      separator: /
@@ -56,7 +56,7 @@
      default-days: 7
    assignees:
      - davidsneighbour
    target-branch: maintenance
    target-branch: development
    open-pull-requests-limit: 999
    pull-request-branch-name:
      separator: /
.github/workflows/branch-protection.yml
@@ -9,7 +9,7 @@
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'
@@ -21,53 +21,7 @@
        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
.markdownlint.jsonc
@@ -40,15 +40,8 @@
  },
  // 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": {
@@ -84,26 +77,18 @@
  },
  // 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,
@@ -143,8 +128,6 @@
    // words to ignore when applying letter case.
    //
    // string[] (default: [])
    "ignore": [
      "JavaScript"
    ],
  },
        "ignore": ["JavaScript"]
    }
}
.vscode/extensions.json
File was deleted
CONTRIBUTING.md
@@ -74,7 +74,6 @@
flowchart LR
 feature["feature/*, fix/*, docs/*, refactor/*"] --> development
 development --> main
 maintenance --> main
 main --> development
```
@@ -84,9 +83,8 @@
| 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
@@ -98,8 +96,6 @@
* `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
ananke.code-workspace
New file
@@ -0,0 +1,47 @@
{
    "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"
        ]
    }
}
tests/catalog.yaml
@@ -17,6 +17,14 @@
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