Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
185 changes: 91 additions & 94 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,97 +1,94 @@
{
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers/features/go:1": {
"version": "1.24"
},
"ghcr.io/github/features/goproxy:1": {},
"ghcr.io/github/features/go-linter:2": {},
"ghcr.io/devcontainers/features/sshd:1": {
"version": "latest"
},
"ghcr.io/devcontainers/features/node:1": {
"nodeGypDependencies": true,
"version": "lts",
"nvmVersion": "latest"
},
"ghcr.io/devcontainers/features/hugo:1": {
"extended": true,
"version": "latest"
}
},
"onCreateCommand": ".devcontainer/on-create-command.sh",
"postCreateCommand": "./tools/setup",
"containerEnv": {
"GOPROXY": "https://goproxy.githubapp.com/mod,https://proxy.golang.org/,direct",
"GOPRIVATE": "",
"GONOPROXY": "",
"GONOSUMDB": "github.com/github/*"
},
"customizations": {
"vscode": {
"extensions": [
"golang.go",
// Recommended for Hextra theme
"mhutchie.git-graph",
"esbenp.prettier-vscode",
"tamasfe.even-better-toml",
"budparr.language-hugo-vscode",
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"containerUser": "vscode",
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers/features/go:1": {
"version": "1.24"
},
"ghcr.io/github/features/goproxy:1": {},
"ghcr.io/github/features/go-linter:2": {},
"ghcr.io/devcontainers/features/sshd:1": {
"version": "latest"
},
"ghcr.io/devcontainers/features/node:1": {
"nodeGypDependencies": true,
"version": "lts",
"nvmVersion": "latest"
},
"ghcr.io/devcontainers/features/hugo:1": {
"extended": true,
"version": "latest"
}
},
"onCreateCommand": ".devcontainer/on-create-command.sh",
"postCreateCommand": "./tools/setup",
"containerEnv": {
"GOPROXY": "https://goproxy.githubapp.com/mod,https://proxy.golang.org/,direct",
"GOPRIVATE": "",
"GONOPROXY": "",
"GONOSUMDB": "github.com/github/*"
},
"customizations": {
"vscode": {
"extensions": [
"golang.go",
// Recommended for Hextra theme
"mhutchie.git-graph",
"prettier.prettier-vscode",
"tamasfe.even-better-toml",
"budparr.language-hugo-vscode",

// Recommended extensions from https://gohugo.io/tools/editors/#visual-studio-code
// Front Matter CMS: https://marketplace.visualstudio.com/items?itemName=eliostruyf.vscode-front-matter
"eliostruyf.vscode-front-matter",

// Hugo Helper: https://marketplace.visualstudio.com/items?itemName=rusnasonov.vscode-hugo
"rusnasonov.vscode-hugo",

// Hugo Language and Syntax Support: https://marketplace.visualstudio.com/items?itemName=budparr.language-hugo-vscode
"budparr.language-hugo-vscode",

// Hugo Themer: https://marketplace.visualstudio.com/items?itemName=eliostruyf.vscode-hugo-themer
"eliostruyf.vscode-hugo-themer",

// hugofy: https://marketplace.visualstudio.com/items?itemName=akmittal.hugofy
"akmittal.hugofy",

// Hugo Shortcode Syntax Highlighting: https://marketplace.visualstudio.com/items?itemName=kaellarkin.hugo-shortcode-syntax
"kaellarkin.hugo-shortcode-syntax"
],
"settings": {
"go.lintFlags": [
"--config=/workspaces/.golangci.toml",
"--whole-files",
"--new-from-rev=origin/main"
]
}
},
"codespaces": {
"repositories": {
"github/go-linter": {
"permissions": {
"contents": "read",
"packages": "read"
}
},
"github/features": {
"permissions": {
"contents": "read",
"packages": "read"
}
},
"github/*": {
"permissions": {
"contents": "read",
"packages": "read"
}
}
}
}
},
"forwardPorts": [1313],
"portsAttributes": {
"8080": {
"label": "dev-server"
}
}
// Recommended extensions from https://gohugo.io/tools/editors/#visual-studio-code
"eliostruyf.vscode-front-matter",
"rusnasonov.vscode-hugo",
"budparr.language-hugo-vscode",
"eliostruyf.vscode-hugo-themer",
"akmittal.hugofy",
"kaellarkin.hugo-shortcode-syntax"
],
"settings": {
"go.lintFlags": [
"--config=/workspaces/.golangci.toml",
"--whole-files",
"--new-from-rev=origin/main"
],
"editor.defaultFormatter": "prettier.prettier-vscode",
"editor.tabSize": 2,
"editor.insertSpaces": true,
"editor.detectIndentation": false,
"prettier.requireConfig": true,
"files.insertFinalNewline": true,
"files.trimTrailingWhitespace": true
}
},
"codespaces": {
"repositories": {
"github/go-linter": {
"permissions": {
"contents": "read",
"packages": "read"
}
},
"github/features": {
"permissions": {
"contents": "read",
"packages": "read"
}
},
"github/*": {
"permissions": {
"contents": "read",
"packages": "read"
}
}
}
}
},
"forwardPorts": [1313],
"portsAttributes": {
"8080": {
"label": "dev-server"
}
}
}
4 changes: 2 additions & 2 deletions .github/dependabot.yaml → .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
interval: "daily"
labels:
- "CI/CD"
- "dependabot"
Expand All @@ -16,7 +16,7 @@ updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
interval: "daily"
groups:
npm-deps:
patterns:
Expand Down
13 changes: 10 additions & 3 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@
with:
fetch-depth: 0

- uses: actions/setup-node@v6
with:
node-version: lts/*

Check notice

Code scanning / Opengrep OSS

Non-deterministic Node.js version in actions/setup-node Note

Non-deterministic Node.js version pinning detected in actions/setup-node. The node-version uses a loose version specification that may resolve to different Node.js versions across workflow runs, leading to inconsistent builds. Use a semantic version with at least major version (e.g., '20', '20.11', '18.19.1') or specify node-version-file to pin to a specific Node.js version. Loose version specifications like 'lts/*', 'latest', '12.x', or 'nightly' can introduce breaking changes unexpectedly. For more guidance, see JavaScript Dependency Pinning in GitHub Actions. Submit feedback about this rule

- name: Install dependencies
run: npm ci -o

- uses: super-linter/super-linter/slim@502f4fe48a81a392756e173e39a861f8c8efe056 # v8.3.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -84,7 +91,7 @@
# Note: The -o flag is required to install optional
# dependencies that include pre-built binaries for tailwindcss
# when running in a CI environment.
#
#
# See: https://github.com/tailwindlabs/tailwindcss/issues/15806

npm ci -o
Expand Down Expand Up @@ -124,8 +131,8 @@
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v4
with:
path: "./${{ env.SITE_DIR }}"
retention-days: "7"
path: './${{ env.SITE_DIR }}'
retention-days: '7'

- name: Deploy site to GitHub Pages
id: deployment
Expand Down
111 changes: 111 additions & 0 deletions .github/workflows/pr-labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
# PR Labeling Workflow
#
# Purpose: Automatically applies and removes labels on pull requests based on their status
# to improve visibility and workflow management.
#
# Triggers:
# - Pull request converted to draft
# - Pull request marked as ready for review
# - Pull request opened
# - Pull request reopened
# - Pull request closed
#
# How it works:
# - Uses GitHub CLI to modify PR labels based on the event action.
# - Continues execution even if label operations fail (uses `|| true`).
#
# Permissions:
# - pull-requests: write (required to add/remove labels)

name: Label PR
on:
pull_request:
types:
- converted_to_draft
- ready_for_review
- opened
- reopened
- closed

permissions:
pull-requests: write

env:
DRAFT_LABEL: "draft"
READY_LABEL: "ready for review"

jobs:
pr-in-draft-label:
if: github.event.action == 'converted_to_draft'
runs-on: ubuntu-latest
steps:
- name: Add/Remove PR labels based on event type
shell: bash
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number }}
REPO: ${{ github.repository }}
EVENT_ACTION: ${{ github.event.action }}
ADD_LABEL: ${{ env.DRAFT_LABEL }}
REMOVE_LABEL: ${{ env.READY_LABEL }}
run: &update_run |
gh pr edit "$PR_NUMBER" --repo "$REPO" --add-label "$ADD_LABEL" || true
gh pr edit "$PR_NUMBER" --repo "$REPO" --remove-label "$REMOVE_LABEL" || true
Comment on lines +51 to +53
Copy link

Copilot AI Dec 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

YAML anchors (using &update_run and *update_run) are not supported in GitHub Actions workflow files. While valid YAML syntax, GitHub Actions will fail to parse this workflow. Each job needs to have the run commands explicitly defined rather than using YAML anchors and aliases.

Copilot uses AI. Check for mistakes.
echo "Labels updated based on event action: $EVENT_ACTION for PR #$PR_NUMBER" >> "$GITHUB_STEP_SUMMARY"

pr-ready-review-label:
if: github.event.action == 'ready_for_review'
runs-on: ubuntu-latest
steps:
- name: Add/Remove PR labels based on event type
shell: bash
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number }}
REPO: ${{ github.repository }}
EVENT_ACTION: ${{ github.event.action }}
ADD_LABEL: ${{ env.READY_LABEL }}
REMOVE_LABEL: ${{ env.DRAFT_LABEL }}
run: *update_run
Copy link

Copilot AI Dec 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

YAML anchors (using *update_run) are not supported in GitHub Actions workflow files. This reference to the anchor defined on line 51 will cause the workflow to fail parsing. The run commands need to be explicitly defined here.

Copilot uses AI. Check for mistakes.

open-pr-label:
if: github.event.action == 'opened' || github.event.action == 'reopened'
runs-on: ubuntu-latest
steps:
- name: Set labels based on draft status
shell: bash
run: |
if [[ "${{ github.event.pull_request.draft }}" == "true" ]]; then
echo "ADD_LABEL_VALUE=${{ env.DRAFT_LABEL }}" >> $GITHUB_ENV
echo "REMOVE_LABEL_VALUE=${{ env.READY_LABEL }}" >> $GITHUB_ENV
else
echo "ADD_LABEL_VALUE=${{ env.READY_LABEL }}" >> $GITHUB_ENV
echo "REMOVE_LABEL_VALUE=${{ env.DRAFT_LABEL }}" >> $GITHUB_ENV
fi

- name: Add/Remove PR labels based on event type
shell: bash
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number }}
REPO: ${{ github.repository }}
EVENT_ACTION: ${{ github.event.action }}
ADD_LABEL: ${{ env.ADD_LABEL_VALUE }}
REMOVE_LABEL: ${{ env.REMOVE_LABEL_VALUE }}
run: *update_run
Copy link

Copilot AI Dec 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

YAML anchors (using *update_run) are not supported in GitHub Actions workflow files. This reference to the anchor defined on line 51 will cause the workflow to fail parsing. The run commands need to be explicitly defined here.

Copilot uses AI. Check for mistakes.

close-remove-labels:
if: github.event.action == 'closed'
runs-on: ubuntu-latest
steps:
- name: Add/Remove PR labels based on event type
shell: bash
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number }}
REPO: ${{ github.repository }}
EVENT_ACTION: ${{ github.event.action }}
run: |
gh pr edit "$PR_NUMBER" --repo "$REPO" --remove-label "${{ env.DRAFT_LABEL }}" || true
gh pr edit "$PR_NUMBER" --repo "$REPO" --remove-label "${{ env.READY_LABEL }}" || true
echo "Removed labels based on event action: $EVENT_ACTION for PR #$PR_NUMBER" >> "$GITHUB_STEP_SUMMARY"
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,12 @@ Run only functional tests:
tools/test --functional
```

Run linter:

```bash
tools/lint
```

Review test output for errors and address any failures before submitting changes.

For more detailed development instructions, including GitHub Codespaces setup, see the [Contributing Guide](CONTRIBUTING.md).
Expand Down
Loading