Skip to content

Commit

Permalink
Merge branch 'develop' into PRESS0-2212
Browse files Browse the repository at this point in the history
  • Loading branch information
ramyakrishnai committed Oct 7, 2024
2 parents 4ac5661 + 70e3c48 commit 54e14ae
Show file tree
Hide file tree
Showing 15 changed files with 4,648 additions and 2,543 deletions.
83 changes: 83 additions & 0 deletions .github/workflows/create-milestones.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Create Milestone

on:
workflow_dispatch:
inputs:
due_date:
description: "Provide the due date for the milestone (format: YYYY-MM-DD)"
required: false
default: ""
schedule:
- cron: '0 12 * * 3' # Every Wednesday at noon UTC

permissions:
issues: write
contents: read

jobs:
create-milestone:
runs-on: ubuntu-latest

steps:
- name: Create Milestone
run: |
#!/bin/bash
# Explicitly set the timezone to UTC
export TZ=UTC
echo "Debug: Manually Entered Due Date: ${{ github.event.inputs.due_date }}"
# Get the input date from workflow_dispatch (if provided) or use default logic
if [ -n "${{ github.event.inputs.due_date }}" ]; then
# Use the provided date from workflow_dispatch input
DUE_DATE="${{ github.event.inputs.due_date }}"
echo "Manual input provided. Using input date: $DUE_DATE"
else
# No manual input, use the default: 2 weeks from now
DUE_DATE=$(date -u -d '2 weeks' '+%Y-%m-%d')
echo "No manual input. Using default date 2 weeks from now: $DUE_DATE"
fi
# Set the date format for the milestone title and due date
DATE=$(date -u -d "$DUE_DATE" '+%B %-d, %Y') # Human-readable date
DATE_ISO8601=$(date -u -d "$DUE_DATE" '+%Y-%m-%dT23:59:59Z') # ISO8601 format
# Prepare the description for the milestone
DESCRIPTION="The release is scheduled for $DATE, and PRs should be submitted and made mergeable by EOD $DATE. This means they should have tests passing and merge conflicts resolved. The description for the PR must include details of what is included in the PR and how to test it, and preferably new tests supporting the update.\n\nAny PRs submitted after the deadline will not be included in the release but go in the next release. This includes PRs with tests failing, no description, no screenshots/video demonstrating the update, sufficient Cypress tests, no link to associated JIRA ticket, etc. If no mergeable PRs are submitted for a release, there will be no release that week (unless there is a need for an out-of-cycle release)."
# Debugging outputs
echo "Debug: Human-readable Date: $DATE"
echo "Debug: ISO8601 Date: $DATE_ISO8601"
echo "Debug: Description content: $DESCRIPTION"
# Prepare the JSON payload for the API request
PAYLOAD="{\"title\":\"$DATE Release\", \"description\":\"$DESCRIPTION\", \"due_on\":\"$DATE_ISO8601\", \"state\":\"open\"}"
# Debugging the JSON payload
echo "Debug: Payload: $PAYLOAD"
# Perform the curl request and capture the response
RESPONSE=$(curl -s -w "%{http_code}" -o response_body.txt -X POST \
-H "User-Agent: GitHub-API-Request" \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/${{ github.repository }}/milestones \
-d "$PAYLOAD")
# Capture HTTP status code and response body
HTTP_STATUS=$(tail -n1 <<< "$RESPONSE")
RESPONSE_BODY=$(cat response_body.txt)
# Debugging the HTTP status and response body
echo "Debug: HTTP Status: $HTTP_STATUS"
echo "Debug: Response Body: $RESPONSE_BODY"
# If the request fails, exit with an error
if [[ "$HTTP_STATUS" -ge 400 ]]; then
echo "Error: Failed to create a milestone."
exit 1
fi
echo "Milestone created successfully."
echo "Response body: $RESPONSE_BODY"
4 changes: 2 additions & 2 deletions bluehost-wordpress-plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* Plugin URI: https://bluehost.com
* Update URI: https://github.com/bluehost/bluehost-wordpress-plugin
* Description: WordPress plugin that integrates a WordPress site with the Bluehost control panel, including performance, security, and update features.
* Version: 3.14.10
* Version: 3.14.13
* Requires at least: 6.4
* Requires PHP: 7.3
* Tested up to: 6.6.2
Expand All @@ -32,7 +32,7 @@
}

// Define constants
define( 'BLUEHOST_PLUGIN_VERSION', '3.14.10' );
define( 'BLUEHOST_PLUGIN_VERSION', '3.14.13' );
define( 'BLUEHOST_PLUGIN_FILE', __FILE__ );
define( 'BLUEHOST_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
define( 'BLUEHOST_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
Expand Down
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"roave/security-advisories": "dev-latest",
"newfold-labs/wp-php-standards": "^1.2.4",
"wp-cli/i18n-command": "^2.6.2",
"wp-phpunit/wp-phpunit": "^6.6.0"
"wp-phpunit/wp-phpunit": "^6.6.2"
},
"require": {
"newfold-labs/wp-module-activation": "^1.0.3",
Expand All @@ -78,7 +78,7 @@
"newfold-labs/wp-module-context": "^1.0.1",
"newfold-labs/wp-module-data": "^2.6.3",
"newfold-labs/wp-module-deactivation": "^1.2.3",
"newfold-labs/wp-module-ecommerce": "^1.3.43",
"newfold-labs/wp-module-ecommerce": "^1.3.44",
"newfold-labs/wp-module-facebook": "^1.0.9",
"newfold-labs/wp-module-features": "^1.4.2",
"newfold-labs/wp-module-global-ctb": "^1.0.13",
Expand All @@ -87,14 +87,14 @@
"newfold-labs/wp-module-marketplace": "^2.4.0",
"newfold-labs/wp-module-migration": "^1.0.11",
"newfold-labs/wp-module-my-products": "^1.0.6",
"newfold-labs/wp-module-notifications": "^1.5.0",
"newfold-labs/wp-module-onboarding": "^2.4.1",
"newfold-labs/wp-module-notifications": "^1.6.0",
"newfold-labs/wp-module-onboarding": "^2.4.2",
"newfold-labs/wp-module-patterns": "^2.4.1",
"newfold-labs/wp-module-performance": "2.0.1 as 1.9.9",
"newfold-labs/wp-module-runtime": "^1.0.11",
"newfold-labs/wp-module-secure-passwords": "^1.1.1",
"newfold-labs/wp-module-sso": "^1.0.6",
"newfold-labs/wp-module-staging": "^2.1.0",
"newfold-labs/wp-module-staging": "^2.1.1",
"wp-forge/wp-update-handler": "^1.0.2",
"wp-forge/wp-upgrade-handler": "^1.0"
}
Expand Down
67 changes: 35 additions & 32 deletions composer.lock

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

2 changes: 1 addition & 1 deletion inc/alt-experience/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ <h2 class="heading screen-reader-text">Bluehost WordPress Plugin</h2>
<path stroke-linecap="round" stroke-linejoin="round"
d="M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9 5.25h.008v.008H12v-.008z">
</path>
</svg>Help</a></li>
</svg>Help with WordPress</a></li>
</ul>
</div>
</nav>
Expand Down
12 changes: 0 additions & 12 deletions inc/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,6 @@

namespace Bluehost;

/**
* Filter wp revisions according to plugin setting
*
* @param int $num Number of posts to retain (unused).
* @param WP_Post|object $post Post object (unused).
* @return int
*/
function nfd_settings_revisions( $num, $post ) {
return get_option( 'nfd_wp_post_revisions', 5 );
}
add_filter( 'wp_revisions_to_keep', __NAMESPACE__ . '\\nfd_settings_revisions', 10, 2 );

if ( ! defined( 'EMPTY_TRASH_DAYS' ) ) {
$nfd_empty_trash_days = get_option( 'nfd_empty_trash_days', 30 );
define( 'EMPTY_TRASH_DAYS', $nfd_empty_trash_days );
Expand Down
Loading

0 comments on commit 54e14ae

Please sign in to comment.