From 6057798c34d7ea536e42daa6f80e6845f3df405e Mon Sep 17 00:00:00 2001 From: Thomas Roberts <5656702+opr@users.noreply.github.com> Date: Fri, 5 May 2023 01:20:11 +0300 Subject: [PATCH] Allow changelogger regex to find directories with woocommerce* names (#35642) * Allow matcher to find directories with woocommerce* names * Allow package preparation script to run regardless of directory name repo is in --- tools/changelogger/class-package-formatter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/changelogger/class-package-formatter.php b/tools/changelogger/class-package-formatter.php index d4d10ddcd97..03add787d82 100644 --- a/tools/changelogger/class-package-formatter.php +++ b/tools/changelogger/class-package-formatter.php @@ -49,7 +49,7 @@ class Package_Formatter extends Formatter implements FormatterPlugin { */ public function getReleaseLink( $version ) { // Catpure anything past /woocommerce in the current working directory. - preg_match( '/\/woocommerce\/packages\/js\/(.+)/', getcwd(), $path ); + preg_match( '/\/packages\/js\/(.+)/', getcwd(), $path ); if ( ! count( $path ) ) { throw new \InvalidArgumentException( 'Invalid directory.' );