Skip to content

Webhooks V2#280

Open
danciaclara wants to merge 4 commits into
masterfrom
update-webhooks
Open

Webhooks V2#280
danciaclara wants to merge 4 commits into
masterfrom
update-webhooks

Conversation

@danciaclara
Copy link
Copy Markdown
Collaborator

@danciaclara danciaclara commented May 28, 2026

Description

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Improvement (change that would cause existing functionality to not work as expected)
  • Code refactoring
  • Performance improvements
  • Documentation update

Screenshots and Media (if applicable)

Test Scenarios

References

Summary by CodeRabbit

  • Documentation
    • Complete Webhooks v2 documentation covering workspace-scoped behaviors and payload structure
    • V1 to V2 migration guide with payload comparison and differences
    • Webhook creation workflow, management operations, and configuration guidance
    • Security guidance for HMAC-SHA256 signing and body verification
    • Delivery semantics, retry behavior specifications, and monitoring guidelines

@vercel
Copy link
Copy Markdown

vercel Bot commented May 28, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
developer-docs Ready Ready Preview, Comment Jun 4, 2026 9:56am

Request Review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 28, 2026

Review Change Stack

Warning

Review limit reached

@danciaclara, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 56 minutes and 3 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 24360c8e-bfaa-4c44-bffd-7eb673bd08c6

📥 Commits

Reviewing files that changed from the base of the PR and between e01aaa0 and 81d9d8c.

📒 Files selected for processing (1)
  • docs/dev-tools/intro-webhooks.md
📝 Walkthrough

Walkthrough

This pull request rewrites the Plane webhooks documentation to focus on v2 specifications and workspace-scoped webhooks. It covers creation workflow, work-item filtering modes (Basic and PQL), webhook lifecycle management, HMAC-SHA256 request security, asynchronous delivery with retry semantics, and comprehensive event/payload reference with JSON examples.

Changes

Webhooks v2 Complete Documentation

Layer / File(s) Summary
Webhooks v2 Introduction and v1 Migration Guide
docs/dev-tools/intro-webhooks.md
Documentation introduces Plane Webhooks v2 as workspace-scoped resources, explains v1 deprecation, and provides step-by-step v1-to-v2 migration procedure with warning callout.
Creating Webhooks: URL, Secret Key, and Configuration
docs/dev-tools/intro-webhooks.md
Rewritten "Creating a webhook" section documents UI workflow for entering webhook title and URL, URL constraint validation, configuration item meanings, and one-time visibility of secret key with CSV download option.
Work-Item Filtering: Basic and PQL Modes
docs/dev-tools/intro-webhooks.md
Documents how work-item filtering operates at delivery time, contrasts Basic filter mode with PQL mode, provides instructions for adding filters in the UI, defines supported PQL fields (title, status, priority, assignees, labels), and specifies PQL expression syntax with examples.
Webhook Lifecycle Management: Disable, Delete, Edit, Regenerate
docs/dev-tools/intro-webhooks.md
Expands webhook management with distinct disable (temporary pause) vs delete (permanent removal) semantics and procedures for editing, enabling/disabling, deleting, viewing/copying the secret key, and regenerating the secret key with implications.
Securing Requests with HMAC-SHA256 Signatures
docs/dev-tools/intro-webhooks.md
Replaces prior signature guidance with v2-focused "Securing requests" section explaining mandatory request signing, HMAC-SHA256 verification using raw request bytes with constant-time comparison, X-Plane-Signature header format and purpose, and UI access to full secret key.
Asynchronous Delivery, Retry Semantics, and Monitoring
docs/dev-tools/intro-webhooks.md
Updates delivery documentation to specify async delivery model, retry rules (exponential backoff up to ~10 minutes, 2xx success definition, 4xx no-retry cutoff, auto-disable on repeated failure), and how to read delivery logs including statistics and per-attempt fields.
Event Reference, Request Headers, and Payload Schema
docs/dev-tools/intro-webhooks.md
Replaces limited event list with comprehensive event reference table organized by resource groups (projects, cycles, modules, milestones, pages, comments, work items) using dot-notation keys; adds definitive "Request headers" section listing mandatory headers (X-Plane-Delivery, X-Plane-Event, X-Plane-Signature); defines v2 top-level payload schema (versioning, delivery/event/entity identifiers, data, previous_attributes) and field meanings.
v2 Payload Examples: Multiple Event Types
docs/dev-tools/intro-webhooks.md
Replaces older payload examples with new v2 JSON examples covering multiple event types (work item create/update, project update, comment create), demonstrating data structure, presence/shape of data and previous_attributes fields for reference.

🎯 3 (Moderate) | ⏱️ ~18 minutes

🐰 Webhooks were sleeping in the dust,
Now they wake with v2 trust!
Signing requests with crypto-flair,
Async magic fills the air. 🎉

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'Webhooks V2' clearly and concisely identifies the main change: comprehensive documentation updates for Webhooks V2, including migration from v1, security details, and expanded event reference.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch update-webhooks

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Comment thread docs/dev-tools/intro-webhooks.md Outdated
project_id = "<project-uuid>" Specific project
```

## Securing requests
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can move this to or nearby delivery and monitoring section

Whenever an issue is added to the module, the corresponding issue webhook will be triggered. Similarly, any updates made to the cycle issue will also activate the issue webhook.
:::
**workitem.link.created**

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's add a workitem.updated event as sample as it has previous_attributes also

{
   "version":"v2",
   "delivery_id":"2a0d0510-9052-446e-a1c7-a704bbd68cba",
   "event_id":"9d508cd9-36c2-44a5-928d-7ee2f2a3b8a8",
   "entity_id":"775c5716-5302-4617-bb9f-2cd843911268",
   "entity_type":"issue",
   "event":"WebhookScope.ScopeChoices.WORK_ITEM_UPDATED",
   "webhook_id":"8944ed18-1331-4eae-b9bb-7c40864b8abd",
   "workspace_id":"b54ecb0d-e3eb-4986-b238-f83fd8665e65",
   "data":{
      "id":"775c5716-5302-4617-bb9f-2cd843911268",
      "name":"webhook test 3",
      "point":"None",
      "type_id":"None",
      "is_draft":false,
      "priority":"none",
      "state_id":"067b88e5-304b-4221-ba09-94340dcc36e5",
      "label_ids":[],
      "parent_id":"None",
      "created_at":"2026-03-31T11:44:41.249292+00:00",
      "deleted_at":"None",
      "project_id":"59e3be42-87ec-4950-99a3-ae639cf2b089",
      "sort_order":75535,
      "start_date":"None",
      "updated_at":"2026-03-31T11:44:41.249304+00:00",
      "archived_at":"None",
      "external_id":"None",
      "sequence_id":3,
      "target_date":"None",
      "assignee_ids":[ ],
      "completed_at":"None",
      "workspace_id":"b54ecb0d-e3eb-4986-b238-f83fd8665e65",
      "created_by_id":"754009ab-3fb5-424e-909a-b46e9c9d0c4f",
      "updated_by_id":"None",
      "external_source":"None",
      "description_json":{},
      "last_activity_at":"2026-03-31T11:44:41.346305+00:00",
      "estimate_point_id":"None"
   },
   "previous_attributes":{
      "last_activity_at":"2026-03-31 11:44:41.242868+00"
   }
}


Webhooks in Plane work at the workspace level. A single webhook can subscribe to events from every project in the workspace. There is no per-project webhook configuration. Only Workspace Owners and Admins can create or manage them.

The current webhook system is v2. V2 payloads use dot-notation event names (e.g., `workitem.created`) and include structured fields for deduplication, diffing, and filtering that were not available in the original version. If you have webhooks created before v2, they appear in the list with a **(deprecated)** tag. They still deliver but do not receive any v2 fields. Recreate them as new webhooks to get the full v2 feature set.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can highlight about v1 deprecation and how to switch to v2 as it needs some attention

Copy link
Copy Markdown
Collaborator Author

@danciaclara danciaclara Jun 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you mean as callout @Saurabhkmr98 or you want to add more information to this? i have updated that area. check again

Copy link
Copy Markdown
Member

@Saurabhkmr98 Saurabhkmr98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

somethings that we can improve

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/dev-tools/intro-webhooks.md (1)

1-426: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Prettier CI is currently failing for this file and must be fixed before merge.

CI / Prettier reports --check failure on docs/dev-tools/intro-webhooks.md. Please run Prettier and commit the formatted output so the pipeline is green.

As per coding guidelines, "**/*.{ts,tsx,js,jsx,vue,json,md,mts}: Prettier formatting checks must pass in CI, with 120 character line width, 2-space indent, semicolons, double quotes, and ES5 trailing commas".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/dev-tools/intro-webhooks.md` around lines 1 - 426, Prettier check is
failing for docs/dev-tools/intro-webhooks.md; run Prettier with the repo's
formatting rules (120 char printWidth, 2-space indent, semicolons, double
quotes, trailingComma: "es5") on that markdown file (or run the project's
preconfigured formatter script), stage the updated
docs/dev-tools/intro-webhooks.md and commit the formatted output so CI Prettier
--check passes.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/dev-tools/intro-webhooks.md`:
- Around line 380-390: The example payload labeled workitem.link.updated is
inconsistent with the v2 contract: replace the current event value
WebhookScope.ScopeChoices.WORK_ITEM_UPDATED and the entity_type "issue" with the
v2 event key and matching entity semantics (set "event" to
"workitem.link.updated" and use the v2 entity name for links, e.g.,
"entity_type": "workitem_link"), ensure the entity_id refers to the link
resource id (not an issue id), keep "version":"v2" and valid UUIDs for
delivery_id/event_id/webhook_id, and remove the non-dot-notation enum reference
so the JSON matches the documented v2 schema.
- Around line 103-109: The fenced code block under "Expression syntax"
containing lines like priority = "urgent", priority in ["urgent", "high"],
state_group = "started", assignee_id = "<user-uuid>", and project_id =
"<project-uuid>" lacks a language identifier; add a language tag (e.g., ```text)
to the opening fence so the block becomes ```text to satisfy markdown linting.

---

Outside diff comments:
In `@docs/dev-tools/intro-webhooks.md`:
- Around line 1-426: Prettier check is failing for
docs/dev-tools/intro-webhooks.md; run Prettier with the repo's formatting rules
(120 char printWidth, 2-space indent, semicolons, double quotes, trailingComma:
"es5") on that markdown file (or run the project's preconfigured formatter
script), stage the updated docs/dev-tools/intro-webhooks.md and commit the
formatted output so CI Prettier --check passes.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8a39cbcd-254a-4601-80ba-bd6a70e8a49d

📥 Commits

Reviewing files that changed from the base of the PR and between 3b1d721 and e01aaa0.

📒 Files selected for processing (2)
  • docs/dev-tools/intro-webhooks.md
  • docs/public/images/webhooks/create-webhook.webp

Comment on lines +103 to 109
```
priority = "urgent" Single value
priority in ["urgent", "high"] Multiple values
state_group = "started" State group match
assignee_id = "<user-uuid>" Specific assignee
project_id = "<project-uuid>" Specific project
```
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add a language identifier to the fenced code block.

The block under Expression syntax should specify a language (e.g., text) to satisfy markdown linting.

Suggested patch
-```
+```text
 priority = "urgent"                         Single value
 priority in ["urgent", "high"]              Multiple values
 state_group = "started"                     State group match
 assignee_id = "<user-uuid>"                 Specific assignee
 project_id = "<project-uuid>"               Specific project
</details>

<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

```suggestion

🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 103-103: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/dev-tools/intro-webhooks.md` around lines 103 - 109, The fenced code
block under "Expression syntax" containing lines like priority = "urgent",
priority in ["urgent", "high"], state_group = "started", assignee_id =
"<user-uuid>", and project_id = "<project-uuid>" lacks a language identifier;
add a language tag (e.g., ```text) to the opening fence so the block becomes
```text to satisfy markdown linting.

Comment thread docs/dev-tools/intro-webhooks.md Outdated
Comment on lines +380 to +390
**workitem.link.updated**

```json
{
"version":"v2",
"delivery_id":"2a0d0510-9052-446e-a1c7-a704bbd68cba",
"event_id":"9d508cd9-36c2-44a5-928d-7ee2f2a3b8a8",
"entity_id":"775c5716-5302-4617-bb9f-2cd843911268",
"entity_type":"issue",
"event":"WebhookScope.ScopeChoices.WORK_ITEM_UPDATED",
"webhook_id":"8944ed18-1331-4eae-b9bb-7c40864b8abd",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

workitem.link.updated example is internally inconsistent with the documented v2 contract.

This sample mixes incompatible values: heading says workitem.link.updated, but event is WebhookScope.ScopeChoices.WORK_ITEM_UPDATED (non-dot notation and different event), and entity_type is issue. Please replace this with a payload that matches the stated v2 event key and entity semantics.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/dev-tools/intro-webhooks.md` around lines 380 - 390, The example payload
labeled workitem.link.updated is inconsistent with the v2 contract: replace the
current event value WebhookScope.ScopeChoices.WORK_ITEM_UPDATED and the
entity_type "issue" with the v2 event key and matching entity semantics (set
"event" to "workitem.link.updated" and use the v2 entity name for links, e.g.,
"entity_type": "workitem_link"), ensure the entity_id refers to the link
resource id (not an issue id), keep "version":"v2" and valid UUIDs for
delivery_id/event_id/webhook_id, and remove the non-dot-notation enum reference
so the JSON matches the documented v2 schema.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants