Skip to content
Closed
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
22 changes: 16 additions & 6 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,18 +1,28 @@
# 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/
# https://github.com/WordPress/wordpress-develop/blob/trunk/.editorconfig

root = true

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

[*.yml]
indent_style = space
indent_size = 2
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false
# https://github.com/DavidAnson/markdownlint/blob/main/doc/md010.md
# Hard tabs are often rendered inconsistently by different editors and can be harder to work with than spaces.
indent_style = space

[*.php]
indent_size = 4

[*.blade.php]
indent_size = 2
[{*.txt,wp-config-sample.php}]
end_of_line = crlf
30 changes: 3 additions & 27 deletions .github/workflows/composer-lock-diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,8 @@ on:
pull_request:
paths:
- 'composer.lock'

jobs:
composer-diff:
name: Composer Diff
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Required to make it possible to compare with PR base branch

- name: Generate composer diff
id: composer_diff # To reference the output in comment
uses: IonBazan/composer-diff-action@v1

- uses: marocchino/sticky-pull-request-comment@v2
# An empty diff result will break this action.
if: ${{ steps.composer_diff.outputs.composer_diff_exit_code != 0 }}
with:
header: composer-diff # Creates a collapsed comment with the report
message: |
<details>
<summary>Composer package changes</summary>

${{ steps.composer_diff.outputs.composer_diff }}

</details>
uses: yardinternet/workflows/.github/workflows/composer-lock-diff.yml@main
secrets: inherit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Pull Request Workflow
name: Dependabot automerge
on: pull_request

jobs:
Expand Down
20 changes: 3 additions & 17 deletions .github/workflows/format-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,6 @@ on:
- '**.php'

jobs:
php-cs-fixer:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0

- name: Run php-cs-fixer
uses: docker://oskarstark/php-cs-fixer-ga

- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: '(auto): apply php-cs-fixer changes'
push_options: '--force'
env:
GITHUB_TOKEN: ${{ secrets.YARD_BOT_PAT }}
php-cs-fixer:
uses: yardinternet/workflows/.github/workflows/format-php.yml@main
secrets: inherit
20 changes: 0 additions & 20 deletions .github/workflows/labeler.yml

This file was deleted.

15 changes: 3 additions & 12 deletions .github/workflows/markdown-linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,6 @@ on:
- '**.md'

jobs:
lint:
name: Markdown Linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: DavidAnson/markdownlint-cli2-action@v17
with:
globs: |
*.md
config: .markdownlint.yml
phpstan:
uses: yardinternet/workflows/.github/workflows/markdown-linting.yml@main
secrets: inherit
17 changes: 3 additions & 14 deletions .github/workflows/npm-lock-diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,6 @@ on:
- 'package-lock.json'

jobs:
lockfile_changes:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Required to make it possible to compare with PR base branch
- name: NPM Lockfile Changes
uses: rvanvelzen/npm-lockfile-changes@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
php-cs-fixer:
uses: yardinternet/workflows/.github/workflows/npm-lock-diff.yml@main
secrets: inherit
29 changes: 3 additions & 26 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,6 @@ on:
- '.github/workflows/phpstan.yml'

jobs:
phpstan:
name: phpstan
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
tools: composer:v2
coverage: none
env:
COMPOSER_TOKEN: ${{ secrets.YARD_BOT_PAT }}

- name: Install composer dependencies
run: composer install --prefer-dist --no-interaction

- name: Dirty fix for previously defined function
run: sed -i -e 's#function __(#function ____(#' ./vendor/php-stubs/wordpress-stubs/wordpress-stubs.php

- name: Run PHPStan
run: ./vendor/bin/phpstan --error-format=github
phpstan:
uses: yardinternet/workflows/.github/workflows/phpstan.yml@main
secrets: inherit
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
fail-fast: true
matrix:
os: [ubuntu-latest]
php: [8.1, 8.2]
php: [8.1]
laravel: [10.*]
include:
- laravel: 10.*
Expand Down