Skip to content

Commit

Permalink
Establish quality standards (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
carstingaxion authored Feb 6, 2024
2 parents 86a4090 + 341c555 commit 6cba1d7
Show file tree
Hide file tree
Showing 50 changed files with 2,378 additions and 369 deletions.
23 changes: 23 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org

# WordPress Coding Standards
# https://make.wordpress.org/core/handbook/coding-standards/

root = true

[*]
charset = utf-8
end_of_line = lf
indent_style = tab
indent_size = 4
insert_final_newline = true
tabSize = 4
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[{*.json,*.yml}]
indent_style = space
indent_size = 2
13 changes: 13 additions & 0 deletions .github/workflows/build-test-measure.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Build, test & measure

on:
workflow_call:
pull_request:
push:
branches:
['main']

jobs:
call-workflow-build-test-measure:
uses: figuren-theater/code-quality/.github/workflows/build-test-measure.yml@main
secrets: inherit
12 changes: 12 additions & 0 deletions .github/workflows/prerelease-changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: 'pre-Release Changelog Update'

on:
workflow_call:
release:
types: [prereleased]

jobs:
call-workflow-update-changelog:
uses: figuren-theater/.github/.github/workflows/prerelease-changelog-update.yml@main
secrets: inherit

19 changes: 19 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Draft or update the next release

on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- main
# pull_request event is required only for autolabeler
pull_request:
# Only following types are handled by the action, but one can default to all as well
types: [opened, reopened, synchronize]
# pull_request_target event is required for autolabeler to support PRs from forks
# pull_request_target:
# types: [opened, reopened, synchronize]

jobs:
call-workflow-release-drafter:
uses: figuren-theater/.github/.github/workflows/release-drafter.yml@main
secrets: inherit
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/build/
/node_modules
/vendor
*.sql
*.tar.gz
*.zip
/wiki
.vscode

# Generated via bin/transform-readme.php
/readme.txt
/.wp-env.override.json

# misc
.DS_Store
Thumbs.db

# is created during composer install,
# when package is tested
# and not running within ft-platform
/wp-content/
28 changes: 28 additions & 0 deletions .phpcs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0"?>
<ruleset name="ft-network-block-patterns">
<description>Coding standards for ft-network-block-patterns</description>

<file>.</file>
<arg name="basepath" value="./"/><!-- Strip the file paths down to the relevant bit -->

<!-- Rules: figuren.theater Coding Standards -->
<rule ref="figurentheater" />

<!-- Allow commented out code because it is used like switches here. -->
<rule ref="Squiz.PHP.CommentedOutCode.Found">
<exclude-pattern>/patterns/*.php</exclude-pattern>
</rule>

<!-- Allow additional text_domains as we're working with codesnippets from 3rd-party themes -->
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="bright-mode"/>
<element value="ft-network-block-patterns"/>
<element value="oaknut"/>
<element value="pendant"/>
<element value="twentytwentytwo"/>
</property>
</properties>
</rule>
</ruleset>
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changelog

All notable changes to this project will be documented in this file.

## [Unreleased](https://github.com/figuren-theater/ft-network-block-patterns/compare/1.0.5...HEAD)



61 changes: 37 additions & 24 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,42 @@
{
"name": "figuren-theater/ft-network-block-patterns",
"description": "Replaces block-patterns taken from themes with customized versions for the figuren.theater WordPress multisite network.",
"homepage": "https://websites.fuer.figuren.theater",
"type": "wordpress-plugin",
"keywords": ["wordpress", "wordpress-plugin", "site-editor", "blocks", "block-pattern", "block-theme"],
"license": "GPL-3.0-or-later",
"authors": [
{
"name": "figuren.theater",
"email": "info@figuren.theater"
},
{
"name": "Carsten Bach",
"email": "mail@carsten-bach.de",
"homepage": "https://carsten-bach.de",
"role": "Developer"
}
],
"support": {
"email": "info@figuren.theater",
"issues": "https://github.com/figuren-theater/ft-network-block-patterns/issues",
"source": "https://github.com/figuren-theater/ft-network-block-patterns"
},
"require": {
"php": ">=7.1",
"johnpbloch/wordpress": "^6.0"
"license": "GPL-3.0+",
"type": "wordpress-plugin",
"keywords": [
"wordpress",
"wordpress-plugin",
"site-editor",
"blocks",
"block-pattern",
"block-theme"
],
"authors": [
{
"name": "figuren.theater",
"email": "info@figuren.theater"
},
{
"name": "Carsten Bach",
"email": "mail@carsten-bach.de",
"homepage": "https://carsten-bach.de",
"role": "Developer"
}
],
"homepage": "https://websites.fuer.figuren.theater",
"support": {
"email": "info@figuren.theater",
"issues": "https://github.com/figuren-theater/ft-network-block-patterns/issues",
"source": "https://github.com/figuren-theater/ft-network-block-patterns"
},
"require-dev": {
"figuren-theater/code-quality": "*"
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true,
"ergebnis/composer-normalize": true,
"phpstan/extension-installer": true
}
}
}
Loading

0 comments on commit 6cba1d7

Please sign in to comment.