Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/test-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
uses: ./actions/setup-wp-env
with:
php: '8.0'
wp: '6.6'
wp: '7.0.1'
active-theme: 'hello-elementor'
themes: |-
https://downloads.wordpress.org/theme/hello-elementor.zip
Expand Down
57 changes: 57 additions & 0 deletions actions/product-pulse/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Product Pulse Action

Uses Cursor Agent to decide whether a merged PR is product-facing, and if so, posts a
user-friendly pulse update to Slack. Ported from the `elementor` and `elementor-pro`
repos so both can share one implementation.

The full prompt (goal, decision criteria, writing style, output format, examples) lives
here in `prompt-template.md` and is shared by every caller. Each consuming repo just
passes its `product-name` (e.g. `"Elementor"` or `"Elementor Pro"`) plus a thin wrapper
workflow that triggers on `pull_request: closed` and calls this action.

## Usage

```yaml
name: Product Pulse

on:
pull_request:
types: [closed]
branches: [main]

permissions:
pull-requests: read

concurrency:
group: product-pulse-${{ github.repository }}
cancel-in-progress: false

jobs:
product-pulse:
if: github.event.pull_request.merged == true && startsWith(github.repository, 'elementor/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- uses: elementor/elementor-editor-github-actions/actions/product-pulse@main
with:
pr-number: ${{ github.event.pull_request.number }}
product-name: 'Elementor'
cursor-api-key: ${{ secrets.CURSOR_APIKEY }}
slack-token: ${{ secrets.SLACK_TOKEN }}
slack-channel-id: ${{ secrets.SLACK_PULSE_CHANNEL_ID }}
```

## Inputs

| Input | Required | Default | Description |
| ------------------ | -------- | -------------- | ------------------------------------------------ |
| `pr-number` | yes | – | Merged PR number to generate the pulse for |
| `product-name` | yes | – | Product name used in the prompt and Slack header |
| `model` | no | `composer-2.5` | Cursor Agent model used for generation |
| `cursor-api-key` | yes | – | Cursor Agent API key |
| `slack-token` | yes | – | Slack bot token with `chat:write` |
| `slack-channel-id` | yes | – | Slack channel ID for pulse notifications |

The full generic prompt lives in this action's `prompt-template.md` and is rendered
with the caller's `product-name` substituted in before being sent to Cursor Agent.
Loading
Loading