-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'WordPress:master' into master
- Loading branch information
Showing
58 changed files
with
29,768 additions
and
3,230 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"extends": [ "plugin:@wordpress/eslint-plugin/es5" ], | ||
"rules": { | ||
"comma-dangle": "off" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
16 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"core": "./wordpress", | ||
"phpVersion": "7.4", | ||
"plugins": [ "." ] | ||
} |
Oops, something went wrong.