Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into task/waitlist/merge…
Browse files Browse the repository at this point in the history
…-helper
  • Loading branch information
dpanta94 committed Feb 12, 2025
2 parents e363a56 + 6f2a564 commit 37111c6
Show file tree
Hide file tree
Showing 68 changed files with 11,638 additions and 29,943 deletions.
2 changes: 2 additions & 0 deletions .distfiles
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,5 @@
/vendor/vendor-prefixed/autoload.php
/vendor/vendor-prefixed/stellarwp/**/*
/vendor/woocommerce/action-scheduler/**/*.php
/node_modules/php-date-formatter/js/php-date-formatter.js
/node_modules/php-date-formatter/js/php-date-formatter.min.js
52 changes: 0 additions & 52 deletions .github/actions/process-changelog/action.yml

This file was deleted.

1 change: 1 addition & 0 deletions .github/workflows/changelogger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
check-changelog:
name: Check changelog
runs-on: ubuntu-latest
if: "!contains(github.event.pull_request.body, '[skip-changelog]')"
steps:
# clone the repository
- uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
jobs:
lint:
runs-on: ubuntu-latest
if: "!contains(github.event.pull_request.body, '[skip-lint]')"
steps:
- name: Checkout the repository
uses: actions/checkout@v4
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/lint.yml.bak
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: 'npm lint'
on:
pull_request:
workflow_dispatch:
paths:
- 'src/modules/**.js'
- 'src/resources/js/**.js'
- 'src/resources/postcss/**.pcss'
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: recursive
# ------------------------------------------------------------------------------
# Setup Node.
# ------------------------------------------------------------------------------
- name: Check for .nvmrc file
id: check-nvmrc
run: |
if [ -f "${{ github.workspace }}/.nvmrc" ]; then
echo "exists=true" >> $GITHUB_OUTPUT
else
echo "exists=false" >> $GITHUB_OUTPUT
fi

- uses: actions/setup-node@v4
if: steps.check-nvmrc.outputs.exists == 'true'
with:
node-version-file: '.nvmrc'
cache: 'npm'
cache-dependency-path: package-lock.json
- name: Install node modules
run: npm ci
- name: Run linting tasks
run: npm run lint
1 change: 1 addition & 0 deletions .github/workflows/phpcs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: 'PHPCS'
on: [pull_request]
jobs:
conditional:
if: "!contains(github.event.pull_request.body, '[skip-phpcs]')"
runs-on: ubuntu-latest
outputs:
has_no_php_changes: ${{ steps.skip.outputs.has_no_php_changes }}
Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: 'PHPStan Tests'
on:
pull_request:
paths:
- '.github/**/*'
- '*.php'
- 'src/**.php'
jobs:
phpstan:
strategy:
matrix:
phpVersion: [
"7.4",
# ----------------------------------------
# Disabled until we get all of 7.4 passing
# "8.0",
# "8.1",
# "8.2",
# "8.3",
# ----------------------------------------
]
runs-on: ubuntu-20.04
steps:
- name: Checkout the repository
uses: actions/checkout@v4
# ------------------------------------------------------------------------------
# Set up PHP and run phpstan
# ------------------------------------------------------------------------------
- name: Configure PHP environment to run phpstan
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.phpVersion }}
# ------------------------------------------------------------------------------
# Override composer php version
# ------------------------------------------------------------------------------
- name: Set php version ${{ matrix.phpVersion }} in composer
run: composer config platform.php ${{ matrix.phpVersion }}
# ------------------------------------------------------------------------------
# Install dependencies - ignoring php requirements
# ------------------------------------------------------------------------------
- name: Install dependencies
run: composer i --ignore-platform-req=php+
# ------------------------------------------------------------------------------
# Run phpstan
# ------------------------------------------------------------------------------
- name: Run phpstan
run: ./vendor/bin/phpstan analyse -c phpstan.neon.dist --memory-limit=512M --error-format=table
98 changes: 98 additions & 0 deletions .github/workflows/release-merge-forward.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: "Release: Merge Forward"
on:
workflow_dispatch:
inputs:
forward-branch:
description: 'Name of the branch to merge into (e.g. release/T25.adamwarlock, master)'
default: release/T25.name
required: true

jobs:
create-branch:
runs-on: ubuntu-latest
outputs:
skip: ${{ steps.create-branch.outputs.skip }}
steps:
- name: Print input vars to summary
run: |
echo "### Debugging Inputs" >> $GITHUB_STEP_SUMMARY
echo "- forward-branch: \`${{ github.event.inputs.forward-branch }}\`" >> $GITHUB_STEP_SUMMARY
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.forward-branch }}
fetch-depth: 0

- name: Set up Git configuration
run: |
git config --global user.email "[email protected]"
git config --global user.name "github-actions"
- name: Create and push release branch
id: create-branch
run: |
forwardBranch="${{ github.event.inputs.forward-branch }}"
if git ls-remote --exit-code --heads origin "$forwardBranch"; then
echo "skip=0" >> $GITHUB_OUTPUT
git checkout "$forwardBranch"
else
echo "## Pull Request" >> $GITHUB_STEP_SUMMARY
echo "Branch $forwardBranch does not exist; no need to create a PR." >> $GITHUB_STEP_SUMMARY
# Create and push the branch so that subsequent steps can use it.
git checkout "${{ github.ref_name }}"
git checkout -b "$forwardBranch"
git push origin "$forwardBranch"
echo "skip=1" >> $GITHUB_OUTPUT
fi
create-pull-request:
needs: create-branch
runs-on: ubuntu-latest
# Run only if the branch already existed (skip==0)
if: ${{ needs.create-branch.outputs.skip == '0' }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Git configuration
run: |
git config --global user.email "[email protected]"
git config --global user.name "github-actions"
- name: create new branch from forward branch and merge ref branch.
run: |
forwardBranch="${{ github.event.inputs.forward-branch }}"
HEAD_BRANCH="task/merge-forward-${{ github.ref_name }}-to-$forwardBranch"
git checkout "$forwardBranch"
git checkout -b "$HEAD_BRANCH"
git merge --no-ff "${{ github.ref_name }}"
git push origin "$HEAD_BRANCH"
- name: Create Pull Request using GitHub CLI
id: create_pr
env:
# Use GITHUB_TOKEN so that gh automatically authenticates.
GITHUB_TOKEN: ${{ secrets.GHA_BOT_TOKEN_MANAGER }}
run: |
echo "Creating PR using gh CLI..."
# Define the head branch name for the PR.
HEAD_BRANCH="task/merge-forward-${{ github.ref_name }}-to-${{ github.event.inputs.forward-branch }}"
# Create the PR and capture JSON output.
PR_URL=$(gh pr create \
--base "${{ github.event.inputs.forward-branch }}" \
--head "$HEAD_BRANCH" \
--title "[BOT] Merge forward from '${{ github.ref_name }}' to '${{ github.event.inputs.forward-branch }}'" \
--body "This is an automated PR created by ${{ github.actor }}. It was generated by [this GitHub Action](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) \\n [skip-changelog] [skip-lint] [skip-phpcs]" \
--assignee "${{ github.actor }}" \
--label "automation")
echo "pr_url=${PR_URL}" >> $GITHUB_OUTPUT
- name: Check outputs
run: |
echo "## Pull Request" >> $GITHUB_STEP_SUMMARY
echo "* URL - [${{ steps.create_pr.outputs.pr_url }}](${{ steps.create_pr.outputs.pr_url }})" >> $GITHUB_STEP_SUMMARY
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release Branch
name: "Release: Prepare Branch"

on:
workflow_dispatch:
Expand Down Expand Up @@ -148,7 +148,7 @@ jobs:
token: ${{ secrets.GHA_BOT_TOKEN_MANAGER }}
base: "${{ github.event.inputs.new-branch }}"
branch: "task/version-bump-${{ github.event.inputs.new-branch }}-${{ steps.vars.outputs.sha_short }}"
title: "Version bump for ${{ github.event.inputs.new-branch }}"
title: "[BOT] Version bump for '${{ github.event.inputs.new-branch }}'"
body: |
This is an automated PR created by ${{ github.actor }}.
It was generated by [this GitHub Action](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Release - Changelog"
name: "Release: Process Changelogs"

# This action will run when it is triggered manually
on:
Expand Down Expand Up @@ -53,7 +53,8 @@ jobs:

- name: Set Variables
id: vars
run: echo "sha_short=$(git rev-parse --short ${{ github.sha }})" >> $GITHUB_OUTPUT
run: |
echo "sha_short=$(git rev-parse --short ${{ github.sha }})" >> $GITHUB_OUTPUT
- name: Set up Git configuration
run: |
Expand Down Expand Up @@ -111,7 +112,7 @@ jobs:
- name: "Process changelog"
id: process_changelog
uses: ./.github/actions/process-changelog
uses: the-events-calendar/actions/.github/actions/process-changelog@main
with:
release-version: ${{ steps.figure_out_version.outputs.RELEASE_VERSION }}
release-date: ${{ steps.format_date.outputs.RELEASE_DATE }}
Expand All @@ -124,7 +125,7 @@ jobs:
token: ${{ secrets.GHA_BOT_TOKEN_MANAGER }}
base: ${{ github.ref }}
branch: "task/process-changelog/${{ steps.format_date.outputs.RELEASE_DATE }}/${{ steps.figure_out_version.outputs.RELEASE_VERSION }}/${{ steps.vars.outputs.sha_short }}"
title: "Process changelog for ${{ github.ref }}"
title: "[BOT] Process changelog for '${{ github.head_ref || github.ref_name }}'"
body: |
This is an automated PR created by ${{ github.actor }}.
It was generated by [this GitHub Action](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 🔁 Sync Translations
name: "Release: Sync Translations"

on:
workflow_dispatch: # Allows you to run this workflow manually from the Actions tab
Expand Down Expand Up @@ -75,7 +75,7 @@ jobs:
token: ${{ secrets.GHA_BOT_TOKEN_MANAGER }}
base: ${{ github.head_ref || github.ref_name }}
branch: "task/i18n-update-${{ github.head_ref || github.ref_name }}-with-${{ steps.vars.outputs.sha_short }}"
title: "Generate Pot for ${{ github.head_ref || github.ref_name }}"
title: "[BOT] Generate POT file for '${{ github.head_ref || github.ref_name }}'"
assignees: ${{ github.actor }}
reviewers: the-events-calendar/engineers
body: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/submodule-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache Composer Downloads
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: vendor/
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion .github/workflows/tests-php-eva.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
if: steps.skip.outputs.value != 1
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v2
- uses: actions/cache@v4
id: composer-cache
if: steps.skip.outputs.value != 1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests-php-with-woo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
if: steps.skip.outputs.value != 1
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v2
- uses: actions/cache@v4
id: composer-cache
if: steps.skip.outputs.value != 1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
if: steps.skip.outputs.value != 1
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v2
- uses: actions/cache@v4
id: composer-cache
if: steps.skip.outputs.value != 1
with:
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.13.0
18.17.0
1 change: 1 addition & 0 deletions .puprc
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,6 @@
"src/views"
]
},
"zip_use_default_ignore": false,
"zip_name": "tribe-common"
}
Loading

0 comments on commit 37111c6

Please sign in to comment.