PHPackages                             netodomenico/php-discord-git-notifications - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. netodomenico/php-discord-git-notifications

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

netodomenico/php-discord-git-notifications
==========================================

Send a Discord message on every push, pull request created or approved on your Git repository.

v1.0.4(2y ago)313Apache-2.0PHPPHP &gt;=7.1

Since Nov 2Pushed 2y ago1 watchersCompare

[ Source](https://github.com/netodomenico/php-discord-git-notifications)[ Packagist](https://packagist.org/packages/netodomenico/php-discord-git-notifications)[ Docs](https://www.arsdigitalia.net)[ RSS](/packages/netodomenico-php-discord-git-notifications/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (4)DependenciesVersions (6)Used By (0)

PHP Discord GIT Notifications
=============================

[](#php-discord-git-notifications)

##### *Currently compatible with Github, BitBucket and Gitlab*

[](#currently-compatible-with-github-bitbucket-and-gitlab)

Send a Discord message on every push, pull request created or approved on your Git repository.

#### Features

[](#features)

- Send messages as notifications on your company Discord server.
- Stay up to date on the progress of a project under development.
- Setup a channel representing a customer on your Discord server and receive messages on every action.
- Set a *secure token* for your webhooks (only for GitLab repositories).
- Setup your custom configuration (bot name, color, avatar or message) and grab the attention of your colleagues!
- Declare the webhooks of **all** your repositories at the same time, even if they are from different Git providers.

#### Installation

[](#installation)

**PHP Discord GIT Notifications** requires PHP 7.1+ to run. Install the package and initialize your repository entries.

```
composer require netodomenico/php-discord-git-notifications dev-main
```

#### Configuration

[](#configuration)

**PHP Discord GIT Notifications** has a few simple configurations. Instructions on how to use them in your own application are explained below.

ConfigurationTypeExplanationMandatory**bot\_message***String*The message Discord will show over the git activity summary.No**bot\_username***String*The username of the bot sending Discord message.No**bot\_avatar***String*The avatar of the bot sending Discord message.No**bot\_color***String*The left bar color of messages sent on Discord (HEX, 6 chars, with no **\#** symbol. Example: *E62B5A*).No**secure\_token***String*String used as matching constraint for security reasons (*only on Gitlab*)No#### Initialization

[](#initialization)

Define your route (be sure using **POST** method), pair your controller and then import **PHP Discord GIT Notifications** class at the top of your file.

```
use ArsDigitalia\Repository;
```

Once the class is imported, you can **initialize** the object:

```
$repository = new Repository();
```

After that you can proceed declaring your **webhooks**:

```
$repository->addWebhooks([
    // Example for GitHub
    '{github_hook_uuid}' => 'https://discord.com/api/webhooks/{channel_id}/{webhook_id}',
    // Example for Bitbucket
    '{bitbucket_webhook_uuid}' => 'https://discord.com/api/webhooks/{channel_id}/{webhook_id}',
    // Example for Gitlab
    '{gitlab_project_id}' => 'https://discord.com/api/webhooks/{channel_id}/{webhook_id}',
]);
```

If you want to declare a specific **configuration** value (as referenced in [**configuration**](#configuration) section), do in this way:

```
$repository->config->set('{configuration_key}', '{configuration_value}');
```

After that you can proceed parsing *request* and then sending message to the Discord matching webhook:

```
$repository = $repository->parseRequest();
$repository->sendMessage();
```

#### How to create and/or retrieve your Github Webhook UUID

[](#how-to-create-andor-retrieve-your-github-webhook-uuid)

1. Login into your **Github** account.
2. Search and enter in your **Repository**.
3. Click on *Settings* and then on *Webhooks* in the left sidebar.
4. Create your webhook if you haven't already did by entering the complete **url** of this route and making sure that *Content type* is set to **application/json** and choose **Let me select individual events** if interested (only **Pushes** and **Pull requests** will be considered).
5. After that, click on **edit** and retrieve the Github webhook uuid from the url path.

#### How to create and/or retrieve your Bitbucket Webhook UUID

[](#how-to-create-andor-retrieve-your-bitbucket-webhook-uuid)

1. Login into your **Bitbucket** account.
2. Search and enter in your **Repository**.
3. Click on *Repository settings* and then on *Webhooks* under *Workflow* subcategory.
4. Create your webhook if you haven't already did by entering the complete **url** of this route and making sure that **Push** (under repository), **Created** (under pull request) and **Approved** (under pull request) checkboxes are **enabled**.
5. After that, click on **edit** or **view requests** (if your are not on those sections yet) call to actions and retrieve the bitbucket webhook uuid from the url path (make sure to not copy braces characters **%7B** and **%7D** which can limit uuid string).

#### How to create and/or retrieve your Gitlab Project ID

[](#how-to-create-andor-retrieve-your-gitlab-project-id)

1. Login into your **Gitlab** account.
2. Search and enter in your **Project**.
3. Click on *Settings* and then on *Webhooks*.
4. Create your webhook if you haven't already did by entering the complete **url** of this route and making sure that **Push events** checkbox is **enabled**.
5. After that, click on **General** on the left sidebar and retrieve the **Project ID** from the disabled input field.

#### How to create and/or retrieve your Discord channel Webhook URL

[](#how-to-create-andor-retrieve-your-discord-channel-webhook-url)

1. Make sure you have enough permissions to perform the task.
2. Identify your desired channel and move over that.
3. Click on the gear (*Edit channel*) and then on **Integrations**.
4. After that your can click on the "Create webhook" call to action, enter the required parameters and then copy the **Webhook URL**.

#### License

[](#license)

Apache License 2.0

**There's no place like 127.0.0.1!**

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

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

Every ~233 days

Total

4

Last Release

956d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/926ef5ec85297d5df54d6ef0a6a538a4cc6a398e3718e019e23a18356fda18a5?d=identicon)[netodomenico](/maintainers/netodomenico)

---

Top Contributors

[![netodomenico](https://avatars.githubusercontent.com/u/16362468?v=4)](https://github.com/netodomenico "netodomenico (19 commits)")

---

Tags

phppushbitbucketgitlabgitpulldiscordPullRequest

### Embed Badge

![Health badge](/badges/netodomenico-php-discord-git-notifications/health.svg)

```
[![Health](https://phpackages.com/badges/netodomenico-php-discord-git-notifications/health.svg)](https://phpackages.com/packages/netodomenico-php-discord-git-notifications)
```

###  Alternatives

[marcocesarato/php-conventional-changelog

Generate changelogs and release notes from a project's commit messages and metadata and automate versioning with semver.org and conventionalcommits.org

2511.3M109](/packages/marcocesarato-php-conventional-changelog)[producer/producer

Tools for releasing library packages; supports Git, Mercurial, Github, Gitlab, and Bitbucket.

10418.7k2](/packages/producer-producer)[laravelplus/laravel-updater

A Laravel package for syncing with upstream repositories (GitHub, GitLab, Bitbucket, etc.)

201.7k](/packages/laravelplus-laravel-updater)[atakde/discord-webhook-php

discord webhook php

186.5k](/packages/atakde-discord-webhook-php)[wcm/git-php-hooks-library

A collection of Git PHP Hooks

1210.1k3](/packages/wcm-git-php-hooks-library)[nilportugues/php_todo

Looks into the code using a user-defined list of to-do phrases and stops commit if the total amount increased or is above a threshold.

1210.0k](/packages/nilportugues-php-todo)

PHPackages © 2026

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