Skip to content

Commit

Permalink
Merge pull request #39 from juanfra/try/fix-theme-preview-link
Browse files Browse the repository at this point in the history
  • Loading branch information
bgrgicak authored Oct 18, 2024
2 parents b63be11 + 8ac4a97 commit 79445f5
Show file tree
Hide file tree
Showing 7 changed files with 756 additions and 723 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ preview-theme-changes:
| `base-branch` | The branch to compare against | Yes | `main` |
| `single-theme` | Whether the repository contains a single theme | No | `false` |
| `theme-dir` | The directory where themes are stored | No | `.` |

| `wp-version` | The WordPress version to use | No | `` |
| `php-version` | The PHP version to use | No | `` |

## Development

Expand Down
4 changes: 3 additions & 1 deletion __tests__/create-preview-links.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ You can preview these changes by following the links below:
- [Preview changes for **theme1**](https://playground.wordpress.net/#{"steps":[{"step":"login","username":"admin","password":"password"},{"step":"installTheme","themeZipFile":{"resource":"url","url":"https://github-proxy.com/proxy.php?action=partial&repo=Automattic/themes&directory=dir1&branch=branch-name"}},{"step":"activateTheme","themeFolderName":"dir1"}]})
I will update this comment with the latest preview links as you push more changes to this PR.
**⚠️ Note:** The preview sites are created using [WordPress Playground](https://wordpress.org/playground/). You can add content, edit settings, and test the themes as you would on a real site, but please note that changes are not saved between sessions.
> [!NOTE]
> The preview sites are created using [WordPress Playground](https://wordpress.org/playground/). You can add content, edit settings, and test the themes as you would on a real site, but please note that changes are not saved between sessions.
`;

expect(mockGithub.rest.issues.createComment).toHaveBeenCalledWith({
Expand Down
10 changes: 9 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ inputs:
github-token:
description: 'GitHub token'
required: true
ref:
ref:
description: 'git ref SHA'
required: true
default: 'HEAD'
Expand All @@ -20,6 +20,14 @@ inputs:
description: 'The directory themes are stored'
required: false
default: "."
wp-version:
description: 'The WordPress version to use'
required: false
default: ""
php-version:
description: 'The PHP version to use'
required: false
default: ""
runs:
using: 'node20'
main: 'dist/index.js'
Loading

0 comments on commit 79445f5

Please sign in to comment.