Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
2fdd525
Port CI/CD, testing, and robustness features from CHIP for Gravity Forms
wzul May 29, 2026
68cfcdf
Fix tag convention: support both plain (1.2.1) and v-prefixed (v1.2.1…
wzul May 29, 2026
3fb6127
Remove feature branch from plugin-check push trigger
wzul May 29, 2026
c54bec2
fix(prepare-release): use v-prefixed tags in Summary instructions
wzul May 29, 2026
d30360a
feat(dev): add .wp-env.json for local WordPress environment
wzul May 29, 2026
77f3316
docs(api): update CHIP API documentation URL
wzul May 29, 2026
e15a4c8
docs(assets): add .wordpress-org README with asset naming conventions
wzul May 29, 2026
1c0f78c
chore(gitignore): sync with chip-for-gravity-forms template
wzul May 29, 2026
2f2794b
fix: move .wordpress-org from gitignore to export-ignore
wzul May 29, 2026
aa42067
chore(version): bump to 1.3.0 and update release date
wzul May 29, 2026
6e570d9
docs(readme): keep only latest changelog, link to GitHub releases
wzul May 29, 2026
abe478c
docs(claude): update CLAUDE.md to reflect v1.3.0 changes
wzul May 29, 2026
d01c9ab
chore(readme): bump WordPress minimum to 6.3
wzul May 29, 2026
82632ff
ci(plugin-check): allow failure due to upstream issue #579
wzul May 29, 2026
c206bdb
docs(changelog): add missing 1.2.1 entry
wzul May 29, 2026
80f3a81
style(phpcs): fix all WordPress coding standard violations
wzul May 29, 2026
49687cc
test(bootstrap): update require paths for renamed class files
wzul May 29, 2026
71c0533
feat(settings): remove Send Receipt option
wzul Jun 2, 2026
373da3a
feat(gateway): improve block gateway default message and make it cust…
wzul Jun 2, 2026
ebffce8
feat(settings): improve Donation Instructions default text
wzul Jun 2, 2026
470837e
feat(block-gateway): make frontend message customizable via chip-cont…
wzul Jun 2, 2026
cc22284
ci(plugin-check): replace broken action with manual wp-env approach
wzul Jun 2, 2026
6f2ae5b
ci(plugin-check): fix WP CLI command syntax
wzul Jun 2, 2026
8c4c3df
fix(plugin-check): resolve Plugin Check warnings
wzul Jun 2, 2026
827b7a7
ci(plugin-check): bump actions/setup-node to v6
wzul Jun 2, 2026
cbadfe2
feat(form-builder): add CHIP settings link in Visual Form Builder sid…
wzul Jun 2, 2026
0c78b7b
ci(plugin-check): upgrade Node.js to 24
wzul Jun 2, 2026
122eab6
ci(plugin-check): fail on warnings
wzul Jun 2, 2026
e9bd10d
ci(plugin-check): revert Node.js to 20 (wp-env incompatible with 24)
wzul Jun 2, 2026
da7ed55
ci(plugin-check): fix JSON parsing by filtering wp-env status text
wzul Jun 2, 2026
7289513
ci(plugin-check): ignore NonPrefixedHooknameFound for GiveWP core hooks
wzul Jun 2, 2026
30a672b
ci(plugin-check): suppress WP CLI exit code 1 on ignored warnings
wzul Jun 2, 2026
a43581a
ci(plugin-check): retry Node.js 24
wzul Jun 2, 2026
1069c3c
ci(plugin-check): revert Node.js to 20 (24 still breaks wp-env)
wzul Jun 2, 2026
89efc95
ci(plugin-check): test Node.js 22
wzul Jun 2, 2026
51efcf8
ci(plugin-check): test Node.js 26
wzul Jun 2, 2026
047586c
ci(plugin-check): use Node.js 22 (highest working version)
wzul Jun 2, 2026
b65bc81
fix(redirect): use wp_redirect for external URLs
wzul Jun 2, 2026
915d3bd
feat(payment): add cancel_redirect to CHIP purchase params
wzul Jun 2, 2026
6c45ba4
feat(settings): add Success URL field
wzul Jun 2, 2026
1b84ebe
feat(settings): organize CHIP settings into sections and update sideb…
wzul Jun 2, 2026
c612d05
docs: fix typos and grammar across project
wzul Jun 2, 2026
897510c
feat(payment): add payment_method_whitelist option for CHIP purchase
wzul Jun 2, 2026
9bd81e7
fix(settings): remove legacy 'razer' from payment method whitelist
wzul Jun 2, 2026
7d7b958
feat(payment): combine visa/mastercard/maestro into single 'Cards' op…
wzul Jun 2, 2026
e268a95
fix: deployment readiness fixes
wzul Jun 2, 2026
ac22903
chore: restore .vscode/settings.json with WordPress code style
wzul Jun 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Line Endings
* text=auto
*.php text eol=lf
*.js text eol=lf
*.css text eol=lf
*.txt text eol=lf

# Exclude dev files from release zips
*.md export-ignore
CLAUDE.md export-ignore
.claude/ export-ignore
node_modules/ export-ignore
vendor/ export-ignore
composer.lock export-ignore
composer.json export-ignore
package-lock.json export-ignore
package.json export-ignore
.gitignore export-ignore
.gitattributes export-ignore
.github/ export-ignore
.wordpress-org/ export-ignore

# Binary files
*.png binary
*.jpg binary
*.woff2 binary

# WordPress.org SVN / release zip: exclude tests and dev config
/tests/ export-ignore
phpunit.xml export-ignore
phpunit.xml.dist export-ignore
/scripts/ export-ignore
phpcs.xml export-ignore
.dockerignore export-ignore
.phpunit.result.cache export-ignore
.wp-env.json export-ignore
238 changes: 238 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,238 @@
name: Deploy to WordPress.org

on:
workflow_dispatch:
inputs:
stage:
description: 'Deployment stage'
required: true
default: 'trunk'
type: choice
options:
- trunk
- release
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+'

jobs:
deploy:
name: Deploy to WordPress.org SVN
runs-on: ubuntu-latest
environment: wordpress-org

steps:
- name: Checkout
uses: actions/checkout@v6

- name: Prepare plugin folder
run: |
mkdir -p dist/chip-for-givewp
git archive HEAD | tar -x -C dist/chip-for-givewp
echo "✅ Plugin folder prepared"
ls -la dist/chip-for-givewp/

- name: Determine stage and version
id: vars
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
STAGE="${{ github.event.inputs.stage }}"
else
STAGE="release"
fi
echo "stage=$STAGE" >> "$GITHUB_OUTPUT"

if [ "$STAGE" = "release" ] && [ "${{ github.event_name }}" = "push" ]; then
# GiveWP historically uses plain tags (1.2.1); support both v1.2.1 and 1.2.1.
TAG_NAME="${GITHUB_REF##*/}"
VERSION="${TAG_NAME#v}"
else
VERSION=$(grep "Version:" chip-for-givewp.php | head -1 | awk '{print $3}')
fi
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "📦 Stage: $STAGE"
echo "📦 Version: $VERSION"

- name: Install SVN
run: sudo apt-get install -y subversion

- name: Revert stable tag for trunk deploy
if: steps.vars.outputs.stage == 'trunk'
run: |
# For trunk testing, keep Stable tag pointing to the version currently
# live on WordPress.org (source of truth from SVN trunk readme.txt).
svn export --force \
--username "${{ secrets.SVN_USERNAME }}" \
--password "${{ secrets.SVN_PASSWORD }}" \
--non-interactive \
"https://plugins.svn.wordpress.org/chip-for-givewp/trunk/readme.txt" \
/tmp/svn-readme.txt >/dev/null 2>&1 || true

if [ -f /tmp/svn-readme.txt ]; then
CURRENT_STABLE=$(grep -m1 "^Stable tag:" /tmp/svn-readme.txt | awk '{print $3}')
fi

if [ -n "${CURRENT_STABLE:-}" ]; then
echo "🧪 Trunk mode: keeping Stable tag at ${CURRENT_STABLE}"
sed -i "s/^Stable tag: .*/Stable tag: ${CURRENT_STABLE}/" dist/chip-for-givewp/readme.txt
grep "^Stable tag:" dist/chip-for-givewp/readme.txt
rm -f /tmp/svn-readme.txt
else
echo "⚠️ Could not read current stable tag from SVN; leaving as-is"
fi

- name: Sparse-checkout SVN (trunk + assets only)
env:
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
run: |
# Checkout only the repo root skeleton (no tag history)
svn checkout --depth=empty \
--username "$SVN_USERNAME" \
--password "$SVN_PASSWORD" \
--non-interactive \
https://plugins.svn.wordpress.org/chip-for-givewp/ \
svn-repo

cd svn-repo
svn update --set-depth=infinity trunk
svn update --set-depth=infinity assets
cd ..
echo "✅ Sparse-checkout complete"

- name: Update trunk
run: |
# Clear existing files in trunk (preserve .svn metadata)
cd svn-repo/trunk
find . -type f -not -path './.svn/*' -delete 2>/dev/null || true
find . -mindepth 1 -type d -not -path './.svn*' -empty -delete 2>/dev/null || true
cd ../..

# Copy new files into trunk
rsync -av \
--exclude='.git*' \
--exclude='.github' \
--exclude='ci-build' \
--exclude='dist' \
--exclude='node_modules' \
--exclude='.wordpress-org' \
dist/chip-for-givewp/ \
svn-repo/trunk/

- name: Sync WordPress.org assets
run: |
if [ -d ".wordpress-org" ]; then
echo "📁 Syncing WordPress.org directory assets..."
cd svn-repo/assets
find . -type f -not -path './.svn/*' -delete 2>/dev/null || true
cd ../..
rsync -av .wordpress-org/ svn-repo/assets/
else
echo "ℹ️ No .wordpress-org directory found; skipping assets sync."
fi

- name: Commit trunk only (test stage)
if: steps.vars.outputs.stage == 'trunk'
env:
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
run: |
cd svn-repo
svn add --force . > /dev/null 2>&1 || true
svn status | grep '^!' | sed 's/^! *//' | while read -r f; do
svn delete "$f" --force
done
svn commit \
-m "Update trunk to ${{ steps.vars.outputs.version }} for testing" \
--username "$SVN_USERNAME" \
--password "$SVN_PASSWORD" \
--non-interactive
echo "✅ Deployed trunk for testing. Stable tag unchanged."

- name: Create SVN tag and release
if: steps.vars.outputs.stage == 'release'
env:
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
run: |
VERSION="${{ steps.vars.outputs.version }}"
cd svn-repo

# Add new files
svn add --force . > /dev/null 2>&1 || true

# Remove deleted files
svn status | grep '^!' | sed 's/^! *//' | while read -r f; do
svn delete "$f" --force
done

# Check for duplicate tag
if svn ls \
--username "$SVN_USERNAME" \
--password "$SVN_PASSWORD" \
--non-interactive \
"https://plugins.svn.wordpress.org/chip-for-givewp/tags/$VERSION" >/dev/null 2>&1; then
echo "❌ Tag $VERSION already exists in SVN. Aborting."
exit 1
fi

# Commit trunk + assets first, then create tag from the new HEAD
svn commit \
-m "Release $VERSION" \
--username "$SVN_USERNAME" \
--password "$SVN_PASSWORD" \
--non-interactive

svn cp \
--username "$SVN_USERNAME" \
--password "$SVN_PASSWORD" \
--non-interactive \
"https://plugins.svn.wordpress.org/chip-for-givewp/trunk" \
"https://plugins.svn.wordpress.org/chip-for-givewp/tags/$VERSION" \
-m "Create tag $VERSION"
echo "🏷️ Created tag $VERSION"

echo "✅ Released $VERSION to WordPress.org"

- name: Create release zip
if: steps.vars.outputs.stage == 'release'
run: |
cd dist
zip -r ../chip-for-givewp.zip chip-for-givewp
cd ..
echo "✅ Created release zip"

- name: Extract changelog for release notes
if: steps.vars.outputs.stage == 'release'
run: |
VERSION="${{ steps.vars.outputs.version }}"

# Extract the latest changelog entry from changelog.txt (portable awk)
awk '/^== Changelog ==/ { getline; getline; print; while (getline > 0 && NF > 0) print }' changelog.txt > release_notes.md

echo "📝 Release notes from changelog:"
cat release_notes.md

- name: Create or update GitHub release
if: steps.vars.outputs.stage == 'release'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
VERSION="${{ steps.vars.outputs.version }}"
TAG="v${VERSION}"
if gh release view "$TAG" > /dev/null 2>&1; then
gh release edit "$TAG" --notes-file release_notes.md
echo "✅ Updated existing release"
else
gh release create "$TAG" --title "v${VERSION}" --notes-file release_notes.md
echo "✅ Created new release"
fi

- name: Upload release asset to GitHub
if: steps.vars.outputs.stage == 'release'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
TAG="v${{ steps.vars.outputs.version }}"
gh release upload "$TAG" chip-for-givewp.zip --clobber || true
Loading