PHPackages                             conduit-ui/prs - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. conduit-ui/prs

Abandoned → [https://www.github.com/conduit-ui/pr](/?search=https%3A%2F%2Fwww.github.com%2Fconduit-ui%2Fpr)Library[API Development](/categories/api)

conduit-ui/prs
==============

Pull Request operations for the Conduit agent ecosystem

v1.0.0(5mo ago)00[13 issues](https://github.com/conduit-ui/pr/issues)[1 PRs](https://github.com/conduit-ui/pr/pulls)MITPHPPHP ^8.2CI passing

Since Dec 12Pushed 2mo agoCompare

[ Source](https://github.com/conduit-ui/pr)[ Packagist](https://packagist.org/packages/conduit-ui/prs)[ RSS](/packages/conduit-ui-prs/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (7)Used By (0)

PR Automation for Teams That Ship Fast
======================================

[](#pr-automation-for-teams-that-ship-fast)

Stop context-switching between PRs. Start automating approvals, merges, and bulk operations.

Approve, merge, request changes, and manage pull requests at scale with expressive PHP code. Built for teams shipping multiple releases per day.

[![Sentinel Certified](https://camo.githubusercontent.com/a359133d2aec2b4807169a763ddedb325bd0ebc86ca154c70f5c2e107193f92f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f636f6e647569742d75692f70722f676174652e796d6c3f6c6162656c3d53656e74696e656c253230436572746966696564267374796c653d666c61742d737175617265)](https://github.com/conduit-ui/pr/actions/workflows/gate.yml)[![Latest Version](https://camo.githubusercontent.com/5c34c5b081be295f2cf215502d60d00b62480235ef0f7f1255e184a6ea6c2aab/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636f6e647569742d75692f70722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/conduit-ui/pr)[![MIT License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/60c7102cbc935d709b04011ec4477d4431da72bb7c29ae1e5a71ef9d9e7f7415/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636f6e647569742d75692f70722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/conduit-ui/pr)

Installation
------------

[](#installation)

```
composer require conduit-ui/pr
```

Why This Exists
---------------

[](#why-this-exists)

Your team merges 30+ PRs per day. You're manually checking CI status, approving dependency updates, and enforcing review policies. This package automates the repetitive parts so your team can focus on code review that matters.

Quick Start
-----------

[](#quick-start)

```
use ConduitUI\Pr\PullRequest;

// Approve and merge a PR
PullRequest::find('owner/repo', 123)
    ->approve('LGTM! Shipping it.')
    ->merge();

// Auto-merge all passing Dependabot PRs
PullRequest::query('owner/repo')
    ->author('dependabot[bot]')
    ->open()
    ->get()
    ->filter(fn($pr) => $pr->checksPass())
    ->each(fn($pr) => $pr->merge());
```

Core Features
-------------

[](#core-features)

### Review Actions

[](#review-actions)

**Approve PRs**

```
PullRequest::find('owner/repo', 456)
    ->approve('Great work! Tests look good.');
```

**Request Changes**

```
PullRequest::find('owner/repo', 789)
    ->requestChanges('Please add tests for the new feature.');
```

**Add Review Comments**

```
PullRequest::find('owner/repo', 101)
    ->comment('Consider extracting this logic into a separate class.');
```

**Inline Code Comments**

```
PullRequest::find('owner/repo', 202)
    ->addInlineComment(
        path: 'src/Service.php',
        line: 42,
        comment: 'This could cause a race condition'
    );
```

### Merge Operations

[](#merge-operations)

**Simple Merge**

```
$pr = PullRequest::find('owner/repo', 123);
$pr->merge(); // Merge commit (default)
```

**Merge Strategies**

```
$pr->merge(strategy: 'squash'); // Squash and merge
$pr->merge(strategy: 'rebase'); // Rebase and merge
```

**Conditional Merge**

```
$pr = PullRequest::find('owner/repo', 123);

if ($pr->checksPass() && $pr->approved()) {
    $pr->merge();
}
```

### State Management

[](#state-management)

**Close &amp; Reopen**

```
// Close without merging
$pr->close();

// Reopen a closed PR
$pr->reopen();
```

### Advanced Queries

[](#advanced-queries)

**Filter by State**

```
PullRequest::query('owner/repo')
    ->state('open')
    ->get();
```

**Filter by Author**

```
PullRequest::query('owner/repo')
    ->author('username')
    ->get();
```

**Filter by Labels**

```
PullRequest::query('owner/repo')
    ->labels(['ready-to-merge', 'hotfix'])
    ->get();
```

**Sort Results**

```
PullRequest::query('owner/repo')
    ->sort('created', 'desc')
    ->get();
```

**Convenience Methods**

```
// All open PRs
PullRequest::query('owner/repo')->open()->get();

// All closed PRs
PullRequest::query('owner/repo')->closed()->get();

// All merged PRs
PullRequest::query('owner/repo')->merged()->get();
```

Real-World Automation
---------------------

[](#real-world-automation)

### Auto-Merge Dependabot

[](#auto-merge-dependabot)

```
// Run this on a schedule (every 15 minutes)
PullRequest::query('owner/repo')
    ->author('dependabot[bot]')
    ->open()
    ->get()
    ->filter(fn($pr) => $pr->checksPass())
    ->filter(fn($pr) => $pr->title->contains(['patch', 'minor']))
    ->each(function($pr) {
        $pr->approve('Auto-approving passing dependency update');
        $pr->merge(strategy: 'squash');
    });
```

### Enforce Review Policy

[](#enforce-review-policy)

```
// Block merge if not approved by 2+ reviewers
$pr = PullRequest::find('owner/repo', 123);

if ($pr->approvals()->count() < 2) {
    $pr->comment('⚠️ This PR requires 2 approvals before merging.');
    exit(1);
}
```

### Bulk Label Management

[](#bulk-label-management)

```
// Add "shipped" label to all merged PRs from this week
PullRequest::query('owner/repo')
    ->merged()
    ->since(now()->startOfWeek())
    ->get()
    ->each(fn($pr) => $pr->addLabels(['shipped']));
```

### Hotfix Fast-Track

[](#hotfix-fast-track)

```
// Auto-merge hotfixes that pass CI
PullRequest::query('owner/repo')
    ->label('hotfix')
    ->open()
    ->get()
    ->filter(fn($pr) => $pr->checksPass())
    ->each(function($pr) {
        $pr->approve('Hotfix approved via automation');
        $pr->merge(strategy: 'squash');
    });
```

Usage Patterns
--------------

[](#usage-patterns)

### Static API (Recommended)

[](#static-api-recommended)

```
use ConduitUI\Pr\PullRequest;

$pr = PullRequest::find('owner/repo', 123);
$prs = PullRequest::query('owner/repo')->open()->get();
```

### Instance API

[](#instance-api)

```
use ConduitUI\Pr\PullRequestManager;

$manager = new PullRequestManager('owner/repo');
$pr = $manager->find(123);
$prs = $manager->query()->open()->get();
```

Data Objects
------------

[](#data-objects)

All responses return strongly-typed DTOs:

```
$pr->id;              // int
$pr->number;          // int
$pr->title;           // string
$pr->state;           // 'open' | 'closed' | 'merged'
$pr->author;          // User object
$pr->reviewers;       // Collection of User objects
$pr->labels;          // Collection of Label objects
$pr->headBranch;      // string
$pr->baseBranch;      // string
$pr->mergeable;       // bool
$pr->createdAt;       // Carbon instance
$pr->updatedAt;       // Carbon instance
$pr->mergedAt;        // ?Carbon instance
$pr->checksPass();    // bool - All CI checks passing
$pr->approved();      // bool - Has approvals
$pr->approvals();     // Collection of Review objects
```

Configuration
-------------

[](#configuration)

Publish the config file:

```
php artisan vendor:publish --tag="pr-config"
```

Set your GitHub token in `.env`:

```
GITHUB_TOKEN=your-github-token
```

Requirements
------------

[](#requirements)

- PHP 8.2+
- GitHub personal access token with `repo` scope

Testing
-------

[](#testing)

```
composer test
```

Code Quality
------------

[](#code-quality)

```
composer format  # Fix code style
composer analyse # Run static analysis
```

Related Packages
----------------

[](#related-packages)

- [conduit-ui/issue](https://github.com/conduit-ui/issue) - Issue triage automation
- [conduit-ui/repo](https://github.com/conduit-ui/repo) - Repository governance
- [conduit-ui/connector](https://github.com/conduit-ui/connector) - GitHub API transport layer

Enterprise Support
------------------

[](#enterprise-support)

Automating PR workflows across your organization? Contact  for custom solutions including compliance checks, advanced approval rules, and audit logging.

License
-------

[](#license)

MIT License. See [LICENSE](LICENSE.md) for details.

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance81

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

156d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a6bb27de88a541a632427686306c8fc56366d72582f6a3316d20500efe7971f3?d=identicon)[conduit-ui](/maintainers/conduit-ui)

---

Top Contributors

[![jordanpartridge](https://avatars.githubusercontent.com/u/9040417?v=4)](https://github.com/jordanpartridge "jordanpartridge (22 commits)")

---

Tags

apigithubAgentpull-requestprconduit-ui

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/conduit-ui-prs/health.svg)

```
[![Health](https://phpackages.com/badges/conduit-ui-prs/health.svg)](https://phpackages.com/packages/conduit-ui-prs)
```

###  Alternatives

[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[phpsa/laravel-postman

Export laravel API routes to postman

1014.7k](/packages/phpsa-laravel-postman)[evandotpro/edp-github

Github API integration module for Zend Framework 2

241.6k](/packages/evandotpro-edp-github)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
