Download the PHP package stichoza/jira-webhooks-laravel without Composer

On this page you can find all versions of the php package stichoza/jira-webhooks-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package jira-webhooks-laravel

Jira Webhooks Laravel

Latest Stable Version Total Downloads Downloads Month Petreon donation PayPal donation

Laravel package for interacting with Jira Webhooks.

Installation

Install this package via Composer:

This package uses Laravel's package auto-discovery, so you don't have to manually add the service provider.

Laravel Without Auto-discovery

If you don't use auto-discovery, add the ServiceProvider to the providers array in config/app.php

If you want to use facade for routes, add this to aliases in you config/app.php

Export Configuration Files

(Optional) If you want to customize events dispatched by the package, copy the package config to your local config with the publish command:

Add Webhook Route

You can add webhook route to your routes file using JiraWebhooks class:

This will create a POST route with URI jira-webhook. You can also customize the URI of the route by passing a parameter. This method returns Illuminate\Routing\Route object, so you can use all other methods available on regular routes.

CSRF Protection

If you're adding the route to your web routes, make sure you disable the CSRF middleware for the webhook route. Do this by adding URI to $except property of VerifyCsrfToken middleware.

Usage

By default, the package will dispatch Stichoza\JiraWebhooksLaravel\Events\JiraWebhookReceived event for any incoming webhook along with a specific event depending on the webhookEvent of webhook received.

Using Events

Here is the table of Jira webhookEvent event names and respective events dispatched by this package:

Jira event name Event dispatched by this package
* (any webhook) JiraWebhookReceived
jira:issue_created JiraWebhookJiraIssueCreated
jira:issue_updated JiraWebhookJiraIssueUpdated
jira:issue_deleted JiraWebhookJiraIssueDeleted
jira:worklog_updated JiraWebhookJiraWorklogUpdated
issuelink_created JiraWebhookIssueLinkCreated
issuelink_deleted JiraWebhookIssueLinkDeleted
worklog_created JiraWebhookWorklogCreated
worklog_updated JiraWebhookWorklogUpdated
worklog_deleted JiraWebhookWorklogDeleted
comment_created JiraWebhookCommentCreated
comment_updated JiraWebhookCommentUpdated
comment_deleted JiraWebhookCommentDeleted
project_created JiraWebhookProjectCreated
project_updated JiraWebhookProjectUpdated
project_deleted JiraWebhookProjectDeleted
jira:version_released JiraWebhookJiraVersionReleased
jira:version_unreleased JiraWebhookJiraVersionUnreleased
jira:version_created JiraWebhookJiraVersionCreated
jira:version_moved JiraWebhookJiraVersionMoved
jira:version_updated JiraWebhookJiraVersionUpdated
jira:version_deleted JiraWebhookJiraVersionDeleted
user_created JiraWebhookUserCreated
user_updated JiraWebhookUserUpdated
user_deleted JiraWebhookUserDeleted
option_voting_changed JiraWebhookOptionVotingChanged
option_watching_changed JiraWebhookOptionWatchingChanged
option_unassigned_issues_changed JiraWebhookOptionUnassignedIssuesChanged
option_subtasks_changed JiraWebhookOptionSubtasksChanged
option_attachments_changed JiraWebhookOptionAttachmentsChanged
option_issuelinks_changed JiraWebhookOptionIssueLinksChanged
option_timetracking_changed JiraWebhookOptionTimeTrackingChanged
sprint_created JiraWebhookSprintCreated
sprint_deleted JiraWebhookSprintDeleted
sprint_updated JiraWebhookSprintUpdated
sprint_started JiraWebhookSprintStarted
sprint_closed JiraWebhookSprintClosed
board_created JiraWebhookBoardCreated
board_updated JiraWebhookBoardUpdated
board_deleted JiraWebhookBoardDeleted
board_configuration_changed JiraWebhookBoardConfigurationChanged

Note Default events are in Stichoza\JiraWebhooksLaravel\Events namespace.

Defining Custom Events

You can extend or customize event map by adding different events in config/jira-webhooks.php file. These are regular events that you can create by php artisan make:event command.

All events will receive the Stichoza\JiraWebhooksData\Models\JiraWebhookData object in the constructor.

The keys are checked against Jira's webhook event name (webhookEvent property) using Str::is() method, so you can use wildcards in names. You can find the full list of Jira webhook event names here.

Note All events matching the pattern will be triggered, not just the first one.

Handling Events

You should define the listeners for the events that you configured in config/jira-webhooks.php file. You can create listeners using Laravel's php artisan make:listener command.

All events will have a webhook property of type Stichoza\JiraWebhooksData\Models\JiraWebhookData. This object contains all data from webhook request. Read more about these data structures in the readme of stichoza/jira-webhooks-data package.

Example

Recommendations

It's recommended to make listeners queued. This package returns 200 OK response to Jira, so if the response will take too much time, Jira will assume that webhook delivery failed.


All versions of jira-webhooks-laravel with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
stichoza/jira-webhooks-data Version ^5.0
illuminate/support Version ^9.18|^10.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package stichoza/jira-webhooks-laravel contains the following files

Loading the files please wait ....