Skip to content

Commit

Permalink
Merge branch 'develop' into trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
iamdharmesh committed Apr 13, 2022
2 parents 259f2f8 + 0ea6ee0 commit 1913336
Show file tree
Hide file tree
Showing 50 changed files with 4,152 additions and 4,332 deletions.
2 changes: 1 addition & 1 deletion .distignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ phpunit.xml
README.md
webpack.config.js
webpack.gutenberg.config.js
wpacceptance.json
.wp-env.json
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ assets
dist
node_modules
vendor
tests
54 changes: 54 additions & 0 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: E2E Tests

on:
push:
branches:
- develop
- trunk
pull_request:
branches:
- develop

jobs:
cypress:
runs-on: ubuntu-latest

strategy:
matrix:
core:
- { name: 'WP latest', version: 'latest' }
- { name: 'WP trunk', version: 'WordPress/WordPress#master' }
- { name: 'WP minimum', version: 'WordPress/WordPress#5.2' }

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install dependencies
run: npm i && npm i -g [email protected]

- name: Build asset
run: npm run build

- name: Add dependencies
run: composer install -o --no-dev --ignore-platform-reqs

- name: Set the core version
run: ./tests/bin/set-core-version.js ${{ matrix.core.version }}

- name: Set up WP environment
run: npm run env:start

- name: Test
run: cypress run --config-file tests/cypress/config.json --env TWITTER_API_KEY=${{ secrets.TWITTER_API_KEY }},TWITTER_API_SECRET=${{ secrets.TWITTER_API_SECRET }},TWITTER_ACCESS_TOKEN=${{ secrets.TWITTER_ACCESS_TOKEN }},TWITTER_ACCESS_SECRET=${{ secrets.TWITTER_ACCESS_SECRET }}

- name: Upload artifacts
uses: actions/upload-artifact@v2
if: failure()
with:
name: cypress-artifact-autoshare-for-twitter
retention-days: 2
path: |
${{ github.workspace }}/tests/cypress/screenshots/
${{ github.workspace }}/tests/cypress/videos/
${{ github.workspace }}/tests/cypress/logs/
24 changes: 24 additions & 0 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: ESLint

on:
push:
branches:
- develop
- trunk
pull_request:
branches:
- develop

jobs:
eslint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: install node v12
uses: actions/setup-node@v1
with:
node-version: 12
- name: npm install
run: npm install
- name: Run eslint
run: npm run lint
35 changes: 35 additions & 0 deletions .github/workflows/php-compatibility.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: PHP Compatibility

on:
push:
branches:
- develop
- trunk
pull_request:
branches:
- develop

jobs:
php_compatibility:
name: PHP minimum 7.2
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set PHP version
uses: shivammathur/setup-php@v2
with:
php-version: 7.2
tools: composer:v2
coverage: none

- name: Remove non-production dependencies
run: rm composer.lock && composer remove --dev phpunit/phpunit yoast/phpunit-polyfills

- name: Install dependencies
run: composer install

- name: Run PHP Compatibility
run: vendor/bin/phpcs autoshare-for-twitter.php includes/ --standard=PHPCompatibilityWP --extensions=php --runtime-set testVersion 7.2-
31 changes: 31 additions & 0 deletions .github/workflows/phpcs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: PHPCS

on:
push:
branches:
- develop
- trunk
pull_request:
branches:
- develop

jobs:
phpcs:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set PHP version
uses: shivammathur/setup-php@v2
with:
php-version: '7.3'
tools: composer:v2
coverage: none

- name: Install dependencies
run: composer install

- name: Run PHPCS
run: vendor/bin/phpcs autoshare-for-twitter.php includes/ --extensions=php -s
39 changes: 39 additions & 0 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: PHPUnit

on:
push:
branches:
- develop
- trunk
pull_request:
branches:
- develop

jobs:
phpunit:
runs-on: ubuntu-latest
services:
mysql:
image: mariadb:10.4
env:
MYSQL_ROOT_PASSWORD: root
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=10s --health-retries=10
strategy:
fail-fast: false
matrix:
php-versions: ['7.3', '8.0']

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set PHP version
uses: shivammathur/setup-php@v1
with:
php-version: ${{ matrix.php-versions }}
coverage: none
extensions: mysql, imagick

- name: Run PHPUnit
run: ./bin/test.sh
62 changes: 0 additions & 62 deletions .github/workflows/test.yml

This file was deleted.

4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@ node_modules
screenshots
tests/coverage
vendor

tests/cypress/downloads
tests/cypress/screenshots
tests/cypress/videos
13 changes: 13 additions & 0 deletions .wp-env.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"plugins": [
"https://downloads.wordpress.org/plugin/classic-editor.1.6.1.zip",
"."
],
"env": {
"tests": {
"mappings": {
"wp-cli.yml": "./tests/bin/wp-cli.yml"
}
}
}
}
29 changes: 25 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,43 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased] - TBD

## [1.1.0] - 2022-04-13
### Added
- Colored icons to represent autoshare status (props [@linawiezkowiak](https://github.com/linawiezkowiak), [@oszkarnagy](https://github.com/oszkarnagy), [@Sidsector9](https://github.com/Sidsector9), [@dinhtungdu](https://github.com/dinhtungdu) via [#142](https://github.com/10up/autoshare-for-twitter/pull/142)).
- Sample copy for example responses (props [@iamdharmesh](https://github.com/iamdharmesh), [@Sidsector9](https://github.com/Sidsector9), [@jeffpaul](https://github.com/jeffpaul) via [#149](https://github.com/10up/autoshare-for-twitter/pull/149)).
- PHP 8 compatibility (props [@Sidsector9](https://github.com/Sidsector9), [@faisal-alvi](https://github.com/faisal-alvi) via [#144](https://github.com/10up/autoshare-for-twitter/pull/144)).
- E2E Tests with Cypress (props [@thrijith](https://github.com/thrijith), [@iamdharmesh](https://github.com/iamdharmesh), [@dinhtungdu](https://github.com/dinhtungdu), [@jeffpaul](https://github.com/jeffpaul) via [#145](https://github.com/10up/autoshare-for-twitter/pull/145)).

### Changed
- Update dependency `abraham/twitteroauth` from 1.2.0 to 2.0.0 to ensure PHP 8.0 support (props [@Sidsector9](https://github.com/Sidsector9), [@faisal-alvi](https://github.com/faisal-alvi) via [#144](https://github.com/10up/autoshare-for-twitter/pull/144)).
- App setup instructions for getting API keys and tokens (props [@iamdharmesh](https://github.com/iamdharmesh), [@Sidsector9](https://github.com/Sidsector9), [@jeffpaul](https://github.com/jeffpaul) via [#149](https://github.com/10up/autoshare-for-twitter/pull/149)).
- Bump WordPress version "tested up to" 5.9 (props [@iamdharmesh](https://github.com/iamdharmesh), [@Sidsector9](https://github.com/Sidsector9), [@sudip-10up](https://github.com/sudip-10up) via [#151](https://github.com/10up/autoshare-for-twitter/pull/151)).

### Fixed
- Warning thrown on activating plugin for the first time (props [@Sidsector9](https://github.com/Sidsector9), [@dinhtungdu](https://github.com/dinhtungdu) via [#138](https://github.com/10up/autoshare-for-twitter/pull/138)).
- CI pipeline failures (props [@dkotter](https://github.com/dkotter), [@iamdharmesh](https://github.com/iamdharmesh), [@Sidsector9](https://github.com/Sidsector9) via [#147](https://github.com/10up/autoshare-for-twitter/pull/147)).
### Security
- Bump ajv from 6.10.2 to 6.12.6 (props [@dependabot](https://github.com/apps/dependabot) via [#141](https://github.com/10up/autoshare-for-twitter/pull/141)).
- Bump tar from 4.4.8 to 4.4.19 (props [@dependabot](https://github.com/apps/dependabot) via [#143](https://github.com/10up/autoshare-for-twitter/pull/143)).
- Bump ini from 1.3.5 to 1.3.8 (props [@dependabot](https://github.com/apps/dependabot) via [#152](https://github.com/10up/autoshare-for-twitter/pull/152)).

## [1.0.6] - 2020-09-19
- Note: this was a hotfix release to fix an issue with deploys to WordPress.org.

## [1.0.5] - 2021-09-15
## Added
### Added
- Tweeted status column to All Posts table list view (props [@thrijith](https://github.com/thrijith), [@dinhtungdu](https://github.com/dinhtungdu), [@linawiezkowiak](https://github.com/linawiezkowiak), [@oszkarnagy](https://github.com/oszkarnagy), [@jeffpaul](https://github.com/jeffpaul/) via [#121](https://github.com/10up/autoshare-for-twitter/pull/121)).

## Changed
### Changed
- Bump WordPress version "tested up to" 5.8 (props [@thrijith](https://github.com/thrijith), [@barneyjeffries](https://github.com/barneyjeffries), [@jeffpaul](https://github.com/jeffpaul/) via [#126](https://github.com/10up/autoshare-for-twitter/pull/126)).
- WP Snapshot for auotmated testing to WP 5.6 (props [@dinhtungdu](https://github.com/dinhtungdu), [@jeffpaul](https://github.com/jeffpaul/) via [#107](https://github.com/10up/autoshare-for-twitter/pull/107)).
- Update dependency `abraham/twitteroauth` from ^0.7.4 to 1.2.0 to ensure PHP 7.4 support and WordPress VIP Go compatability (props [@thrijith](https://github.com/thrijith), [@dinhtungdu](https://github.com/dinhtungdu), [@rickalee](https://github.com/rickalee) via [#122](https://github.com/10up/autoshare-for-twitter/pull/122)).
- Update PHPUnit test cases to include new functions (props [@thrijith](https://github.com/thrijith) via [#124](https://github.com/10up/autoshare-for-twitter/pull/124)).

## Fixed
### Fixed
- Ensure that special characters are properly encoded (props [@dinhtungdu](https://github.com/dinhtungdu), [@rickalee](https://github.com/rickalee) via [#116](https://github.com/10up/autoshare-for-twitter/pull/116)).

## Security
### Security
- Bump `lodash` from 4.17.15 to 4.17.21 (props [@dependabot](https://github.com/apps/dependabot) via [#108](https://github.com/10up/autoshare-for-twitter/pull/108), [#130](https://github.com/10up/autoshare-for-twitter/pull/130)).
- Bump `elliptic` from 6.5.1 to 6.5.4 (props [@dependabot](https://github.com/apps/dependabot) via [#109](https://github.com/10up/autoshare-for-twitter/pull/109), [#123](https://github.com/10up/autoshare-for-twitter/pull/123)).
- Bump `yargs-parser` from 13.1.1 to 13.1.2 (props [@dependabot](https://github.com/apps/dependabot) via [#111](https://github.com/10up/autoshare-for-twitter/pull/111)).
Expand Down Expand Up @@ -88,6 +108,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Initial closed source release (props [@scottlee](https://github.com/scottlee/)).

[Unreleased]: https://github.com/10up/autoshare-for-twitter/compare/trunk...develop
[1.1.0]: https://github.com/10up/autoshare-for-twitter/compare/1.0.6...1.1.0
[1.0.6]: https://github.com/10up/autoshare-for-twitter/compare/1.0.5...1.0.6
[1.0.5]: https://github.com/10up/autoshare-for-twitter/compare/1.0.4...1.0.5
[1.0.4]: https://github.com/10up/autoshare-for-twitter/compare/1.0.3...1.0.4
Expand Down
4 changes: 2 additions & 2 deletions CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ The following acknowledges the Maintainers for this repository, those who have C

The following individuals are responsible for curating the list of issues, responding to pull requests, and ensuring regular releases happen.

[John Watkins (@johnwatkins0)](https://github.com/johnwatkins0), [Jeffrey Paul (@jeffpaul)](https://github.com/jeffpaul).
[Jeffrey Paul (@jeffpaul)](https://github.com/jeffpaul), [Dharmesh Patel (@iamdharmesh)](https://github.com/iamdharmesh).

## Contributors

Thank you to all the people who have already contributed to this repository via bug reports, code, design, ideas, project management, translation, testing, etc.

[Adam Silverstein (@adamsilverstein)](https://github.com/adamsilverstein), [John Watkins (@johnwatkins0)](https://github.com/johnwatkins0), [Scott Lee (@scottlee)](https://github.com/scottlee), [Jeffrey Paul (@jeffpaul)](https://github.com/jeffpaul), [Stephanie Campbell (@sncampbell)](https://github.com/sncampbell), [Ryan Welcher (@ryanwelcher)](https://github.com/ryanwelcher), [Ricky Lee Whittemore (@rickalee)](https://github.com/rickalee), [Tung Du (@dinhtungdu)](https://github.com/dinhtungdu), [Lina Wiezkowiak (@linawiezkowiak)](https://github.com/linawiezkowiak), [Oszkar Nagy (@oszkarnagy)](https://github.com/oszkarnagy), [Helen Hou-Sandi (@helen)](https://github.com/helen), [Thrijith Thankachan (@thrijith)](https://github.com/thrijith), [Barney Jeffries (@barneyjeffries)](https://github.com/barneyjeffries).
[Adam Silverstein (@adamsilverstein)](https://github.com/adamsilverstein), [John Watkins (@johnwatkins0)](https://github.com/johnwatkins0), [Scott Lee (@scottlee)](https://github.com/scottlee), [Jeffrey Paul (@jeffpaul)](https://github.com/jeffpaul), [Stephanie Campbell (@sncampbell)](https://github.com/sncampbell), [Ryan Welcher (@ryanwelcher)](https://github.com/ryanwelcher), [Ricky Lee Whittemore (@rickalee)](https://github.com/rickalee), [Tung Du (@dinhtungdu)](https://github.com/dinhtungdu), [Lina Wiezkowiak (@linawiezkowiak)](https://github.com/linawiezkowiak), [Oszkar Nagy (@oszkarnagy)](https://github.com/oszkarnagy), [Helen Hou-Sandi (@helen)](https://github.com/helen), [Thrijith Thankachan (@thrijith)](https://github.com/thrijith), [Barney Jeffries (@barneyjeffries)](https://github.com/barneyjeffries), [Darin Kotter (@dkotter)](https://github.com/dkotter), [Siddharth Thevaril (@Sidsector9)](https://github.com/Sidsector9), [Dharmesh Patel (@iamdharmesh)](https://github.com/iamdharmesh), [Faisal Alvi (@faisal-alvi)](https://github.com/faisal-alvi), [@sudip-10up](https://github.com/sudip-10up).

## Libraries

Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@

> Automatically tweets the post title or custom message and a link to the post.
[![Support Level](https://img.shields.io/badge/support-active-green.svg)](#support-level) [![Release Version](https://img.shields.io/github/release/10up/autoshare-for-twitter.svg)](https://github.com/10up/autoshare-for-twitter/releases/latest) ![WordPress tested up to version](https://img.shields.io/badge/WordPress-v5.8%20tested-success.svg) [![GPLv2 License](https://img.shields.io/github/license/10up/autoshare-for-twitter.svg)](https://github.com/10up/autoshare-for-twitter/blob/develop/LICENSE.md)
[![Support Level](https://img.shields.io/badge/support-active-green.svg)](#support-level) [![Release Version](https://img.shields.io/github/release/10up/autoshare-for-twitter.svg)](https://github.com/10up/autoshare-for-twitter/releases/latest) ![WordPress tested up to version](https://img.shields.io/wordpress/plugin/tested/autoshare-for-twitter?label=WordPress) [![GPLv2 License](https://img.shields.io/github/license/10up/autoshare-for-twitter.svg)](https://github.com/10up/autoshare-for-twitter/blob/develop/LICENSE.md)
[![ESLint](https://github.com/10up/autoshare-for-twitter/actions/workflows/eslint.yml/badge.svg)](https://github.com/10up/autoshare-for-twitter/actions/workflows/eslint.yml)
[![PHPCompatibility](https://github.com/10up/autoshare-for-twitter/actions/workflows/php-compatibility.yml/badge.svg)](https://github.com/10up/autoshare-for-twitter/actions/workflows/php-compatibility.yml)
[![PHPCS](https://github.com/10up/autoshare-for-twitter/actions/workflows/phpcs.yml/badge.svg)](https://github.com/10up/autoshare-for-twitter/actions/workflows/phpcs.yml)
[![PHPUnit](https://github.com/10up/autoshare-for-twitter/actions/workflows/phpunit.yml/badge.svg)](https://github.com/10up/autoshare-for-twitter/actions/workflows/phpunit.yml)
[![E2E Tests](https://github.com/10up/autoshare-for-twitter/actions/workflows/cypress.yml/badge.svg)](https://github.com/10up/autoshare-for-twitter/actions/workflows/cypress.yml)

## Overview

Expand Down
Loading

0 comments on commit 1913336

Please sign in to comment.