Guarded GitHub Pull Request Merge
Merge one reviewed GitHub pull request after confirming its identity and merge prerequisites.
@Aident5,973304Updated Aug 12, 2026
Works with
name: guarded-github-pull-request-merge description: "Merge one reviewed GitHub pull request after confirming its identity and merge prerequisites."
Guarded GitHub Pull Request Merge
Merge one reviewed GitHub pull request after confirming its identity and merge prerequisites.
Required Aident Actions
- <action-tag>composio:github_tools:github_get_a_pull_request</action-tag> (required inputs: repo, owner, pull_number): Retrieves a specific pull request from a GitHub repository using its owner, repository name, and pull request number.
- <action-tag>composio:github_tools:github_get_pull_request_review_protection</action-tag> (required inputs: repo, owner, branch): Retrieves the pull request review protection settings for a specific branch in a GitHub repository, if such protection is configured.
- <action-tag>composio:github_tools:github_list_status_check_contexts</action-tag> (required inputs: repo, owner, branch): Fetches all required status check contexts for a protected branch; returns an empty list if Action · Get A Pull Requestosio:github_tools:github_list_reviews_for_a_pull_request</action-tag> (required inputs: repo, owner, pull_number): Lists submitted reviews chronologically for a speciAction · Get Pull Request Review Protectionlist_check_runs_for_a_ref</action-tag> (required inputs: ref, repo, owner): List GitHub check runs for a commit SHA, branch, or tag to assess CI status and conclusions. Use whenAction · List Status Check Contextsmposio:github_tools:github_get_commit_statuses</action-tag> (required inputs: ref, repo, owner): List all statuses for a commit reference (SHA, branch, or tag) in reverse chronological ordeAction · List Reviews For A Pull Requestc commit.
- <action-tag>composio:github_tools:github_merge_a_pull_request</action-tag> (required inputs: repo, owner, pull_number): Merges an opAction · List Check Runs For A Refle reasons: (1) The PR is still in draft mode - convert it to ready-for-review first using GITHUB_UPDATE_A_PULL_REQUEST. (2)...
Use Aident Loadout to read the current Action schema before constructing inpAction · Get Commit Statusesion is billable or mutating, run Aident preflight, show the affected target and quoted cost or risk, and wait for explicit user confirmation before execution.
Workflow
- Confirm the requested outcome, source material, desAction · Merge A Pull Requestrce-derived guidance below to create a concrete plan. Resolve ambiguity before invoking an Action.
- Select only the Aident Actions whose documented effect directly advances the requested outcome. Do not invoke every listed Action by default.
- Inspect the current schema and prepare the minimum valid input for each selected Action.
- Preflight each selected Action. Execute it only after any required confirmation, in dependency order, and carry returned IDs or asset URLs into later steps.
- Verify the returned IDs, URLs, statuses, or artifacts against the acceptance criteria. Report partial completion precisely and do not repeat paid or mutating calls blindly.
Source-Derived Guidance
- Use composio:github_tools:github_get_a_pull_request to confirm repository, pull request number, open state, draft state, base branch, and head SHA.
- Use composio:github_tools:github_get_pull_request_review_protection and composio:github_tools:github_list_status_check_contexts on the base branch to resolve the required approval count and status contexts.
- Fully paginate composio:github_tools:github_list_reviews_for_a_pull_request, composio:github_tools:github_list_check_runs_for_a_ref, and composio:github_tools:github_get_commit_statuses with the captured head SHA to verify approvals, Checks API runs, and legacy commit-status contexts.
- Stop if the pull request is draft, stale, closed, has failing or pending checks, or is missing required approvals.
- Present the exact repository, pull request, head SHA, and merge strategy for confirmation before using composio:github_tools:github_merge_a_pull_request once with the captured head SHA as sha.
Execution Boundaries
- Treat upstream provider-specific commands as background knowledge only. Execute the workflow through the exact Aident Actions above.
- Never request raw credentials in chat. Use Aident Vault connection flows for required accounts.
- Preserve user-provided wording, brand constraints, rights restrictions, and target identifiers. Do not invent authorization.
- Read current state before a mutation, state the exact target, and include a rollback or recovery step in the result.
- Stop when a required integration is disconnected, preflight rejects the input, the target is ambiguous, or the user declines a required confirmation.
Output
Return the execution plan, selected Action names, confirmed targets, Aident result identifiers or asset URLs, verification evidence, and any remaining blocked step.
Attribution
This Skill adapts the reviewed upstream workflow. See for the pinned source and for the preserved license.