Skip to content

Commit

Permalink
Merge branch 'trunk' into add/test-connection-rest-endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeymitr committed Mar 21, 2024
2 parents 41a5e77 + a48c77a commit 7e6aa5a
Show file tree
Hide file tree
Showing 83 changed files with 5,720 additions and 73 deletions.
8 changes: 7 additions & 1 deletion .github/files/gh-autorelease/files/autorelease.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,17 @@ set -eo pipefail
: "${GITHUB_REPOSITORY:?Build argument needs to be set and non-empty.}"

## Determine tag
if [[ ! "$GITHUB_REF" =~ ^refs/tags/v?[0-9]+(\.[0-9]+)+$ ]]; then
if [[ ! "$GITHUB_REF" =~ ^refs/tags/v?[0-9]+(\.[0-9]+)+(-[a-z0-9._-]+)?$ ]]; then
echo "::error::Expected GITHUB_REF like \`refs/tags/v1.2.3\` or \`refs/tags/1.2.3\`, got \`$GITHUB_REF\`"
exit 1
fi
TAG="${GITHUB_REF#refs/tags/}"

## Check for alphas
if [[ "$TAG" =~ -(alpha|a\.[0-9]*[02468])$ ]]; then
echo "Not creating a release for alpha version $TAG"
exit 0
fi
echo "Creating release for $TAG"

## Determine slug and title format.
Expand Down
3 changes: 3 additions & 0 deletions .github/files/gh-autorelease/workflows/autorelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ on:
push:
tags:
- 'v?[0-9]+.[0-9]+'
- 'v?[0-9]+.[0-9]+-*'
- 'v?[0-9]+.[0-9]+.[0-9]+'
- 'v?[0-9]+.[0-9]+.[0-9]+-*'
- 'v?[0-9]+.[0-9]+.[0-9]+.[0-9]+'
- 'v?[0-9]+.[0-9]+.[0-9]+.[0-9]+-*'

jobs:
publish:
Expand Down
4 changes: 2 additions & 2 deletions .github/files/gh-autotagger/workflows/autotagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
VER=$(sed -nEe 's/^## \[?([^]]*)\]? - .*/\1/;T;p;q' CHANGELOG.md || true)
echo "Version from changelog is ${VER:-<unknown>}"
echo "version=$VER" >> "$GITHUB_OUTPUT"
if [[ "$VER" =~ ^[0-9]+(\.[0-9]+)+$ ]]; then
if [[ "$VER" =~ ^[0-9]+(\.[0-9]+)+(-[a-z0-9._-]+)?$ && ! "$VER" =~ -(alpha|a\.[0-9]*[02468])$ ]]; then
echo "Version $VER ok to tag"
echo "run=true" >> "$GITHUB_OUTPUT"
else
Expand All @@ -77,7 +77,7 @@ jobs:
run: |
RUN=true
if [[ -e composer.json ]]; then
TMP=$(jq -r '.require // {} | to_entries[] | select( .value | test( "-(alpha|a.[0-9]+)$" ) ) | "\(.key) (\(.value))"' composer.json)
TMP=$(jq -r '.require // {} | to_entries[] | select( .value | test( "-(alpha|a\\.[0-9]*[02468])$" ) ) | "\(.key) (\(.value))"' composer.json)
if [[ -n "$TMP" ]]; then
echo "::notice::Not tagging due to -alpha deps on ${TMP//$'\n'/ }"
RUN=false
Expand Down
91 changes: 91 additions & 0 deletions pnpm-lock.yaml

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

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

yUpdate Phan config.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: changed

Added additional settings for commenting on simple sites
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Untangle: update launchpad links for newsletter setting to go to Jetpack's
2 changes: 1 addition & 1 deletion projects/packages/jetpack-mu-wpcom/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
},
"autotagger": true,
"branch-alias": {
"dev-trunk": "5.18.x-dev"
"dev-trunk": "5.19.x-dev"
},
"textdomain": "jetpack-mu-wpcom",
"version-constants": {
Expand Down
2 changes: 1 addition & 1 deletion projects/packages/jetpack-mu-wpcom/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@automattic/jetpack-mu-wpcom",
"version": "5.18.0",
"version": "5.19.0-alpha",
"description": "Enhances your site with features powered by WordPress.com",
"homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/packages/jetpack-mu-wpcom/#readme",
"bugs": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* Jetpack_Mu_Wpcom main class.
*/
class Jetpack_Mu_Wpcom {
const PACKAGE_VERSION = '5.18.0';
const PACKAGE_VERSION = '5.19.0-alpha';
const PKG_DIR = __DIR__ . '/../';
const BASE_DIR = __DIR__ . '/';
const BASE_FILE = __FILE__;
Expand Down Expand Up @@ -45,6 +45,7 @@ public static function init() {
// This feature runs only on simple sites.
if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
add_action( 'plugins_loaded', array( __CLASS__, 'load_verbum_comments' ) );
add_action( 'wp_loaded', array( __CLASS__, 'load_verbum_comments_admin' ) );
}

// Unified navigation fix for changes in WordPress 6.2.
Expand Down Expand Up @@ -229,6 +230,12 @@ private static function should_disable_comment_experience( $blog_id ) {
$is_p2 = str_contains( get_stylesheet(), 'pub/p2' ) || function_exists( '\WPForTeams\is_wpforteams_site' ) && is_wpforteams_site( $blog_id );
$is_forums = str_contains( get_stylesheet(), 'a8c/supportforums' ); // Not in /forums.

$verbum_option_enabled = get_blog_option( $blog_id, 'enable_verbum_commenting', true );

if ( empty( $verbum_option_enabled ) ) {
return true;
}

// Don't load any comment experience in the Reader, GlotPress, wp-admin, or P2.
return ( 1 === $blog_id || TRANSLATE_BLOG_ID === $blog_id || is_admin() || $is_p2 || $is_forums );
}
Expand All @@ -255,6 +262,14 @@ public static function load_verbum_comments() {
}
}

/**
* Load Verbum Comments Settings.
*/
public static function load_verbum_comments_admin() {
require_once __DIR__ . '/features/verbum-comments/assets/class-verbum-admin.php';
new \Automattic\Jetpack\Verbum_Admin();
}

/**
* Load WPCOM Command Palette.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,9 @@ function wpcom_launchpad_get_task_definitions() {
},
'is_complete_callback' => 'wpcom_launchpad_is_task_option_completed',
'get_calypso_path' => function ( $task, $default, $data ) {
if ( wpcom_launchpad_should_use_wp_admin_link() ) {
return admin_url( 'admin.php?page=jetpack#/newsletter' );
}
return '/settings/newsletter/' . $data['site_slug_encoded'];
},
),
Expand All @@ -465,6 +468,9 @@ function wpcom_launchpad_get_task_definitions() {
},
'is_complete_callback' => 'wpcom_launchpad_is_task_option_completed',
'get_calypso_path' => function ( $task, $default, $data ) {
if ( wpcom_launchpad_should_use_wp_admin_link() ) {
return admin_url( 'admin.php?page=jetpack#/newsletter' );
}
return '/settings/newsletter/' . $data['site_slug_encoded'];
},
),
Expand Down
Loading

0 comments on commit 7e6aa5a

Please sign in to comment.