-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into task/waitlist/merge…
…-helper
- Loading branch information
Showing
68 changed files
with
11,638 additions
and
29,943 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 was deleted.
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
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,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 |
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,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 |
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,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 |
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
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
File renamed without changes.
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
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 |
---|---|---|
@@ -1 +1 @@ | ||
18.13.0 | ||
18.17.0 |
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 |
---|---|---|
|
@@ -61,5 +61,6 @@ | |
"src/views" | ||
] | ||
}, | ||
"zip_use_default_ignore": false, | ||
"zip_name": "tribe-common" | ||
} |
Oops, something went wrong.