Skip to content
Recued
Menu
← Back to recipes

Bitbucket pull request comment closure watcher

by recued-core v1

Scheduled adopter for Bitbucket pull request comment closure rows seeded by comment-bitbucket-pull-request-with-closure. It lists only Recued-originated pull-request-comment watches, re-reads a bounded batch of Bitbucket pull request, and closes the shared row when Bitbucket reports that pull request merged, declined, or superseded. It can notify the owner on terminal pull request state, but it never creates, updates, approves, requests changes, merges, declines, deletes, resolves, comments on, runs pipelines for, or otherwise mutates Bitbucket pull requests.

Complete workflow

Workflow pack for Recued-created Bitbucket pull request comments. It composes the Bitbucket capability pack with a closure ledger: add one owner-approved top-level comment to an existing Bitbucket pull request, persist only the connection/workspace/repository/pull-request/comment linkage in data.shared, and let a scheduled watcher re-read that exact pull request until Bitbucket reports it merged, declined, or superseded. This pack does not replace Bitbucket pull request comments, native notifications, review approvals, merge or decline controls, branch policies, pipelines, webhooks, or general code review reporting; it adds Recued-visible closure state for pull request comments Recued created.

You are viewing one recipe in this workflow. Installing it opens the complete pack so its other recipes and background automations arrive together.

Bitbucket pull request comment closure watcher
This recipe Background automation

Scheduled adopter for Bitbucket pull request comment closure rows seeded by comment-bitbucket-pull-request-with-closure. It lists only Recued-originated pull-request-comment watches, re-reads a bounded batch of Bitbucket pull request, and closes the shared row when Bitbucket reports that pull request merged, declined, or superseded. It can notify the owner on terminal pull request state, but it never creates, updates, approves, requests changes, merges, declines, deletes, resolves, comments on, runs pipelines for, or otherwise mutates Bitbucket pull requests.

bitbucketpull-requestscommentscode-review
by recued-core pinned v1

Workflow origin for the Bitbucket pull request comment closure loop. It reads one Bitbucket pull request and current comments for context, creates exactly one owner-provided top-level comment through recued-core.bitbucket.pull_request.comment.create, and when the comment succeeds it seeds durable data.shared closure state for bitbucket-pull-request-comment-closure-watcher. It uses deterministic owner-provided copy rather than AI and does not approve, request changes, merge, decline, edit, resolve, delete, update pull request metadata, run pipelines, or otherwise mutate Bitbucket pull requests.

bitbucketpull-requestscommentscode-review
by recued-core pinned v1

Low-frequency timeout role for recued-core/bitbucket-pull-request-comment-closure. It moves a bounded batch of expired rows from active to timed_out, deletes the active copy only after the durable timeout write succeeds, and notifies the owner once per batch.

bitbucketwatchertimeoutowner-review
by recued-core pinned v1

Owner-visible list/close role for recued-core/bitbucket-pull-request-comment-closure. It lists bounded active, timed-out, and closed rows. Supplying a timed-out or closed key deletes only that exact terminal row; active watches cannot be deleted here.

bitbucketwatcherreviewclose
by recued-core pinned v1
View pack details, dependencies, and permissions →
How it works 124 steps

Inspect the data fetches, transforms, gates, and output this recipe runs.

Data fetch
shared_pull_request_watches ?
Process (123 steps)
now date_add
Add 0 days to
watch_rows filter
Filter by condition
watch_rows_for_connection filter
Filter by condition
watch_rows_with_workspace filter
Filter by condition
watch_rows_with_repo filter
Filter by condition
watch_rows_with_pull_request filter
Filter by condition
never_checked_watch_rows filter
Filter by condition
checked_watch_rows filter
Filter by condition
checked_watch_rows_oldest_first sort
Sort by value.last_checked_at
fair_watch_rows flatten
Flatten nested lists in
candidate_rows slice
Take a subset of
batch_count count
Count items in candidate rows
candidate_count count
Count items in watch rows with pull request
has_candidate compare
Check if candidate rows has data
has_connection compare
Check if setting bitbucket has data
skip_pull_request_read any
Check if any of the conditions are true
batch_context_envelopes merge
Combine objects together
batch_contexts map
Extract from each item
pull_request ?
skip: step.skip_pull_request_read equal true
pull_request_live_batch_context pick
Keep only specific fields from
pull_request_batch_context_envelopes merge
Combine objects together
pull_request_batch_contexts map
Extract from each item
state default
Apply default
state_live_batch_context pick
Keep only specific fields from
state_batch_context_envelopes merge
Combine objects together
state_batch_contexts map
Extract from each item
has_pull_request_state compare
Check if item state has data
has_pull_request_state_live_batch_context pick
Keep only specific fields from
has_pull_request_state_batch_context_envelopes merge
Combine objects together
has_pull_request_state_batch_contexts map
Extract from each item
pull_request_merged compare
Check if item state equals MERGED
pull_request_merged_live_batch_context pick
Keep only specific fields from
pull_request_merged_batch_context_envelopes merge
Combine objects together
pull_request_merged_batch_contexts map
Extract from each item
pull_request_declined compare
Check if item state equals DECLINED
pull_request_declined_live_batch_context pick
Keep only specific fields from
pull_request_declined_batch_context_envelopes merge
Combine objects together
pull_request_declined_batch_contexts map
Extract from each item
pull_request_superseded compare
Check if item state equals SUPERSEDED
pull_request_superseded_live_batch_context pick
Keep only specific fields from
pull_request_superseded_batch_context_envelopes merge
Combine objects together
pull_request_superseded_batch_contexts map
Extract from each item
terminal_status any
Check if any of the conditions are true
terminal_status_live_batch_context pick
Keep only specific fields from
terminal_status_batch_context_envelopes merge
Combine objects together
terminal_status_batch_contexts map
Extract from each item
owner_action ternary
Apply ternary
owner_action_live_batch_context pick
Keep only specific fields from
owner_action_batch_context_envelopes merge
Combine objects together
owner_action_batch_contexts map
Extract from each item
skip_close any
Check if any of the conditions are true
skip_close_live_batch_context pick
Keep only specific fields from
skip_close_batch_context_envelopes merge
Combine objects together
skip_close_batch_contexts map
Extract from each item
closed_watch_key replace
Replace text in item watch key
closed_watch_key_live_batch_context pick
Keep only specific fields from
closed_watch_key_batch_context_envelopes merge
Combine objects together
closed_watch_key_batch_contexts map
Extract from each item
close_watch ?
skip: item.skip_close equal true
close_watch_live_batch_context pick
Keep only specific fields from
close_watch_batch_context_envelopes merge
Combine objects together
close_watch_batch_contexts map
Extract from each item
delete_closed_active_watch ?
skip: item.close_watch.ok not_equal true
delete_closed_active_watch_live_batch_context pick
Keep only specific fields from
delete_closed_active_watch_batch_context_envelopes merge
Combine objects together
delete_closed_active_watch_batch_contexts map
Extract from each item
notify_merged_enabled compare
Check if setting notify when merged equals true
notify_merged_enabled_live_batch_context pick
Keep only specific fields from
notify_merged_enabled_batch_context_envelopes merge
Combine objects together
notify_merged_enabled_batch_contexts map
Extract from each item
notify_declined_enabled compare
Check if setting notify when declined equals true
notify_declined_enabled_live_batch_context pick
Keep only specific fields from
notify_declined_enabled_batch_context_envelopes merge
Combine objects together
notify_declined_enabled_batch_contexts map
Extract from each item
notify_superseded_enabled compare
Check if setting notify when superseded equals true
notify_superseded_enabled_live_batch_context pick
Keep only specific fields from
notify_superseded_enabled_batch_context_envelopes merge
Combine objects together
notify_superseded_enabled_batch_contexts map
Extract from each item
should_notify_merged all
Check if all conditions are true
should_notify_merged_live_batch_context pick
Keep only specific fields from
should_notify_merged_batch_context_envelopes merge
Combine objects together
should_notify_merged_batch_contexts map
Extract from each item
should_notify_declined all
Check if all conditions are true
should_notify_declined_live_batch_context pick
Keep only specific fields from
should_notify_declined_batch_context_envelopes merge
Combine objects together
should_notify_declined_batch_contexts map
Extract from each item
should_notify_superseded all
Check if all conditions are true
should_notify_superseded_live_batch_context pick
Keep only specific fields from
should_notify_superseded_batch_context_envelopes merge
Combine objects together
should_notify_superseded_batch_contexts map
Extract from each item
status_should_notify any
Check if any of the conditions are true
status_should_notify_live_batch_context pick
Keep only specific fields from
status_should_notify_batch_context_envelopes merge
Combine objects together
status_should_notify_batch_contexts map
Extract from each item
should_notify all
Check if all conditions are true
should_notify_live_batch_context pick
Keep only specific fields from
should_notify_batch_context_envelopes merge
Combine objects together
should_notify_batch_contexts map
Extract from each item
non_merged_notification_title ternary
Apply ternary
non_merged_notification_title_live_batch_context pick
Keep only specific fields from
non_merged_notification_title_batch_context_envelopes merge
Combine objects together
non_merged_notification_title_batch_contexts map
Extract from each item
notification_title ternary
Apply ternary
notification_title_live_batch_context pick
Keep only specific fields from
notification_title_batch_context_envelopes merge
Combine objects together
notification_title_batch_contexts map
Extract from each item
notify_owner ?
skip: item.should_notify not_equal true
notify_owner_live_batch_context pick
Keep only specific fields from
notify_owner_batch_context_envelopes merge
Combine objects together
notify_owner_batch_contexts map
Extract from each item
refreshed_watch_value merge
Combine objects together
skip: item.delete_closed_active_watch.ok equal true
refreshed_watch_value_live_batch_context pick
Keep only specific fields from
refreshed_watch_value_batch_context_envelopes merge
Combine objects together
refreshed_watch_value_batch_contexts map
Extract from each item
refresh_active_watch ?
skip: item.delete_closed_active_watch.ok equal true
refresh_active_watch_live_batch_context pick
Keep only specific fields from
refresh_active_watch_batch_context_envelopes merge
Combine objects together
refresh_active_watch_batch_contexts map
Extract from each item
closed_batch_rows filter
Filter by condition
refreshed_batch_rows filter
Filter by condition
closed_batch_count count
Count items in closed batch rows
refreshed_batch_count count
Count items in refreshed batch rows
summary to_summary
Format results as a summary card
Settings 6 configurable

Configurable at install. Defaults shown — change them anytime in Recued.

channels setting = in_app
bitbucket setting =
batch limit setting = 5
notify when merged setting = true
notify when declined setting = true
notify when superseded setting = true

Trust & control

What installing this recipe would let it do. Recued grants these permissions at install — review them there before approving.

Where it runs

Device + server Runs on your device (browser) or your server.

Permissions it requires

Send notificationsRead your Bitbucket connection
Declared by the recipe — Recued grants these at install, where you review them before approving.

Data it touches

Warehousedata.shared

About

Tags

bitbucket bitbucketpull-requestscommentscode-reviewdeveloper-workflowclosurenotificationclosed-loopstate:bitbucket-pull-request-comment-closure-watcherpack:bitbucket-pull-request-comment-closure

Details

124 steps 6 configurable settings recipe_id: bitbucket-pull-request-comment-closure-watcher