Managing pull requests
Skill pvnarp/harness-agentic-skills/skills/harness/managing-pull-requests
Manage Harness Code pull requests via MCP. List, get, create, update, close, and merge PRs; list and add reviewers; create/update/delete inline comments; check CI checks; and view activity timelines (comments, reviews, status changes). Use when asked to open a PR, merge a PR, request reviewers, comment on a PR, check PR status, list PRs by state, or audit PR activity. Trigger phrases: pull request, PR, open a PR, merge PR, request review, PR comment, PR checks, PR activity, code review, pull-request reviewer.From its SKILL.md
npx -y skills add pvnarp/harness-agentic-skills --skill managing-pull-requestsAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its file declares
Copied from the file, not written here
The file declares its own license as Apache-2.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
6.7 KB, as published. Nobody here has run it
Manage Pull Requests
What this skill uses
Harness MCP tools: harness:harness_create, harness:harness_execute, harness:harness_get, harness:harness_list, harness:harness_update
Resource types: pr_activity, pr_check, pr_comment, pr_reviewer, pull_request, repository
Drive the full pull request lifecycle in Harness Code via MCP. Identifier convention: PRs are addressed by repo_id + pr_number. If the user pastes a Harness UI PR URL, use it directly as the url parameter - identifiers auto-extract.
Instructions
Step 1: Resolve the repository
If the user did not provide a repo_id, list repositories and confirm:
Call MCP tool: harness:harness_list
Parameters:
resource_type: "repository"
org_id: "<org>"
project_id: "<project>"
filters:
query: "<keyword>"
Step 2: List or get a PR
List by state:
Call MCP tool: harness:harness_list
Parameters:
resource_type: "pull_request"
params:
repo_id: "<repo_id>"
filters:
state: "open" # or "closed", "merged"
query: "<keyword>"
Get a specific PR:
Call MCP tool: harness:harness_get
Parameters:
resource_type: "pull_request"
params:
repo_id: "<repo_id>"
pr_number: 42
Or paste a UI URL:
Call MCP tool: harness:harness_get
Parameters:
url: "https://app.harness.io/.../code/.../repos/<repo>/pulls/42"
Step 3: Create a PR
Required body fields: title, source_branch, target_branch. Optional: description (markdown).
Call MCP tool: harness:harness_create
Parameters:
resource_type: "pull_request"
params:
repo_id: "<repo_id>"
body:
title: "Add foo endpoint"
source_branch: "feature/foo"
target_branch: "main"
description: |
Adds a new GET /foo endpoint with input validation.
Step 4: Update or close a PR
Update title, description, or state:
Call MCP tool: harness:harness_update
Parameters:
resource_type: "pull_request"
params:
repo_id: "<repo_id>"
pr_number: 42
body:
title: "Add foo endpoint with metrics"
description: "Updated description"
Close (without merging):
Call MCP tool: harness:harness_execute
Parameters:
resource_type: "pull_request"
action: "close"
params:
repo_id: "<repo_id>"
pr_number: 42
Step 5: Merge a PR
Merge methods: merge, squash, rebase, fast-forward. Use dry_run: true first to validate.
Call MCP tool: harness:harness_execute
Parameters:
resource_type: "pull_request"
action: "merge"
params:
repo_id: "<repo_id>"
pr_number: 42
body:
method: "squash"
delete_source_branch: true
dry_run: false
Step 6: Reviewers
List reviewers:
Call MCP tool: harness:harness_list
Parameters:
resource_type: "pr_reviewer"
params:
repo_id: "<repo_id>"
pr_number: 42
Add a reviewer:
Call MCP tool: harness:harness_create
Parameters:
resource_type: "pr_reviewer"
params:
repo_id: "<repo_id>"
pr_number: 42
body:
reviewer_id: "<user_id>"
Submit a review (approve / request changes / comment):
Call MCP tool: harness:harness_execute
Parameters:
resource_type: "pr_reviewer"
action: "submit_review"
params:
repo_id: "<repo_id>"
pr_number: 42
body:
decision: "approved" # or "changereq", "reviewed"
message: "LGTM"
Step 7: Comments
Create a comment (general or inline on a diff line):
Call MCP tool: harness:harness_create
Parameters:
resource_type: "pr_comment"
params:
repo_id: "<repo_id>"
pr_number: 42
body:
text: "Consider extracting this into a helper."
# Optional inline anchoring:
path: "src/handler.go"
line_start: 47
line_end: 47
Update or delete by comment_id.
Step 8: Checks and activity
CI check status:
Call MCP tool: harness:harness_list
Parameters:
resource_type: "pr_check"
params:
repo_id: "<repo_id>"
pr_number: 42
Full activity timeline (comments, reviews, status changes, label edits):
Call MCP tool: harness:harness_list
Parameters:
resource_type: "pr_activity"
params:
repo_id: "<repo_id>"
pr_number: 42
Examples
- "Open a PR from feature/auth to main titled 'Add SSO'" → harness:harness_create pull_request with body
- "Merge PR 42 with squash and delete the source branch" → harness:harness_execute merge with method=squash, delete_source_branch=true
- "Show me the activity on PR https://app.harness.io/.../pulls/87" → harness:harness_list pr_activity with url
- "Approve PR 19 with a comment 'tested locally'" → harness:harness_execute submit_review on pr_reviewer with decision=approved
- "Why are checks failing on PR 30?" → harness:harness_list pr_check, then drill into failing executions via /debugging-pipelines
Related skills
Prerequisites (skills typically run before this one):
Composes with (skills commonly invoked together):
Follow-ups (skills commonly chained after this one):
Performance Notes
- Listing PRs is paginated; pass
pageandlimitto control. harness:harness_listforpr_activityreturns the full timeline - narrow your audit window if needed before paginating.- A merge
dry_runis a single call and avoids accidental merges.
Troubleshooting
- "repo_id missing" - set
params.repo_idor paste a Harness PR URL intourl. - Merge fails with "conflicts" - Harness Code rejects merges with conflicts. Resolve in the UI or via
/managing-code-repos. - Reviewer add fails with "user not found" - confirm the user is in the project via
/managing-users. - PR state can't be set to "merged" via update - use
harness:harness_executewithaction: "merge"instead. Update only changesopen↔closed.