PHPackages                             juniyadi/laravel-github-api - 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. juniyadi/laravel-github-api

ActiveLibrary[API Development](/categories/api)

juniyadi/laravel-github-api
===========================

v0.0.1(1y ago)0310MITPHP

Since May 10Pushed 1y ago1 watchersCompare

[ Source](https://github.com/JuniYadi/laravel-github-api)[ Packagist](https://packagist.org/packages/juniyadi/laravel-github-api)[ RSS](/packages/juniyadi-laravel-github-api/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

Laravel GitHub API Package
==========================

[](#laravel-github-api-package)

A modular, testable, and Laravel-friendly package for interacting with the GitHub API. Provides clean separation of concerns and easy integration via Laravel facades and service providers.

Features
--------

[](#features)

- Modular API classes: User, Repo, Org, Issues, Pull Requests, Releases, Search, Webhooks, Actions, Projects, Teams, Gists, Check Runs
- Laravel Facade for static access
- Service provider for easy configuration
- PSR-4 autoloading and contracts for testability

Available Methods
-----------------

[](#available-methods)

### User API

[](#user-api)

MethodDescription`me`Get authenticated user information`show`Get information about a specific user### Repository API

[](#repository-api)

MethodDescription`getRepositories`List repositories for a user`getBranches`List branches for a repository`show`Show repository or file details`upload`Upload a file to a repository`uploadBulk`Upload multiple files to a repository`uploadBulkBlob`Bulk upload with single commit using Git Data API`delete`Delete a file from a repository`deleteBulk`Delete multiple files from a repository`deleteBulkBlob`Delete multiple files with single commit### Organization API

[](#organization-api)

MethodDescription`getOrganizationRepositories`List repositories for an organization`show`Get information about an organization### Issues API

[](#issues-api)

MethodDescription`getIssues`List issues in a repository`createIssue`Create a new issue`updateIssue`Update an existing issue`getIssueComments`Get comments on an issue`createIssueComment`Comment on an issue### Pull Requests API

[](#pull-requests-api)

MethodDescription`getPullRequests`List PRs in a repository`createPullRequest`Create a new PR`updatePullRequest`Update a PR`mergePullRequest`Merge a PR`getPullRequestFiles`List files in a PR### Releases API

[](#releases-api)

MethodDescription`getReleases`List releases for a repository`getRelease`Get a single release`createRelease`Create a release`updateRelease`Update a release`deleteRelease`Delete a release### Search API

[](#search-api)

MethodDescription`searchRepositories`Search repositories`searchCode`Search code`searchUsers`Search users`searchIssues`Search issues and pull requests### Webhooks API

[](#webhooks-api)

MethodDescription`getWebhooks`List webhooks for a repository`createWebhook`Create a webhook`updateWebhook`Update a webhook`deleteWebhook`Delete a webhook### Actions API

[](#actions-api)

MethodDescription`getWorkflows`List workflows in a repository`getWorkflowRuns`List workflow runs`rerunWorkflow`Re-run a workflow`getWorkflowRunLogs`Download workflow logs### Projects API

[](#projects-api)

MethodDescription`getProjects`List projects for a repo/org/user`createProject`Create a project`updateProject`Update a project`deleteProject`Delete a project### Teams API

[](#teams-api)

MethodDescription`getTeams`List teams in an organization`createTeam`Create a team`updateTeam`Update a team`deleteTeam`Delete a team`getTeamMembers`List team members`addTeamMember`Add a team member### Gists API

[](#gists-api)

MethodDescription`getGists`List gists for authenticated user`createGist`Create a gist`updateGist`Update a gist`deleteGist`Delete a gist### Check Runs API

[](#check-runs-api)

MethodDescription`getCheckRuns`Get check runs for a reference`createCheckRun`Create a check run`updateCheckRun`Update a check runInstallation
------------

[](#installation)

```
composer require juniyadi/laravel-github-api
```

Publish the config file:

```
php artisan vendor:publish --provider="JuniYadi\GitHub\Providers\LaravelGithubServiceProvider" --tag=config
```

Set your GitHub token in `config/github.php` or your `.env`:

```
GITHUB_TOKEN=your_github_token

```

Usage
-----

[](#usage)

### Facade Example

[](#facade-example)

```
use JuniYadi\GitHub\Facades\Github;

// User operations
$user = Github::user()->me();
$repos = Github::repo()->getRepositories('octocat');
$orgRepos = Github::org()->getOrganizationRepositories('laravel');

// Repository content
$file = Github::repo()->show('octocat', 'Hello-World');
// Read Readme file
$file = Github::repo()->show('octocat', 'Hello-World', 'README.md');

// Issues and PRs
$issues = Github::issues()->getIssues('owner/repo');
$pr = Github::pullRequest()->createPullRequest('owner/repo', 'title', 'head', 'base', 'body');

// Other operations
$releases = Github::release()->getReleases('owner/repo');
$searchResults = Github::search()->searchRepositories('language:php stars:>1000');
$workflows = Github::actions()->getWorkflows('owner/repo');
```

### Dependency Injection Example

[](#dependency-injection-example)

```
use JuniYadi\GitHub\Github;

public function __construct(Github $github) {
    $this->github = $github;
}

public function show() {
    return $this->github->user()->me();
}
```

Documentation
-------------

[](#documentation)

### Bulk File Operations

[](#bulk-file-operations)

```
use JuniYadi\GitHub\Facades\Github;

// Upload multiple files in a single commit
$files = [
    [
        'file' => 'path/to/file1.txt',
        'content' => 'File 1 content'
    ],
    [
        'file' => 'path/to/file2.txt',
        'content' => 'File 2 content'
    ]
];

// Upload files with a single commit
$result = Github::repo()->uploadBulkBlob('owner/repo', 'main', $files, 'Bulk upload commit message');

// Delete multiple files or directories in a single commit
$filesToDelete = [
    'path/to/file1.txt',
    'path/to/directory',  // Will delete directory and all contents
    'path/to/file2.txt'
];

$result = Github::repo()->deleteBulkBlob('owner/repo', 'main', $filesToDelete, 'Bulk delete commit message');
```

See the `docs/` directory for detailed usage of each API class.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance49

Moderate activity, may be stable

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity27

Early-stage or recently created project

 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

374d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7b3f299b82ad565345892bc1f2638dcb2ec0641bdacf6658c8490f8d378a2e94?d=identicon)[JuniYadi](/maintainers/JuniYadi)

---

Top Contributors

[![JuniYadi](https://avatars.githubusercontent.com/u/31454084?v=4)](https://github.com/JuniYadi "JuniYadi (6 commits)")

###  Code Quality

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/juniyadi-laravel-github-api/health.svg)

```
[![Health](https://phpackages.com/badges/juniyadi-laravel-github-api/health.svg)](https://phpackages.com/packages/juniyadi-laravel-github-api)
```

###  Alternatives

[spatie/laravel-query-builder

Easily build Eloquent queries from API requests

4.4k26.9M220](/packages/spatie-laravel-query-builder)[essa/api-tool-kit

set of tools to build an api with laravel

52680.5k](/packages/essa-api-tool-kit)[esign/laravel-conversions-api

A laravel wrapper package around the Facebook Conversions API

69145.4k](/packages/esign-laravel-conversions-api)[surface/laravel-webfinger

A Laravel package to create an ActivityPub webfinger.

113.8k](/packages/surface-laravel-webfinger)

PHPackages © 2026

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