PHP code example of rjvandoesburg / laravel-jira-webhook

1. Go to this page and download the library: Download rjvandoesburg/laravel-jira-webhook library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

rjvandoesburg / laravel-jira-webhook example snippets


// config/app.php

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

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
    ]
];

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