agentsclimarketplace

Manage pull requests

Skill ThomasVitale/agents-skills-oci-artifacts-spec/examples/skills/manage-pull-requests

Standard method for packaging, distributing, signing, and tracking Agent Skills using OCI Artifacts.

Install
npx -y skills add ThomasVitale/agents-skills-oci-artifacts-spec --skill manage-pull-requests

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 13 stars13 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.

SKILL.md

3.9 KB, as published. Nobody here has run it

Manage Pull Requests

Overview

This skill enables agents to automate pull request (PR) management in Forgejo repositories using the forgejo-cli tool. It supports common PR operations, making it ideal for CI/CD pipelines, code reviews, and team collaboration workflows.


Instructions

Prerequisites

  • forgejo-cli must be installed and configured with Forgejo API credentials.
  • The agent must have access to the target repository.

Supported Actions

  • List PRs: Fetch all open PRs for a repository.
  • View PR: Retrieve details of a specific PR.
  • Create PR: Open a new PR from a branch or fork.
  • Merge PR: Merge an approved PR into the target branch.
  • Close PR: Close a PR without merging.
  • Comment on PR: Add or update comments on a PR.

Parameters

Input Format

All actions require a JSON object with the following structure:

{
  "action": "<action>",
  "repo": "<owner/repo>",
  [ "pr_id": "<pr-id>", ]
  [ "branch": "<source-branch>", ]
  [ "target_branch": "<target-branch>", ]
  [ "title": "<pr-title>", ]
  [ "description": "<pr-description>", ]
  [ "comment": "<comment-text>", ]
  [ "force": <boolean> ]
}

Action-Specific Parameters

ActionRequired ParametersOptional Parameters
listrepo
viewrepo, pr_id
createrepo, branch, titletarget_branch, description
mergerepo, pr_idforce
closerepo, pr_id
commentrepo, pr_id, comment

Examples

1. List all open PRs

Input:

{
  "action": "list",
  "repo": "owner/repo"
}

Output: List of open PRs with their IDs, titles, and authors.


2. Create a new PR

Input:

{
  "action": "create",
  "repo": "owner/repo",
  "branch": "feature/new-feature",
  "target_branch": "main",
  "title": "Add new feature",
  "description": "This PR introduces a new feature."
}

Output: Confirmation of PR creation with PR ID.


3. Merge a PR

Input:

{
  "action": "merge",
  "repo": "owner/repo",
  "pr_id": "123",
  "force": false
}

Output: Confirmation of merge or error if PR cannot be merged.


4. Add a comment to a PR

Input:

{
  "action": "comment",
  "repo": "owner/repo",
  "pr_id": "123",
  "comment": "Please review the changes."
}

Output: Confirmation of comment added.


Error Handling

  • If forgejo-cli is not found:

    "Error: forgejo-cli is required but not installed. Install it from [forgejo-cli wiki](https://codeberg.org/forgejo-contrib/forgejo-cli/wiki/PRs)."

  • If the repository or PR ID is invalid:

    "Error: Invalid repository or PR ID."

  • For CLI errors:

    Return the raw error message from forgejo-cli.


References

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.