-
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 'solutions' into add/solutions-component
* solutions: Update create-milestones.yml Create create-milestones.yml updated translations update plugin version to 3.14.12 updated the POT file to the latest version tests remove unused component Remove render of ContentRevisions Fully remove wp_revisions_to_keep method Nix tests change lock file too Temporarily remove revision settings UI and filter ecommerce version bump to 1.3.44 Bump plugin version to 3.14.11 Update NPM dependencies Update Composer dependencies PRESS0-2122 | Updated Help Text in Side Nav Menu to open Helpcenter NPM(deps): Bump @wordpress/compose from 7.6.0 to 7.7.0 NPM(deps): Bump @wordpress/i18n from 5.6.0 to 5.7.0 # Conflicts: # composer.lock
- Loading branch information
Showing
12 changed files
with
5,059 additions
and
2,496 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
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.