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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# 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
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = tab

[*.{yml,yaml}]
indent_style = space
indent_size = 2
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
build/
vendor/
node_modules/
*.min.js
6 changes: 6 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Code Owners

## <https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners>

* @webdevstudios
* @khleomix
46 changes: 46 additions & 0 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

- The use of sexualized language or imagery and unwelcome sexual attention or advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at contact@webdevstudios.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
83 changes: 83 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# Closes

<!--
REQUIRED. Please do not leave this blank. Use this format to link issue numbers:
[#WDSBT-123](https://app.clickup.com/t/9011385391/WDSBT-123)
-->

## Link to test

<!--
REQUIRED. Please do not leave this blank. Use this format to link to the testing environment:
[Develop](https://wds.wdslab.com/)
-->

## Description

<!--
REQUIRED. Please do not leave this blank.
Example:
1. [#WDSBT-123](https://app.clickup.com/t/9011385391/WDSBT-123) - This PR [adds/removes/fixes/replaces] the [feature/bug/etc].
2. Make sure to add the appropriate labels to this PR.
-->

## Related Tickets & Documents

<!--
Please use this format to link issue numbers: Fixes #WDS-123
-->

## Mobile & Desktop Screenshots/Recordings

<!--
REQUIRED. Please do not leave this blank.
For visual alterations, provide screenshots or recordings for both desktop and mobile. You can utilize Loom for this purpose: https://www.loom.com/screen-recorder
-->

## AI Assistance

- [ ] 🤖 This project was developed with the help of a LLM/AI such as Cursor, Gemini, etc.

## Added to documentation?

- [ ] 📜 README.md
- [ ] 📓 [ClickUp](https://documentationlink.here)
- [ ] 🙅 No documentation needed

## Added tests?

- [ ] 👍 Yes
- [ ] 🙅 No, because they aren't needed
- [ ] 🙋 No, because I need help

## Testing Instructions

<!--
Please include step-by-step instructions on how to test this PR.
Example:
1. Open a post or page.
2. Insert a heading block.
3. Verify that the heading block appears as expected.
-->

-----

## Reviewer's Testing Checklist

<!--
REQUIRED For reviewers to fill in.
-->

As a reviewer, please verify that the relevant testing criteria are fulfilled and confirmed before approving this Pull Request.

- [ ] **Visual Regression Testing:** Ensure that existing functionality is not negatively impacted by the changes.
- [ ] **Cross-Browser Compatibility:** Test on major browsers (Chrome, Firefox, Safari) to ensure compatibility.
- [ ] **Mobile Responsiveness:** Confirm that the changes are responsive and functional on various mobile devices.
- [ ] **Theme Compatibility:** Ensure that the changes do not adversely affect the site's theme and styling.
- [ ] **Linting:** Check that the code passes all linting checks (PHPCS, ESLint, SassLint). Check if PR passes code quality check.
- [ ] **Accessibility Testing:** Validate that the changes comply with accessibility standards. Run `npm run a11y`.
- [ ] **Security Best Practices:** Ensure that the code follows WordPress security best practices. Check if PR passes security check.
- [ ] **Documentation:** Ensure that any new features or changes are appropriately documented in the README.md or Confluence.
- [ ] **Post-Deployment Tasks:** Check if there are any tasks that need to be performed after deployment.

## [optional] Additional Reviewer Notes or Considerations?
88 changes: 88 additions & 0 deletions .github/workflows/assertions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Code Quality

on:
pull_request:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
lint-css:
name: 'Lint: CSS'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm

- name: Install Node dependencies
run: npm ci
env:
CI: true

- name: Detect coding standard violations (stylelint)
run: npm run lint:css

lint-js:
name: 'Lint: JS'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm

- name: Check Node version
run: node -v

- name: Install Node dependencies
run: npm ci
env:
CI: true

- name: Detect coding standard violations (eslint)
run: npm run lint:js

lint-php:
name: 'Lint: PHP'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
coverage: none
tools: cs2pr

- name: Get Composer Cache Directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Configure Composer cache
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-

- name: Install Composer dependencies
run: composer install --prefer-dist --optimize-autoloader --no-progress --no-interaction

- name: Validate composer.json
run: composer --no-interaction validate --no-check-all
45 changes: 45 additions & 0 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Security

on:
pull_request:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
security:
name: 'Security Check'
runs-on: ubuntu-latest

# Ensure the cron job runs only on the main repository, not forks.
if: github.event_name != 'schedule' || (github.event_name == 'schedule' && github.repository_owner == 'webdevstudios')

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Cache Composer dependencies
uses: actions/cache@v3
with:
path: ~/.composer/cache
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-

- name: Install PHP dependencies
run: composer install --no-progress --no-suggest --prefer-dist

- name: Run Security Check
uses: symfonycorp/security-checker-action@v5
with:
lock: ./composer.lock
format: ansi
disable-exit-code: true

- name: Post Security Check Summary
if: always()
run: |
echo "Security check completed. Review the output for any detected vulnerabilities."
31 changes: 30 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,31 @@
# os
*~
.DS_*
.svn/
.cvs/
.hg/
*.bak
*.swp
Thumbs.db

# node
./.env
.env.local
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
node_modules/
package-lock.json

# composer
vendor/

# theme
build/
/blocks/
!assets/blocks/

# tests
pa11y-ci-report/
phpcs-report.txt
3 changes: 3 additions & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
build/
vendor/
node_modules/
12 changes: 6 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

## 1.1.0

* [📦 NEW: Added Spanish translation](https://github.com/robertdevore/pattern-pal/commit/a69be99de236b0ecdb37864d7e5947f0c4f3c79d)
* [📦 NEW: Added French translation](https://github.com/robertdevore/pattern-pal/commit/7e89ec25696aa7edbdde87567d18a010f91fee71)
* [👌 IMPROVE: Updated generator error message to include OpenAI API key message + link to settings page](https://github.com/robertdevore/pattern-pal/commit/784f000c3288a5144530441f980663e54b68eec6)
* [👌 IMPROVE: Updated plugin to redirect to settings page on activation](https://github.com/robertdevore/pattern-pal/commit/f00416507ab2f6f9e5a3d3f7c2fa877c5e94006d)
* [👌 IMPROVE: Updated Plugins page to include a link to the settings page](https://github.com/robertdevore/pattern-pal/commit/7e43c2b29c51481a6a932004796f95762bfe1a1c)
* [👌 IMPROVE: Updated text strings for localization](https://github.com/robertdevore/pattern-pal/commit/6d4e494a98c4d7842c7f40c8bacf5c3d47a91217)
* [📦 NEW: Added Spanish translation](https://github.com/WebDevStudios/pattern-pal/commit/a69be99de236b0ecdb37864d7e5947f0c4f3c79d)
* [📦 NEW: Added French translation](https://github.com/WebDevStudios/pattern-pal/commit/7e89ec25696aa7edbdde87567d18a010f91fee71)
* [👌 IMPROVE: Updated generator error message to include OpenAI API key message + link to settings page](https://github.com/WebDevStudios/pattern-pal/commit/784f000c3288a5144530441f980663e54b68eec6)
* [👌 IMPROVE: Updated plugin to redirect to settings page on activation](https://github.com/WebDevStudios/pattern-pal/commit/f00416507ab2f6f9e5a3d3f7c2fa877c5e94006d)
* [👌 IMPROVE: Updated Plugins page to include a link to the settings page](https://github.com/WebDevStudios/pattern-pal/commit/7e43c2b29c51481a6a932004796f95762bfe1a1c)
* [👌 IMPROVE: Updated text strings for localization](https://github.com/WebDevStudios/pattern-pal/commit/6d4e494a98c4d7842c7f40c8bacf5c3d47a91217)

## 1.0.0

Expand Down
26 changes: 23 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Pattern Pal

**Brought to you by: [Plugin Pal](https://pluginpal.app)**
[![WebDevStudios. Your Success is Our Mission.](https://webdevstudios.com/wp-content/uploads/2024/02/wds-banner.png)](https://webdevstudios.com/contact/)

**Brought to you by: [WebDevStudios](https://webdevstudios.com/)**

---

Expand All @@ -18,7 +20,7 @@

### Manual Installation:

1. Download the latest release from [GitHub](https://github.com/robertdevore/pattern-pal/).
1. Download the latest release from [GitHub](https://github.com/WebDevStudios/pattern-pal/).

2. Upload the `pattern-pal` folder to `/wp-content/plugins/`.

Expand Down Expand Up @@ -56,4 +58,22 @@ Absolutely! You can edit the generated pattern like any other block in Gutenberg

### 4. Does Pattern Pal store my API key securely?

Yes, your API key is stored securely in the WordPress® options table.
Yes, your API key is stored securely in the WordPress® options table.

## Coding Standards

WebDevStudios follows the WordPress Coding Standards.

To view the baseline standards, click the links below.

[CSS Coding Standards](https://developer.wordpress.org/coding-standards/wordpress-coding-standards/css/)
[HTML Coding Standards](https://developer.wordpress.org/coding-standards/wordpress-coding-standards/html/)
[JavaScript Coding Standards](https://developer.wordpress.org/coding-standards/wordpress-coding-standards/javascript/)
[PHP Coding Standards](https://developer.wordpress.org/coding-standards/wordpress-coding-standards/php/)
[Markdown Standards](https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md)

## License

Pattern Pal is licensed under the [GPL-3.0+ License](http://www.gnu.org/licenses/gpl-3.0.txt).

Special thanks to [Robert DeVore](https://github.com/robertdevore/) for the initial creation and maintenance of this plugin.
Loading
Loading