Skip to content
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
37 changes: 37 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"projectName": ".github",
"projectOwner": "lightspeedwp",
"repoType": "github",
"repoHost": "https://github.com",
"projectDescription": "GitHub Community Health files for LightSpeedWP organization",
"projectWebsite": "https://lightspeedwp.agency",
"license": "GPL-3.0-or-later",
"files": [
"README.md"
],
"imageSize": 100,
"commit": false,
"commitConvention": "conventional",
"contributors": [
{
"login": "lightspeedwp",
"name": "LightSpeedWP",
"avatar_url": "https://avatars.githubusercontent.com/u/13472139?v=4",
"profile": "https://github.com/lightspeedwp",
"contributions": [
"ideas",
"fundingFinding",
"projectManagement",
"business",
"code",
"design",
"doc",
"infra",
"maintenance",
"test"
]
}
],
"contributorsPerLine": 7,
"linkToUsage": true
}
7 changes: 7 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"presets": [
"@babel/preset-env",
"@babel/preset-typescript",
"@babel/preset-react"
]
}
198 changes: 184 additions & 14 deletions .coderabbit.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,186 @@
# yaml-language-server: $schema=[https://coderabbit.ai/integrations/coderabbit-overrides.v2.json](https://coderabbit.ai/integrations/coderabbit-overrides.v2.json)

# yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json
language: 'en-uk'
chat:
auto_reply: true
reviews:
# === Review Workflow Settings ===
status_checks:
required:
- markdownlint
- Run Tests
- ShellCheck
- Changelog
- Release
required_approvals: 2
auto_labels:
enabled: true
rules:
- path: 'scripts/**/*.sh'
label: 'shell'
- path: '**/*.md'
label: 'docs'
- path: 'workflows/**/*.yml'
label: 'ci'
- path: 'tests/**/*.bats'
label: 'test'
- path: 'scripts/**/*.js'
label: 'js'
- path: 'scripts/**/*.py'
label: 'python'
auto_assign:
enabled: true
reviewers:
- 'ashleyshaw'
path_filters:
# === Path Filters (Exclude from Review) ===
- '!build/**'
- '!dist/**'
- '!node_modules/**'
- '!.cache/**'
- '!.DS_Store'
- '!vendor/**'
- '!composer.lock'
- '!package-lock.json'
- '!yarn.lock'
- '!.phpunit.result.cache'
- '!.idea/**'
- '!*.zip'
- '!bin/**'
- '!test-results/**'
- '!playwright-report/**'
- '!blob-report/**'
- '!*.map'
# Allow markdown, config, workflows, and docs to be reviewed
request_changes_workflow: true # Require workflow for requesting changes
high_level_summary: true # Provide high-level summary in reviews
poem: false # Disable poem output in reviews
review_status: true # Show review status in output
collapse_walkthrough: true # Collapse walkthroughs by default
# === Auto Review Settings ===
auto_review:
enabled: true
drafts: false
base_branches:
- 'main'
- 'develop'
- 'feature/*'
- 'fix/*'
- 'update/*'
# === Path-Specific Review Instructions ===
path_instructions:
- path: "**/*.md"
instructions: |
Review the Markdown documentation for:
- Clarity and conciseness of explanations
- Consistent formatting and heading structure
- Proper use of code blocks and inline code
- Correct spelling, grammar, and punctuation
- Accurate and up-to-date technical information
- Useful internal and external links
- Well-organized sections and logical flow

Additional context:
- The repository contains documentation focused on block theme and block plug-in development topics for WordPress and related technologies.
- Please ensure that technical docs are developer-friendly, accurate, and up-to-date.
# 1. Copilot & AI Files
- path: '.github/custom-instructions.md'
instructions: |
Review custom-instructions.md:
- Ensure the file is easy to navigate and up to date with org standards.
- Ensure the file is a dynamic index of all major Copilot files and instructions.
- Validate YAML frontmatter for completeness and accuracy.
- Confirm references to chatmodes.md, prompts.md, agent.md, AGENTS.md, and all **/.github/instructions/*.instructions.md files.
- Check for up-to-date cross-references and clear documentation of Copilot usage.

early_access: true
auto_labels:
enabled: true
- A canonical list of org wide default labels exists in this file "https://github.com/lightspeedwp/.github/blob/develop/.github/labels.yml" https://github.com/lightspeedwp/.github/blob/develop/.github/labeler.yml
- A set of labeler rules exist in this file "https://github.com/lightspeedwp/.github/blob/develop/.github/labeler.yml"
auto_assign:
enabled: true
reviewers:
- 'ashleyshaw'
auto_review:
enabled: true
ignore_title_keywords:
- 'WIP'
- 'DO NOT MERGE'
- 'DRAFT'
drafts: false
base_branches:
- 'main'
- 'develop'
- 'feature/*'

path_instructions:
- path: 'scripts/**/*.sh'
instructions: |
"Review shell scripts for:
- Header comments and metadata
- Error handling (set -euo pipefail)
- ShellCheck compliance
- Test coverage with Bats
- Security best practices
- Documentation in README"
- path: 'scripts/**/*.js'
instructions: |
"Review JS scripts for:
- ESLint compliance
- Modular structure
- Test coverage
- Documentation and usage examples"
- path: 'scripts/**/*.py'
instructions: |
"Review Python scripts for:
- PEP8 compliance
- Test coverage
- Inline documentation and docstrings"
- path: 'workflows/**/*.yml'
instructions: |
"Review workflows for:
- Linting and test enforcement
- Required status checks
- Use of verified Marketplace actions
- Documentation and maintainability"
- path: 'CHANGELOG.md'
instructions: |
"Review changelog for:
- Accurate entries for all changes
- Customer-facing release notes
- Compliance with Keep a Changelog format"
- path: 'README.md'
instructions: |
"Review README for:
- Usage instructions
- Automation feature documentation
- Test coverage and status badges
- Compliance with documentation standards"
- path: 'scripts/product_dev_project.sh'
instructions: |
"Review project automation script for GitHub ProjectV2:
- Ensure script supports all automatable ProjectV2 actions (create project, add fields, add items/issues, link repositories/teams, update project/fields/items/status)
- Validate use of helper functions for each mutation and CLI/GraphQL integration
- Check for modular, maintainable, and well-documented code
- Confirm error handling and logging for automation steps
- Ensure script is tested with Bats and covers edge cases
- Verify script updates and syncs project meta/template files as required
- Confirm alignment with repo governance and automation standards"
- path: 'scripts/**/*.sh'
instructions: |
"Review shell scripts for automation and governance:
- Ensure script header includes metadata (name, description, usage, author, date)
- Validate error handling with set -euo pipefail
- Check for ShellCheck compliance
- Confirm test coverage with Bats
- Review for security best practices (input validation, least privilege)
- Ensure documentation is provided in README or inline comments"
- path: '**/*.md'
instructions: |
"Review markdown files for:
- Clarity and conciseness
- Proper formatting and structure
- Spelling and grammar
- Relevant links and references"
- path: 'workflows/**/*.yml'
instructions: |
"Review CI/CD workflows for:
- Correct triggers and conditions
- Proper job definitions and steps
- Use of secrets and environment variables
- Compliance with best practices and security guidelines"
- path: 'tests/**/*.bats'
instructions: |
"Reviewbats tests for:
- Comprehensive test coverage
- Clear and descriptive test names
- Proper setup and teardown procedures
- Use of assertions and validations"
18 changes: 18 additions & 0 deletions .distignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Exclude from plugin/theme distribution packages
/.git
/.github
/node_modules
/vendor
/tests
/bin
/.vscode
/.DS_Store
/*.zip
/*.tar.gz
/*.log
composer.json
composer.lock
package.json
package-lock.json
pnpm-lock.yaml
*.map
38 changes: 38 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# YAML files
[*.yml]
indent_style = space
indent_size = 2

[*.yaml]
indent_style = space
indent_size = 2
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8

# PHP files - WordPress coding standards use tabs
[*.php]
indent_style = tab
indent_size = 4

# HTML files
[*.html]
indent_style = space
indent_size = 4

# CSS, SCSS, JavaScript, and JSON files
[*.{css,scss,js,json}]
indent_style = space
indent_size = 2

# Markdown files
[*.md]
trim_trailing_whitespace = false
19 changes: 19 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Example .env file for local development and CI
# Do NOT commit secrets to public repositories

# Node.js/CI/CD
NODE_ENV=development
PORT=3000

# WordPress/Database (if relevant)
# DB_HOST=localhost
# DB_USER=your_db_user
# DB_PASSWORD=your_db_password
# DB_NAME=your_db_name

# API Keys (replace with your actual keys, do not commit real secrets)
# API_KEY=your_api_key_here
# GITHUB_TOKEN=your_github_token_here

# Feature flags or custom config
# FEATURE_X_ENABLED=true
18 changes: 18 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Ignore files and directories that should not be formatted by Eslint

# Node modules
node_modules

# Build directories
build
dist

# Log files

# Vendor directories
vendor

# Test directories
coverage
playwright-report
test-results
16 changes: 16 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
root: true,
env: { es2022: true, browser: true, node: true },
parser: '@typescript-eslint/parser',
parserOptions: { sourceType: 'module', ecmaVersion: 'latest' },
plugins: ['@typescript-eslint', 'prettier'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
],
ignorePatterns: ['node_modules/', 'build/', 'dist/'],
rules: {
'prettier/prettier': 'warn'
}
};
22 changes: 22 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"env": {
"node": true,
"es2022": true,
"jest": true
},
"extends": ["eslint:recommended", "plugin:jest/recommended", "plugin:prettier/recommended"],
"plugins": ["jest", "prettier"],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"rules": {
"prettier/prettier": "error",
"no-console": "warn",
"no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
"jest/expect-expect": "error",
"jest/no-disabled-tests": "warn",
"jest/no-focused-tests": "error",
"jest/prefer-to-have-length": "warn"
}
}
13 changes: 13 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Normalize line endings
* text=auto eol=lf

# Treat lock files as text
*.lock text
*.bat text eol=crlf

# Linguist: docs and examples
docs/** linguist-documentation
*.md linguist-documentation

# Zip-friendly export ignore
*.zip export-ignore
Loading