Skip to content

Commit

Permalink
Merge branch 'develop' into trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
dkotter committed Sep 28, 2022
2 parents 3983ccb + 19b6f13 commit 8a8307b
Show file tree
Hide file tree
Showing 10 changed files with 52 additions and 15 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/no-response.yml
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion .github/workflows/push-asset-readme-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
branches:
- trunk
jobs:
master:
trunk:
name: Push to trunk
runs-on: ubuntu-latest
steps:
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)).
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ 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

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.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 4 additions & 5 deletions inc/classes/class-srm-redirect.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
5 changes: 4 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)).
Expand Down
4 changes: 2 additions & 2 deletions safe-redirect-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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';
Expand Down

0 comments on commit 8a8307b

Please sign in to comment.