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
56 changes: 56 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Bug Report
description: >-
A bug report. This should be a client-facing issue that needs to be resolved.
title: 'Bug: '
labels:
- 'type: bug 🐛'
body:
- type: textarea
attributes:
label: Description
description: >-
Please write a brief description of the bug, including what you expected and what actually happened.
validations:
required: true
- type: textarea
attributes:
label: Steps to reproduce
description: >-
Please list the all the steps needed to reproduce the bug in an *isolated* way.
placeholder: >-
1. Go to "..."
2. ...
3. Result show X but should be Y
validations:
required: true
- type: textarea
id: additional-notes
attributes:
label: Additional Notes
description: Include any additional notes, context, considerations.
- type: checkboxes
attributes:
label: Please confirm that you have searched existing issues in the repo.
description: >-
You can do this by searching
https://github.com/rtCamp/plugin-skeleton-d/issues and making sure the
bug is not related to another plugin.
options:
- label: 'Yes'
required: true
- type: textarea
id: site-health
attributes:
label: Site Health Info
description: Please include the output of the Site Health Info page, by going to your WordPress `Dashboard > Tools > Site Health > Info`, clicking `Copy site info to clipboard`, and pasting the output here.
value: |
<details>
<summary>Site Health Info</summary>
<!-- Please leave one blank line below for enabling the code block rendering. -->

```
PASTE SITE HEALTH INFO HERE
```
</details>
validations:
required: true
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
blank_issues_enabled: true
contact_links:
- name: 📚 Documentation
url: https://github.com/rtCamp/plugin-skeleton-d/tree/main/docs
about: Check the documentation before opening an issue
- name: 💬 Discussions
url: https://github.com/rtCamp/plugin-skeleton-d/discussions
about: Ask questions and discuss ideas
- name: 🔒 Security Issue
url: https://github.com/rtCamp/plugin-skeleton-d/security/policy
about: Report security vulnerabilities privately
41 changes: 41 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Feature request
description: Suggest an idea for Plugin Skeleton D
title: 'Feature: '
body:
- type: markdown
attributes:
value: >-
Thank you for taking the time to submit a feature request.


Please make sure to search the repo for [existing feature
requests](https://github.com/rtCamp/plugin-skeleton-d/issues?q=is%3Aopen+is%3Aissue)
before creating a new one.
- type: textarea
attributes:
label: What problem does this address?
description: >-
Please describe the problem you are trying to solve, including why you
think this is a problem.
placeholder: I'm always frustrated when [...]
validations:
required: true
- type: textarea
attributes:
label: What is your proposed solution?
description: >-
Please provide a clear and concise description of your suggested
solution.
placeholder: What I'd like to see happen is [...]
validations:
required: true
- type: textarea
attributes:
label: What alternatives have you considered?
description: >-
Please list any alternatives you have considered, and why you think your
solution is better.
- type: textarea
attributes:
label: Additional Context
description: Add any other context or screenshots about the feature request here.
47 changes: 47 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<!--
Thanks for taking the time to submit a Pull Request.
Please make sure to review the Contribution Guidelines before submitting your PR
https://github.com/rtCamp/plugin-skeleton-d/blob/main/docs/CONTRIBUTING.md
-->

## What

<!-- In a few words, what does this PR actually change -->

## Why

<!-- Why is this PR necessary? Please any existing previous issue(s) or PR(s) and include a short summary here, too. -->

### Related Issue(s):

<!-- E.g.
- Fixes | Closes | Part of #456
-->

## How

<!-- How does your PR address the issue at hand? What are the implementation details? Please be specific. -->

## Testing Instructions

<!-- Please include step by step instructions on how to test this PR. -->
<!-- 1. Open a Post or Page. -->
<!-- 2. Insert a Heading Block. -->
<!-- 3. etc. -->

## Screenshots

<!-- Include relevant screenshots proving the PR works as intended. -->

## Additional Info

<!-- Please include any relevant logs, error output, etc -->

## Checklist

- [ ] I have read the [Contribution Guidelines](../docs/CONTRIBUTING.md).
- [ ] My PR title is descriptive and follows the [conventional commit message format](https://www.conventionalcommits.org/en/v1.0.0/).
- [ ] My code passes all lints (PHPCS, PHPStan, ESLint, etc.).
- [ ] My code has [detailed inline documentation](https://developer.wordpress.org/coding-standards/inline-documentation-standards/php/).
- [ ] My code has tests that cover the changes I made.
- [ ] I have updated the project documentation as needed.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ jobs:
- 'composer.*'
phpcs:
- '.phpcs.xml.dist'
- '.github/reusable-phpcs.yml'
- '.github/workflows/reusable-phpcs.yml'
phpstan:
- 'phpstan.neon.dist'
- '.github/reusable-phpstan.yml'
- '.github/workflows/reusable-phpstan.yml'
phpunit:
- 'tests/**/*.php'
- 'phpunit.xml.dist'
- '.github/reusable-phpunit.yml'
- '.github/workflows/reusable-phpunit.yml'
- 'package*.json'
js:
- '**.cjs'
Expand All @@ -79,7 +79,7 @@ jobs:
- '.stylelintrc*'
e2e:
- 'tests/e2e/**/*'
- '.github/reusable-e2e.yml'
- '.github/workflows/reusable-e2e.yml'
jest:
- 'tests/js/**/*'
- 'src/**/__tests__/**/*'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
- '.github/workflows/copilot-setup-steps.yml'
pull_request:
paths:
- .github/workflows/copilot-setup-steps.yml
- '.github/workflows/copilot-setup-steps.yml'

permissions:
contents: read
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pr-title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ concurrency:

permissions:
pull-requests: write
statuses: write

jobs:
run:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/reusable-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
coverage: none

- name: Install Composer dependencies
uses: ramsey/composer-install@3cf229dc2919194e9e36783941438d17239e8520 # v3.1.1
uses: ramsey/composer-install@a35c6ebd3d08125aaf8852dff361e686a1a67947 # v3.2.0

- name: Setup Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
Expand All @@ -49,7 +49,7 @@ jobs:
with:
timeout_minutes: 10
max_attempts: 3
command: npm run wp-env start
command: WP_ENV_PORT=8889 WP_ENV_TESTS_PORT=8891 npm run wp-env:test start

- name: Run E2E tests
run: npm run test:e2e
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/reusable-phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
coverage: ${{ inputs.coverage && 'xdebug' || 'none' }}

- name: Install Composer dependencies
uses: ramsey/composer-install@3cf229dc2919194e9e36783941438d17239e8520 # v3.1.1
uses: ramsey/composer-install@a35c6ebd3d08125aaf8852dff361e686a1a67947 # v3.2.0

- name: Setup Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
Expand All @@ -74,15 +74,15 @@ jobs:
max_attempts: 3
command: |
if [ "${{ inputs.coverage }}" == "true" ]; then
npm run wp-env start -- --xdebug=coverage
npm run wp-env:test start -- --xdebug=coverage
else
npm run wp-env start
npm run wp-env:test start
fi

- name: Log versions
run: |
npm run wp-env -- run cli php -- -v
npm run wp-env -- run cli wp core version
npm run wp-env:test -- run cli php -- -v
npm run wp-env:test -- run cli wp core version

- name: Run PHPUnit tests${{ inputs.coverage && ' with coverage report' || '' }}
run: npm run test:php ${{ !inputs.coverage && '-- --no-coverage' || '' }}
Expand Down
10 changes: 9 additions & 1 deletion .stylelint.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
/** @type {import('stylelint').Config} */
module.exports = {
extends: '@wordpress/stylelint-config/scss',
ignoreFiles: [ '**/*.js', '**/*.json', '**/*.php', '**/*.svg' ],
ignoreFiles: [
'**/*.js',
'**/*.json',
'**/*.jsx',
'**/*.php',
'**/*.svg',
'**/*.ts',
'**/*.tsx',
],
rules: {},
};
27 changes: 6 additions & 21 deletions .wp-env.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,12 @@
{
"$schema": "https://schemas.wp.org/trunk/wp-env.json",
"core": null,
"testsEnvironment": false,
"plugins": [ "." ],
"env": {
"development": {
"config": {
"WP_DEVELOPMENT_MODE": "plugin",
"WP_ENVIRONMENT_TYPE": "development",
"WP_DEBUG": true,
"WP_DEBUG_LOG": "/var/www/html/wp-content/plugins/plugin-skeleton-d/tests/_output/debug.log"
}
},
"tests": {
"config": {
"WP_DEBUG": true,
"FS_METHOD": "direct"
},
"mappings": {
"/wp-content/plugins/plugin-skeleton-d": "."
}
}
},
"lifecycleScripts": {
"afterStart": "wp-env run cli wp rewrite structure /%postname%/ --hard"
"config": {
"WP_DEVELOPMENT_MODE": "plugin",
"WP_ENVIRONMENT_TYPE": "development",
"WP_DEBUG": true,
"WP_DEBUG_LOG": "/var/www/html/wp-content/plugins/plugin-skeleton-d/tests/_output/debug.log"
}
}
15 changes: 15 additions & 0 deletions .wp-env.test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"$schema": "https://schemas.wp.org/trunk/wp-env.json",
"core": null,
"port": 8889,
"testsEnvironment": false,
"plugins": [ "." ],
"config": {
"FS_METHOD": "direct",
"WP_DEBUG": true,
"WP_DEBUG_LOG": "/var/www/html/wp-content/plugins/plugin-skeleton-d/tests/_output/debug-test.log"
},
"mappings": {
"wp-content/plugins/plugin-skeleton-d": "."
}
}
2 changes: 1 addition & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading