Skip to content

Commit

Permalink
Merge branch 'WordPress:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
CryoutCreations authored Aug 3, 2024
2 parents 98f8893 + e5d6b20 commit b6e7c1c
Show file tree
Hide file tree
Showing 58 changed files with 29,768 additions and 3,230 deletions.
21 changes: 13 additions & 8 deletions .distignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
# Directories
/node_modules/
/tests/
/vendor/
/wordpress/

# Files
.*
/Gruntfile.js
/composer.json
/composer.lock
/docker-compose.yml
/Gruntfile.js
/npm-debug.log
/package.json
/package-lock.json
/npm-debug.log
/docker-compose.yml
/phpcs*
/phpunit*
/readme.md
/phpcs.xml
/phpunit.xml
/tests
/vendor
/node_modules
/SECURITY.md
6 changes: 6 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": [ "plugin:@wordpress/eslint-plugin/es5" ],
"rules": {
"comma-dangle": "off"
}
}
72 changes: 72 additions & 0 deletions .github/ISSUE_TEMPLATE/1-bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: "Bug report"
description: "Report a bug with the Two-Factor plugin for WordPress."
labels: "Bug"
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report! Please fill in as much of the template below as you can. If this is a security issue, please report it in HackerOne instead: https://hackerone.com/wordpress.
- type: textarea
attributes:
label: Describe the bug
description: Please write a clear and concise description of the bug, including what you expect to happen and what is currently happening.
placeholder: |
Feature '...' is not working properly. I expect '...' to happen, but '...' happens instead.
validations:
required: true

- type: textarea
attributes:
label: Steps to Reproduce
description: Please write the steps needed to reproduce the bug.
placeholder: |
1. Go to '...'.
2. Click on '...'.
3. Scroll down to '...'.
4. See error.
validations:
required: true

- type: textarea
attributes:
label: Screenshots, screen recording, code snippet
description: |
If possible, please upload a screenshot or screen recording which demonstrates the bug. You can use LIEcap to create a GIF screen recording: https://www.cockos.com/licecap/
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
For small snippets paste it directly here, or you can use GitHub Gist to share multiple code files: https://gist.github.com
Please ensure the shared code can be used by a developer to reproduce the issue—ideally it can be copied into a local development environment or executed in a browser console to help debug the issue
validations:
required: false

- type: textarea
attributes:
label: Environment information
placeholder: |
- WordPress version and active Theme you are using.
- Browser(s) are you seeing the problem on.
- Device you are using and operating system (e.g. "Desktop with Windows 10", "iPhone with iOS 14", etc.).
validations:
required: false

- type: dropdown
id: existing
attributes:
label: Please confirm that you have searched existing issues in this repository.
description: You can do this by searching https://github.com/WordPress/two-factor/issues and making sure the bug is not related to another plugin.
multiple: true
options:
- 'Yes'
- 'No'
validations:
required: true

- type: dropdown
id: plugins
attributes:
label: Please confirm that you have tested with all plugins deactivated except Two-Factor.
multiple: true
options:
- 'Yes'
- 'No'
validations:
required: true
55 changes: 55 additions & 0 deletions .github/ISSUE_TEMPLATE/2-enhancement.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: "Enhancement"
description: "Suggest an idea for a feature or enhancement to the Two-Factor plugin for WordPress."
labels: "type:enhancement"
body:
- type: markdown
attributes:
value: |
Thank you for suggesting an idea to make things better. Please fill in as much of the template below as you can.
- type: textarea
attributes:
label: Is your enhancement related to a problem? Please describe.
description: Please describe the problem you are trying to solve.
placeholder: |
"I'm always frustrated when ..." or "It is currently difficult to ...".
validations:
required: true

- type: textarea
attributes:
label: Proposed Solution
description: |
Please outline the feature or enhancement that you want and how it addresses any problem identified above.
validations:
required: false

- type: textarea
attributes:
label: Designs
description: |
If applicable, add mockups/screenshots/etc. to help explain your idea.
Tip: You can attach images or videos by clicking this area to highlight it and then dragging files in.
validations:
required: false

- type: textarea
attributes:
label: Describe alternatives you've considered
description: |
Please describe alternative solutions or features you have considered.
placeholder: |
I have also considered `...describe alternative...`, however I feel that my solution described above is better because of `...reason...`.
validations:
required: false

- type: dropdown
id: existing
attributes:
label: Please confirm that you have searched existing issues in this repository.
description: You can do this by searching https://github.com/WordPress/two-factor/issues and making sure the bug is not related to another plugin.
multiple: true
options:
- 'Yes'
- 'No'
validations:
required: true
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: General help request
url: https://wordpress.org/support/plugin/two-factor/
about: For general help requests, create a new topic in the Two-Factor support forum on WordPress.org.
26 changes: 26 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!-- Thanks for contributing to the Two-Factor plugin for WordPress! Filling out this template is required. Any PR that does not include enough information to be reviewed may be closed at a maintainers' discretion. All new code requires documentation and tests to ensure against regressions. -->

## What?
<!-- In a few words, what is the PR actually doing? -->

## Why?
<!-- Why is this PR necessary? What problem is it solving? Reference any existing previous issue(s) or PR(s), but please add a short summary here, too. -->

## How?
<!-- How is your PR addressing the issue at hand? What are the implementation details? -->

## Testing Instructions
<!-- Please provide steps on how to test or validate that the change in this PR works as described. -->

## Screenshots or screencast
<!-- if applicable -->

## Changelog Entry
<!--
Please include a summary for this PR, noting whether this is something being Added / Changed / Deprecated / Removed / Fixed / or Security related. You can replace the sample entries after this comment block with the single changelog entry line for this PR. -->
> Added - New feature.
> Changed - Existing functionality.
> Deprecated - Soon-to-be removed feature.
> Removed - Feature.
> Fixed - Bug fix.
> Security - Vulnerability.
5 changes: 5 additions & 0 deletions .github/SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Reporting Security Issues

The Two Factor team and WordPress community take security bugs seriously. We appreciate your efforts to responsibly disclose your findings, and will make every effort to acknowledge your contributions.

To report a security issue, please visit the [WordPress HackerOne](https://hackerone.com/wordpress) program.
53 changes: 53 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Deploy

# Run deploy only on published releases.
on:
release:
types: [published]

jobs:

deploy:
name: Deploy to WordPress.org
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
cache: 'npm'
node-version-file: '.nvmrc'

- name: Setup PHP and Composer
uses: shivammathur/setup-php@v2
with:
php-version: '5.6'
tools: composer:v2

- name: Install NPM dependencies
run: npm install

- name: Build plugin
run: npm run build

- name: WordPress Plugin Deploy
id: deploy
uses: 10up/action-wordpress-plugin-deploy@stable
with:
generate-zip: true
env:
BUILD_DIR: dist
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}

- name: Upload release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ steps.deploy.outputs.zip-path }}
asset_name: ${{ github.event.repository.name }}.zip
asset_content_type: application/zip
48 changes: 48 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Test

on: [push, pull_request]

jobs:

lint:
name: Lint and Test
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
cache: 'npm'
node-version-file: '.nvmrc'

- name: Setup PHP and Composer
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
tools: composer:v2

- name: Install NPM dependencies
run: npm install

- name: Lint JS
run: npm run lint:js

- name: Lint CSS
run: npm run lint:css

- name: Lint PHP
run: npm run lint:php || true # Ignore for now.

- name: Lint PHP Compatibility
run: composer lint-compat

- name: Start the Docker testing environment
run: npm run env start --xdebug=coverage

- name: Test
run: npm run test

- name: Build
run: npm run build
10 changes: 6 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
.DS_Store
/node_modules
/node_modules/
/npm-debug.log
/vendor
/dist
/tests/logs
/vendor/
/dist/
/tests/logs/
/wordpress/
.phpunit.result.cache
10 changes: 0 additions & 10 deletions .jscsrc

This file was deleted.

1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
16
44 changes: 0 additions & 44 deletions .travis.yml

This file was deleted.

5 changes: 5 additions & 0 deletions .wp-env.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"core": "./wordpress",
"phpVersion": "7.4",
"plugins": [ "." ]
}
Loading

0 comments on commit b6e7c1c

Please sign in to comment.