GithubHelp home page GithubHelp logo

zendesk-svn's Introduction

Introduction

This script is to be used to post comment updates to ZenDesk tickets as part of your post-commit hook in subversion. It’s written in PHP and requires the SimpleXML package along with cURL to be enabled for PHP.

Where do I install it?

The script itself can live anywhere, but it will work if you simply put it in the ‘/path/to/repository/hooks/` folder (e.g. `/home/subversion/MyRepository/hooks/zendesk-svn/`). Your post-commit hook needs to be made executable (`chmod +x post-commit`) or your subversion client will complain that the post-commit hook failed.

./MyRepository
  - hooks/
      - post-commit
      - zendesk-php/
          - zendesk-svn.php

Configuring the script

You will need to rename/copy config.inc.php.dist to config.inc.php and update the settings within before using this script.

Testing the script

You can run the script from the command line to test a particular commit against the parsing logic (and to ensure that it is integrating properly with ZenDesk).

/usr/local/bin/php /path/to/zendesk-php/zendesk-svn.php 1234

Where ‘1234’ is the particular revision you want the script to parse.

Known Requirements

  • PHP 5.3.x or higher

  • libxml2 (for XML parsing)

  • cURL (with SSL support)

  • OpenSSL (for cURL)

The Basics

With the post-commit hook properly installed and the script configured, you should be able to use the key words “ticket”, “fixed”, “fixes”, “addresses”, “addressed” in your commit message followed by a “#{ticket_id_number}” to update the status of tickets in ZenDesk.

These would work:

Ticket #2340 is fixed with this change.
Updated the header to include the new logo. Addresses #1258.
Fixed #3456 by re-factoring the navigation panel.
Corrected spelling on home page. Addresses #1258 and addresses #1259  <-- this would post to both tickets
Corrected spelling on home page. Addresses #1258 and #1260 <-- this only posts to the first one (missing keyword)

These would not work at all:

Fixes for #1254 by resetting the password. <-- keyword must be immediately before the # sign
Addressed # 1255 with new layout. <-- the space causes the ticket ID to not be recognized

Note about users

This script assumes that your usernames in Subversion neatly correspond to your e-mail addresses in ZenDesk (jdoe in subversion is [email protected] in ZenDesk). If they don’t, the updates will not be properly attached to your “Agent” account, and might be outright rejected.

zendesk-svn's People

Contributors

stephenyeargin avatar

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.