Giter VIP home page Giter VIP logo

laravel-jira-webhook's Introduction

Add a Jira webhook endpoint to your Laravel 5 application

Build Status

This package adds a route to your laravel application to handle the webhook events sent by Jira

Install

You can install the package via composer:

composer require rjvandoesburg/laravel-jira-webhook

You must install this service provider:

// config/app.php

'providers' => [
    ...
    Atlassian\JiraWebhook\JiraWebhookServiceProvider::class,
    ...
];

If you're planning on linking your own events you must publish the config file with this command:

php artisan vendor:publish --provider="Atlassian\JiraWebhook\JiraWebhookServiceProvider"

A file named jira-webhook.php will be created in the config directory under the folder atlassian. The options you can set are as followed key is the dispatched event by Jira and the value is the event class to fire. By default all events have a data property that holds the data sent by Jira.

return [

    'events' => [
        'jira:issue_created' => \Atlassian\JiraWebhook\Events\Issue\Created::class,
        'jira:issue_updated' => \Atlassian\JiraWebhook\Events\Issue\Updated::class,
        'jira:issue_deleted' => \Atlassian\JiraWebhook\Events\Issue\Deleted::class,

        /**
         * Will be deprecated in the future and be replaced by worklog_updated
         * Still catching the events because it is still being sent out
         *
         * @see https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-worklog-data-in-issue-related-events-for-webhooks/
         */
        'jira:worklog_updated' => \Atlassian\JiraWebhook\Events\Issue\WorklogUpdated::class,

        'worklog_created' => \Atlassian\JiraWebhook\Events\Worklog\Created::class,
        'worklog_updated' => \Atlassian\JiraWebhook\Events\Worklog\Updated::class,
        'worklog_deleted' => \Atlassian\JiraWebhook\Events\Worklog\Deleted::class
    ]
];

Usage

To handle the events you need to either register listeners to you EventServiceProvider or listen to the events manually. Please see https://laravel.com/docs/events#defining-listeners for more information.

Credits

License

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

To do

  • Make url configurable
  • Catch All events Available events
  • Implement broadcasting events

laravel-jira-webhook's People

Contributors

rjvandoesburg avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

athaller ostyhar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.