Skip to content

Repository files navigation

GitHub Project PHP

github-project-php-example

LicenseLatest VersionTotal DownloadsTest StatusCode Style Status

Introduction

GitHub Project PHP is a Laravel package that helps you manage your GitHub Projects (V2) in PHP.

It provides a simple webhook system to receive GitHub project events and automatically generate activity comments on issues and pull requests.

Features

  • Webhook Integration: Receive and process GitHub Projects V2 webhook events
  • Queue Support: Process webhook events asynchronously for better performance
  • API Endpoint: Generate comment messages via REST API
  • 12+ Field Type Templates: Built-in templates for all GitHub Project field types
  • Customizable Templates: Publish and customize Blade templates
  • GitHub GraphQL API: Direct integration with GitHub's GraphQL API

Requirements

Installation

composer require cslant/github-project-php

Available Field Type Templates

Field TypeDescription
textSimple text fields
numberNumeric fields
dateDate fields (Y-m-d format)
single_selectSingle-select dropdowns with color support
multi_selectMulti-select fields
checkboxBoolean/toggle fields
textareaLong text content with diff view
iterationIteration/sprint fields
labelsLabel/tag fields
assigneesUser assignment fields
milestoneMilestone tracking
unsupportedFallback for unknown field types

Usage

See the GitHub Project PHP Documentation for detailed usage instructions.

Customizing Templates

php artisan vendor:publish --provider="CSlant\GitHubProject\GithubProjectServiceProvider" --tag="views"

This copies templates to resources/views/vendor/github-project/md/field_types/.

Template Variables

All field type templates receive:

  • $fieldName - Display name of the field
  • $fieldType - Type of the field
  • $fromValue - Previous value
  • $toValue - New value
  • $fieldData - Raw webhook data

API Endpoint

Generate comment messages via API:

POST /github-project/generate-comment
Content-Type: application/json
{
"payload": { ... }
}

Queue Configuration

Enable queue processing in your config:

// config/github-project.php'is_queue_enabled' => true,

Documentation

Full documentation available at docs.cslant.com/github-project-php

Changelog

Please see CHANGELOG for more information on what has changed recently.

License

The MIT License (MIT). Please see License File for more information.

About

Provides a simple and easy-to-use webhooks system to get the GitHub project's actions and implement comments on all activities in the project.

Topics

Resources

Contributing

Stars

7 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages