2017 © Pedro Peláez
 

library symfony-exceptions-2-gitlab-issues-bundle

Creates & updates issues on a GitLab repository from Symfony2 exceptions

image

chteuchteu/symfony-exceptions-2-gitlab-issues-bundle

Creates & updates issues on a GitLab repository from Symfony2 exceptions

  • Wednesday, February 7, 2018
  • by chteuchteu
  • Repository
  • 2 Watchers
  • 3 Stars
  • 558 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 2 Open issues
  • 12 Versions
  • 0 % Grown

The README.md

SymfonyExceptions2GitLabIssuesBundle

That's a very long name, but at least we know what it does., (*1)

Latest Stable Version, (*2)

Once installed, this bundle will open/update an issue on your GitLab repository when an exception is thrown:, (*3)

SymfonyExceptions2GitLabIssuesBundle, (*4)

  • We build the issue title from the exception file, line and message
  • If an issue exists with this title, we'll update it
  • We put some relevant information in the issue body (request method (GET, POST, ...) & URI, logged in user, stacktrace)
  • We add/update a comment: "Thrown 3 times, last one was 14/07/2016 09:37:47"

Installation

  1. Add this bundle to your project:, (*5)

    composer require chteuchteu/symfony-exceptions-2-gitlab-issues-bundle
    
  2. Register this bundle in symfony's kernel:, (*6)

    // app/AppKernel.php
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new Chteuchteu\SymExc2GtlbIsuBndle\SymfonyExceptions2GitLabIssuesBundle(),
        );
    }
    
  3. Generate a GitLab API token. Navigate to https://gitlab.com/profile (replace the URL with your instance's if necessary, but don't miss the /profile part), then "Personal Access Tokens"., (*7)

    You can name it whatever you want, but "SymfonyExceptions2GitLabIssuesBundle" seems to be a great name., (*8)

    Note: you can share this token between several projects., (*9)

  4. Configure this bundle inside your project:, (*10)

    # config.yml
    sym_exc_2_gtlb_isu_bndle:
        gitlab_api_url: https://gitlab.com/api/v3/
        gitlab_token: (put your token here)
        project: your_project_name
        excluded_exceptions:
            - Symfony\Component\HttpKernel\Exception\NotFoundHttpException
    

    Note: if you're using https://gitlab.com, you can actually skip the gitlab_api_url. If not, don't forget the /api/v3/ part., (*11)

  5. Deploy your app in production, and trigger an exception. An issue should be waiting for you in your GitLab repository., (*12)

  6. (optional) Customize the excluded_exceptions node to include/exclude exceptions from being handled by this bundle. By default (if the excluded_exceptions isn't specified), all exceptions are handled., (*13)

Configuration

Here are some more things you can configure. Just add these items to your config.yml, under the sym_exc_2_gtlb_isu_bndle node., (*14)

  • reopen_closed_issues - boolean, default true:, (*15)

    When set to true, any closed issue will be reopened when a matching exception is caught., (*16)

  • excluded_environments - array, default ['dev', 'test']:, (*17)

    When encountering an exception in one of these environments, we won't report anything to your GitLab repository., (*18)

    Tip: include back the dev environment (excluded_environments: []) to test this bundle without deploying to prod!, (*19)

  • excluded_exceptions - array, default []:, (*20)

    Array of FQCN (fully qualified class name) of exceptions to ignore., (*21)

    Tip: add Symfony\Component\HttpKernel\Exception\NotFoundHttpException to ignore 404 exceptions., (*22)

  • mentions - array, default []:, (*23)

    GitLab users to be mentioned in the issue body. Example: ['user1', 'user2', 'user3'] will append "Mentions: @user1 @user2 @user3" at the end of the message., (*24)

TODO

  • Make more things configurable:
    • Issue body template
    • Comment datetime format?
  • Handle pagination when finding issue
  • Test mode
  • Help diagnose problems (monolog logging)

The Versions

07/02 2018

dev-master

9999999-dev https://github.com/chteuchteu/SymfonyExceptions2GitLabIssuesBundle

Creates & updates issues on a GitLab repository from Symfony2 exceptions

  Sources   Download

GNU GPL v2.0 GPL-2.0-only

The Requires

 

by Quentin Stoeckel

symfony2 exceptions gitlab issues

07/02 2018

v1.4.1

1.4.1.0 https://github.com/chteuchteu/SymfonyExceptions2GitLabIssuesBundle

Creates & updates issues on a GitLab repository from Symfony2 exceptions

  Sources   Download

GPL-2.0-only

The Requires

 

by Quentin Stoeckel

symfony2 exceptions gitlab issues

07/02 2018

dev-feature-v4

dev-feature-v4 https://github.com/chteuchteu/SymfonyExceptions2GitLabIssuesBundle

Creates & updates issues on a GitLab repository from Symfony2 exceptions

  Sources   Download

GNU GPL v2.0

The Requires

 

by Quentin Stoeckel

symfony2 exceptions gitlab issues

27/10 2017

v1.4.0

1.4.0.0 https://github.com/chteuchteu/SymfonyExceptions2GitLabIssuesBundle

Creates & updates issues on a GitLab repository from Symfony2 exceptions

  Sources   Download

GNU GPL v2.0

The Requires

 

by Quentin Stoeckel

symfony2 exceptions gitlab issues

09/09 2017

dev-gitlab-api-v3-support

dev-gitlab-api-v3-support https://github.com/chteuchteu/SymfonyExceptions2GitLabIssuesBundle

Creates & updates issues on a GitLab repository from Symfony2 exceptions

  Sources   Download

GNU GPL v2.0

The Requires

 

by Quentin Stoeckel

symfony2 exceptions gitlab issues

17/08 2017

v1.3.1

1.3.1.0 https://github.com/chteuchteu/SymfonyExceptions2GitLabIssuesBundle

Creates & updates issues on a GitLab repository from Symfony2 exceptions

  Sources   Download

GNU GPL v2.0

The Requires

 

by Quentin Stoeckel

symfony2 exceptions gitlab issues

05/10 2016

v1.3.0

1.3.0.0 https://github.com/chteuchteu/SymfonyExceptions2GitLabIssuesBundle

Creates & updates issues on a GitLab repository from Symfony2 exceptions

  Sources   Download

GNU GPL v2.0

The Requires

 

by Quentin Stoeckel

symfony2 exceptions gitlab issues

03/10 2016

v1.2.1

1.2.1.0 https://github.com/chteuchteu/SymfonyExceptions2GitLabIssuesBundle

Creates & updates issues on a GitLab repository from Symfony2 exceptions

  Sources   Download

GNU GPL v2.0

The Requires

 

by Quentin Stoeckel

symfony2 exceptions gitlab issues

17/07 2016

v1.2.0

1.2.0.0 https://github.com/chteuchteu/SymfonyExceptions2GitLabIssuesBundle

Creates & updates issues on a GitLab repository from Symfony2 exceptions

  Sources   Download

GNU GPL v2.0

The Requires

 

by Quentin Stoeckel

symfony2 exceptions gitlab issues

15/07 2016

v1.1.0

1.1.0.0 https://github.com/chteuchteu/SymfonyExceptions2GitLabIssuesBundle

Creates & updates issues on a GitLab repository from Symfony2 exceptions

  Sources   Download

GNU GPL2

The Requires

 

by Quentin Stoeckel

symfony2 exceptions gitlab issues

14/07 2016

v1.0.1

1.0.1.0 https://github.com/chteuchteu/SymfonyExceptions2GitLabIssuesBundle

Creates & updates issues on a GitLab repository from Symfony2 exceptions

  Sources   Download

GNU GPL2

The Requires

 

by Quentin Stoeckel

symfony2 exceptions gitlab issues

14/07 2016

v1.0.0

1.0.0.0 https://github.com/chteuchteu/SymfonyExceptions2GitLabIssuesBundle

Creates & updates issues on a GitLab repository from Symfony2 exceptions

  Sources   Download

GNU GPL2

The Requires

 

by Quentin Stoeckel

symfony2 exceptions gitlab issues