From e97fa63c15f2cbaebd2ea1c6af515e75dfe599f0 Mon Sep 17 00:00:00 2001 From: Jeffrey Paul Date: Wed, 29 Jun 2022 12:16:15 -0500 Subject: [PATCH 1/7] update from `master` to `trunk` action reference --- .github/workflows/push-asset-readme-update.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push-asset-readme-update.yml b/.github/workflows/push-asset-readme-update.yml index 124ae2f10..56e36596c 100644 --- a/.github/workflows/push-asset-readme-update.yml +++ b/.github/workflows/push-asset-readme-update.yml @@ -4,7 +4,7 @@ on: branches: - trunk jobs: - master: + trunk: name: Push to trunk runs-on: ubuntu-latest steps: From f359b668f6c03955c4df253fa67343ac1de95866 Mon Sep 17 00:00:00 2001 From: Jeffrey Paul Date: Wed, 29 Jun 2022 12:16:37 -0500 Subject: [PATCH 2/7] update from `master` to `trunk` action reference --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b3a64df58..d6ce177e0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -24,7 +24,7 @@ For more on how 10up writes and manages code, check out our [10up Engineering Be ## Workflow -The `develop` branch is the development branch which means it contains the next version to be released. `stable` contains the current latest release and `master` contains the corresponding stable development version. Always work on the `develop` branch and open up PRs against `develop`. +The `develop` branch is the development branch which means it contains the next version to be released. `stable` contains the current latest release and `trunk` contains the corresponding stable development version. Always work on the `develop` branch and open up PRs against `develop`. ## Release instructions From fa51e4943a4fe94634a4ee913b45c72c8e3829cd Mon Sep 17 00:00:00 2001 From: Jeffrey Paul Date: Wed, 29 Jun 2022 12:17:01 -0500 Subject: [PATCH 3/7] update from `master` to `trunk` file reference --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8a671f533..d5d3be425 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ WordPress mantra, decisions not options. Actions and filters make the plugin ver ## Installation Install the plugin in WordPress. You can download a -[zip via GitHub](https://github.com/10up/safe-redirect-manager/archive/master.zip) and upload it using the WordPress +[zip via GitHub](https://github.com/10up/safe-redirect-manager/archive/trunk.zip) and upload it using the WordPress plugin uploader ("Plugins" > "Add New" > "Upload Plugin"). ## Configuration From 163d0c6b18f52279e0b7bb40e46ee0e587a71b92 Mon Sep 17 00:00:00 2001 From: Jeffrey Paul Date: Wed, 29 Jun 2022 13:10:38 -0500 Subject: [PATCH 4/7] Create no-response.yml --- .github/workflows/no-response.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/no-response.yml diff --git a/.github/workflows/no-response.yml b/.github/workflows/no-response.yml new file mode 100644 index 000000000..ce0c42f10 --- /dev/null +++ b/.github/workflows/no-response.yml @@ -0,0 +1,30 @@ +name: No Response + +# **What it does**: Closes issues where the original author doesn't respond to a request for information. +# **Why we have it**: To remove the need for maintainers to remember to check back on issues periodically to see if contributors have responded. +# **Who does it impact**: Everyone that works on docs or docs-internal. + +on: + issue_comment: + types: [created] + schedule: + # Schedule for five minutes after the hour, every hour + - cron: '5 * * * *' + +jobs: + noResponse: + runs-on: ubuntu-latest + steps: + - uses: lee-dohm/no-response@v0.5.0 + with: + token: ${{ github.token }} + daysUntilClose: 14 # Number of days of inactivity before an Issue is closed for lack of response + responseRequiredLabel: "needs:feedback" # Label indicating that a response from the original author is required + closeComment: > + This issue has been automatically closed because there has been no response + to our request for more information. With only the + information that is currently in the issue, we don't have enough information + to take action. Please reach out if you have or find the answers we need so + that we can investigate further. See [this blog post on bug reports and the + importance of repro steps](https://www.lee-dohm.com/2015/01/04/writing-good-bug-reports/) + for more information about the kind of information that may be helpful. From 1f4eb489af6773939913a363778812838f1ec9ef Mon Sep 17 00:00:00 2001 From: Peter Wilson <519727+peterwilsoncc@users.noreply.github.com> Date: Tue, 23 Aug 2022 10:36:48 +1000 Subject: [PATCH 5/7] Indiciate plugin as source of redirect. --- inc/classes/class-srm-redirect.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/inc/classes/class-srm-redirect.php b/inc/classes/class-srm-redirect.php index b03bc6676..7c5467459 100644 --- a/inc/classes/class-srm-redirect.php +++ b/inc/classes/class-srm-redirect.php @@ -245,13 +245,12 @@ public function maybe_redirect() { header( 'X-Safe-Redirect-Manager: true' ); header( 'X-Safe-Redirect-ID: ' . esc_attr( $matched_redirect['redirect_id'] ) ); - // if we have a valid status code, then redirect with it - if ( in_array( $matched_redirect['status_code'], srm_get_valid_status_codes(), true ) ) { - wp_safe_redirect( $matched_redirect['redirect_to'], $matched_redirect['status_code'] ); - } else { - wp_safe_redirect( $matched_redirect['redirect_to'] ); + // Use default status code if an invalid value is set. + if ( ! in_array( $matched_redirect['status_code'], srm_get_valid_status_codes(), true ) ) { + $matched_redirect['status_code'] = apply_filters( 'srm_default_direct_status', 302 ); } + wp_safe_redirect( $matched_redirect['redirect_to'], $matched_redirect['status_code'], 'Safe Redirect Manager' ); exit; } From 7edd51b06a1bfaa0c25c5b3b7710ad62fc5821de Mon Sep 17 00:00:00 2001 From: Darin Kotter Date: Fri, 23 Sep 2022 10:30:38 -0600 Subject: [PATCH 6/7] Version bump to 1.11.1 --- CONTRIBUTING.md | 2 +- package-lock.json | 4 ++-- package.json | 2 +- readme.txt | 2 +- safe-redirect-manager.php | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d6ce177e0..85f576d8f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -29,7 +29,7 @@ The `develop` branch is the development branch which means it contains the next ## Release instructions 1. Branch: Starting from `develop`, cut a release branch named `release/X.Y.Z` for your changes. -1. Version bump: Bump the version number in `safe-redirect-manager.php`, `package-lock.json`, `package.json`, and `readme.txt` if it does not already reflect the version being released. +1. Version bump: Bump the version number in `safe-redirect-manager.php`, `package-lock.json`, `package.json`, and `readme.txt` if it does not already reflect the version being released. In `safe-redirect-manager.php` update both the plugin "Version:" property and the plugin `SRM_VERSION` constant. 1. Changelog: Add/update the changelog in both `readme.txt` and `CHANGELOG.md`. 1. Props: Update `CREDITS.md` file with any new contributors, confirm maintainers are accurate. 1. Readme updates: Make any other readme changes as necessary. `README.md` is geared toward GitHub and `readme.txt` contains WordPress.org-specific content. The two are slightly different. diff --git a/package-lock.json b/package-lock.json index a73f7b895..7e4757326 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "safe-redirect-manager", - "version": "1.11.0", + "version": "1.11.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "safe-redirect-manager", - "version": "1.11.0", + "version": "1.11.1", "license": "GPL-2.0-or-later", "dependencies": { "node-wp-i18n": "^1.2.5" diff --git a/package.json b/package.json index 13c4e918d..4bd8cf868 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "safe-redirect-manager", - "version": "1.11.0", + "version": "1.11.1", "description": "Easily and safely manage HTTP redirects.", "homepage": "https://github.com/10up/safe-redirect-manager", "bugs": { diff --git a/readme.txt b/readme.txt index 3cb358f0d..8bdd9ae24 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Tags: http redirects, redirect manager, url redirection, safe http Requires at least: 4.6 Tested up to: 6.0 Requires PHP: 5.6 -Stable tag: 1.11.0 +Stable tag: 1.11.1 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html diff --git a/safe-redirect-manager.php b/safe-redirect-manager.php index b644383c4..a6674a7f8 100644 --- a/safe-redirect-manager.php +++ b/safe-redirect-manager.php @@ -3,7 +3,7 @@ * Plugin Name: Safe Redirect Manager * Plugin URI: https://wordpress.org/plugins/safe-redirect-manager * Description: Easily and safely manage HTTP redirects. - * Version: 1.11.0 + * Version: 1.11.1 * Requires at least: 4.6 * Requires PHP: 5.6 * Author: 10up @@ -20,7 +20,7 @@ require_once dirname( __FILE__ ) . '/inc/classes/class-srm-post-type.php'; require_once dirname( __FILE__ ) . '/inc/classes/class-srm-redirect.php'; -define( 'SRM_VERSION', '1.11.0' ); +define( 'SRM_VERSION', '1.11.1' ); if ( defined( 'WP_CLI' ) && WP_CLI ) { require_once dirname( __FILE__ ) . '/inc/classes/class-srm-wp-cli.php'; From 485fd8ff38925a1820e69a92703775aeb70e5be3 Mon Sep 17 00:00:00 2001 From: Darin Kotter Date: Fri, 23 Sep 2022 10:35:26 -0600 Subject: [PATCH 7/7] Update changelogs with new PRs --- CHANGELOG.md | 5 +++++ readme.txt | 3 +++ 2 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4752f9cd1..8e5b58b2a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file, per [the Ke ## [Unreleased] - TBD +## [1.11.1] - 2022-09-26 +### Added +- Indicate plugin as the source of redirects (props [@peterwilsoncc](https://github.com/peterwilsoncc), [@Sidsector9](https://github.com/Sidsector9) via [#281](https://github.com/10up/safe-redirect-manager/pull/281)). + ## [1.11.0] - 2022-06-27 ### Added - Detect duplicate rules for the same 'redirect from' value (props [@adamsilverstein](https://github.com/adamsilverstein), [@dhanendran](https://github.com/dhanendran), [@hrkhal](https://github.com/hrkhal), [@jeffpaul](https://github.com/jeffpaul), [@lukaspawlik](https://github.com/lukaspawlik), [@sanketio](https://github.com/sanketio), [@Sidsector9](https://github.com/Sidsector9) via [#171](https://github.com/10up/safe-redirect-manager/pull/171)). @@ -235,6 +239,7 @@ All notable changes to this project will be documented in this file, per [the Ke - Plugin released [Unreleased]: https://github.com/10up/safe-redirect-manager/compare/trunk...develop +[1.11.1]: https://github.com/10up/safe-redirect-manager/compare/1.11.0...1.11.1 [1.11.0]: https://github.com/10up/safe-redirect-manager/compare/1.10.1...1.11.0 [1.10.1]: https://github.com/10up/safe-redirect-manager/compare/1.10.0...1.10.1 [1.10.0]: https://github.com/10up/safe-redirect-manager/compare/1.9.3...1.10.0 diff --git a/readme.txt b/readme.txt index 8bdd9ae24..c62bd28dd 100644 --- a/readme.txt +++ b/readme.txt @@ -48,6 +48,9 @@ This should be a path (i.e. `/test`) or a URL (i.e. `http://example.com/wp/test` == Changelog == += 1.11.1 - 2022-09-26 = +* **Added:** Indicate plugin as the source of redirects (props [@peterwilsoncc](https://github.com/peterwilsoncc), [@Sidsector9](https://github.com/Sidsector9) via [#281](https://github.com/10up/safe-redirect-manager/pull/281)). + = 1.11.0 - 2022-06-27 = * **Added:** Detect duplicate rules for the same 'redirect from' value (props [@adamsilverstein](https://github.com/adamsilverstein), [@dhanendran](https://github.com/dhanendran), [@hrkhal](https://github.com/hrkhal), [@jeffpaul](https://github.com/jeffpaul), [@lukaspawlik](https://github.com/lukaspawlik), [@sanketio](https://github.com/sanketio), [@Sidsector9](https://github.com/Sidsector9) via [#171](https://github.com/10up/safe-redirect-manager/pull/171)). * **Added:** PHP 8 compatibility (props [@iamdharmesh](https://github.com/iamdharmesh), [@dkotter](https://github.com/dkotter) via [#264](https://github.com/10up/safe-redirect-manager/pull/264)).