-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feature/code-standards-cleanup
- Loading branch information
Showing
53 changed files
with
10,199 additions
and
5,005 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,9 +29,9 @@ jobs: | |
- '8.2' | ||
- '8.3' | ||
wpVersion: | ||
- '6.2' | ||
- '6.3' | ||
- '6.4' | ||
- '6.5' | ||
- '6.6' | ||
|
||
steps: | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -127,8 +127,3 @@ jobs: | |
-H "Content-Type: application/json" \ | ||
--data '{"files":["https://hiive.cloud/workers/release-api/plugins/bluehost/bluehost-wordpress-plugin"]}' | ||
- name: Send message to ms teams | ||
uses: dhollerbach/[email protected] | ||
with: | ||
webhook: '${{ secrets.TEAMS_WEBHOOK_URL }}' | ||
message: "Bluehost plugin version ${{ env.VERSION }} has been released!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,13 @@ | |
"only": [ | ||
"newfold-labs/*" | ||
] | ||
}, | ||
"instawp": { | ||
"type": "vcs", | ||
"url": "[email protected]:InstaWP/connect-helpers.git", | ||
"only": [ | ||
"instawp/*" | ||
] | ||
} | ||
}, | ||
"scripts": { | ||
|
@@ -44,18 +51,24 @@ | |
"i18n-pot": "vendor/bin/wp i18n make-pot . ./languages/wp-plugin-bluehost.pot --headers='{\"Report-Msgid-Bugs-To\":\"https://github.com/bluehost/bluehost-wordpress-plugin/issues\",\"POT-Creation-Date\":\"2023-03-08T20:13:41+00:00\"}' --exclude=assets,tests,src", | ||
"i18n-po": "vendor/bin/wp i18n update-po ./languages/wp-plugin-bluehost.pot ./languages", | ||
"i18n-mo": "vendor/bin/wp i18n make-mo ./languages", | ||
"i18n-json": "vendor/bin/wp i18n make-json ./languages --no-purge --pretty-print", | ||
"i18n-json-rename": "for f in ./languages/*.json; do mv \"$f\" \"$(echo \"$f\" | sed 's/[0-9a-fA-F]\\{32\\}/bluehost-script/')\"; done", | ||
"i18n-json": "rm -f languages/*.json && vendor/bin/wp i18n make-json ./languages --no-purge --pretty-print", | ||
"i18n": [ | ||
"@i18n-pot", | ||
"@i18n-po", | ||
<<<<<<< HEAD | ||
"@i18n-mo" | ||
], | ||
"lint": "@test", | ||
"test": "@test-standards", | ||
"test-standards": [ | ||
"./vendor/bin/phpcs --standard=./.phpcs.dist.xml", | ||
"PHP_CS_FIXER_IGNORE_ENV=true ./vendor/bin/php-cs-fixer fix -v --diff --dry-run" | ||
||||||| 72e3d866bcfe | ||
"@i18n-mo" | ||
======= | ||
"@i18n-mo", | ||
"@i18n-json" | ||
>>>>>>> main | ||
] | ||
}, | ||
"scripts-descriptions": { | ||
|
@@ -66,12 +79,20 @@ | |
"i18n-pot": "Generate a .pot file for translation.", | ||
"i18n-po": "Update existing .po files.", | ||
"i18n-mo": "Generate new language .mo files.", | ||
<<<<<<< HEAD | ||
"i18n-json": "Generate new language .json files.", | ||
"i18n-json-rename": "Rename the language json files to remove the pesky hash.", | ||
"test": "Run all test scripts.", | ||
"test-standards": "Check files against coding standards without fixing." | ||
||||||| 72e3d866bcfe | ||
"i18n-json": "Generate new language .json files.", | ||
"i18n-json-rename": "Rename the language json files to remove the pesky hash." | ||
======= | ||
"i18n-json": "Generate new language .json files." | ||
>>>>>>> main | ||
}, | ||
"require-dev": { | ||
<<<<<<< HEAD | ||
"dealerdirect/phpcodesniffer-composer-installer": "@stable", | ||
"friendsofphp/php-cs-fixer": "^2.19", | ||
"newfold-labs/wp-php-standards": "^1.2", | ||
|
@@ -81,10 +102,66 @@ | |
"wp-cli/i18n-command": "^2.5.0", | ||
"wp-coding-standards/wpcs": "^3.0", | ||
"wp-phpunit/wp-phpunit": "^6.4.2" | ||
||||||| 72e3d866bcfe | ||
"roave/security-advisories": "dev-latest", | ||
"newfold-labs/wp-php-standards": "^1.2", | ||
"wp-cli/i18n-command": "^2.5.0", | ||
"wp-phpunit/wp-phpunit": "^6.4.2" | ||
======= | ||
"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.2" | ||
>>>>>>> main | ||
}, | ||
"require": { | ||
<<<<<<< HEAD | ||
"wp-forge/wp-upgrade-handler": "^1.0", | ||
"newfold-labs/wp-module-sso": "^1.0.4", | ||
||||||| 72e3d866bcfe | ||
"newfold-labs/wp-module-activation": "^1.0.1", | ||
"newfold-labs/wp-module-coming-soon": "^1.2.3", | ||
"newfold-labs/wp-module-context": "^1.0.0", | ||
"newfold-labs/wp-module-data": "^2.4.20", | ||
"newfold-labs/wp-module-deactivation": "^1.1.1", | ||
"newfold-labs/wp-module-ecommerce": "^1.3.25", | ||
"newfold-labs/wp-module-global-ctb": "^1.0.11", | ||
"newfold-labs/wp-module-help-center": "^1.0.24", | ||
"newfold-labs/wp-module-loader": "^1.0.10", | ||
"newfold-labs/wp-module-marketplace": "^2.2.4", | ||
"newfold-labs/wp-module-notifications": "^1.2.5", | ||
"newfold-labs/wp-module-onboarding": "^2.1.8", | ||
"newfold-labs/wp-module-patterns": "^0.1.15", | ||
"newfold-labs/wp-module-performance": "^1.4.0", | ||
"newfold-labs/wp-module-runtime": "^1.0.9", | ||
"newfold-labs/wp-module-secure-passwords": "^1.1.1", | ||
"newfold-labs/wp-module-sso": "^1.0.4", | ||
"newfold-labs/wp-module-staging": "^1.3.0", | ||
======= | ||
"newfold-labs/wp-module-activation": "^1.0.3", | ||
"newfold-labs/wp-module-atomic": "^1.3.0", | ||
"newfold-labs/wp-module-coming-soon": "^1.2.6", | ||
"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.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", | ||
"newfold-labs/wp-module-help-center": "^2.1.0", | ||
"newfold-labs/wp-module-loader": "^1.0.10", | ||
"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.6.0", | ||
"newfold-labs/wp-module-onboarding": "^2.4.1", | ||
"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.1", | ||
>>>>>>> main | ||
"wp-forge/wp-update-handler": "^1.0.2", | ||
"newfold-labs/wp-module-data": "^2.4.20", | ||
"newfold-labs/wp-module-context": "^1.0.0", | ||
|
Oops, something went wrong.