[webhooks] configurable action keywords#41
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughWebhook handling now supports configurable commit-message keywords that map task references to status transitions. Configuration, parser validation and matching, error definitions, and webhook service initialization are updated. ChangesConfigurable webhook parsing
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant WebhookService
participant KeywordParser
participant TaskReferences
WebhookService->>KeywordParser: ParseCommitMessage(commit message)
KeywordParser->>TaskReferences: Extract keyword-qualified and bare task references
KeywordParser-->>WebhookService: Return ParsedReference entries with actions
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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. Comment |
🤖 Pull request artifacts
|
|
@coderabbitai full review |
✅ Action performedFull review finished. Your plan includes PR reviews subject to rate limits. More reviews will be available in 44 minutes. |
|
@coderabbitai full review |
✅ Action performedFull review finished. Your plan includes PR reviews subject to rate limits. More reviews will be available in 45 minutes. |
|
@coderabbitai full review |
✅ Action performedFull review finished. Your plan includes PR reviews subject to rate limits. More reviews will be available in 38 minutes. |
|
@coderabbitai full review |
✅ Action performedFull review finished. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@internal/webhooks/parser.go`:
- Around line 41-42: Validate entries in NewKeywordParser before compiling
patterns, rejecting or skipping any keyword whose string is empty after
normalization. Ensure empty keywords cannot produce regex alternatives or
receive an action, while preserving existing handling for valid keywords.
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: e252844d-3466-4ddc-9218-a09ebf7b62e5
📒 Files selected for processing (8)
.env.exampleinternal/config/config.gointernal/config/module.gointernal/webhooks/config.gointernal/webhooks/domain.gointernal/webhooks/errors.gointernal/webhooks/parser.gointernal/webhooks/service.go
63e1976 to
ac9d0a6
Compare
ac9d0a6 to
8039697
Compare
8039697 to
972be95
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 @.env.example:
- Around line 249-260: Set WEBHOOKS__ACTION_KEYWORDS in .env.example to the
documented default JSON object instead of leaving it empty, preserving all
listed keyword-to-status transitions and optional verbs so copied environments
retain the built-in webhook behavior.
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 6a1746aa-cbe7-45a6-8cb9-cb09a2cd59e0
📒 Files selected for processing (8)
.env.exampleinternal/config/config.gointernal/config/module.gointernal/webhooks/config.gointernal/webhooks/domain.gointernal/webhooks/errors.gointernal/webhooks/parser.gointernal/webhooks/service.go
🚧 Files skipped from review as they are similar to previous changes (7)
- internal/webhooks/errors.go
- internal/config/module.go
- internal/webhooks/config.go
- internal/webhooks/domain.go
- internal/config/config.go
- internal/webhooks/service.go
- internal/webhooks/parser.go
Summary by CodeRabbit
WEBHOOKS__ACTION_KEYWORDSto configure commit-message keywords (with status-driven transitions) for webhook automation.#<number>references, and deduplicates references by task number.WEBHOOKS__SECRET.