Git-Zen Installation and Usage

Power User QuickStart Installation

  1. Install the Git-Zen app from the Zendesk marketplace
  2. Open any ticket
  3. Locate Git-Zen in the "Apps" sidebar
  4. Click "Authorize"
  5. "Allow" Zendesk access
  6. "Authorize" GitHub access
  7. Refresh entire Zendesk browser window

IMPORTANT: You MUST refresh the entire browser window that is currently running Zendesk; do not click simply click the "reload all apps" button, as this will re-start the authorization process


How to use Git-Zen

To associate a GitHub commit or issue, all you have to do is include the Zendesk ticket number in a GitHub commit comment or GitHub issue description, prefaced by "gz#"; in the below example, the Zendesk ticket number is 12345:

this is a comment for gz#12345

You may add more than one ticket number in the same commit (or issue) comment; both tickets will have the commit (or issue) added to it in Git-Zen.

gz#12345 and gz#67890 were affected by this commit

You may add commits from different repositories to the same ticket; this is especially useful when a solution to a ticket is spread across multiple projects, such as a when a change is required to both a database schema and a web application in order to solve an issue.


Installation Walkthrough

Git-Zen installation is quick and easy; Git-Zen will step you through the process. Git-Zen requires two different access points in order to function:

  1. Access to your Zendesk tickets
  2. Access to your GitHub repositories

Once the Git-Zen application is installed in Zendesk, open any Zendesk ticket. Then, open the "Apps" sidebar. The Git-Zen application should be visible. You will be directed to begin the authorization process:

Git-Zen pre-authorization

Git-Zen pre-authorization

When you click "Authorize", a separate window will open requesting access to your Zendesk account; this is accomplished through a Zendesk OAUTH token (which can be revoked at any time in your Zendesk user account "security" settings tab). If you are not logged in to Zendesk, you will be asked to log in at this point.

Zendesk authorization

Zendesk authorization

After clicking "Allow" on the Zendesk authorization screen, you will be taken to the authorization screen for your GitHub repositories. If you are not logged in to GitHub, you will be asked to log in here.

GitHub authorization

GitHub authorization

Once you authorize Git-Zen to access GitHub, the authorization window will close. Return to your Zendesk window, and refresh the Zendesk window. IMPORTANT: You MUST refresh the entire browser window that is currently running Zendesk; do not click simply click the "reload all apps" button, as this will re-start the authorization process.

You should now see the full Git-Zen application in the app sidebar. There will be a "Link GitHub" icon on the Git-Zen menu bar.

GitHub menu

GitHub menu

Click this icon to view your available GitHub repositories, and select which repositories you wish to have active for Git-Zen. Then, click the "Save Changes" button.

link GitHub

link GitHub

Git-Zen is ready to use!






Adding GitHub Webhooks Manually(optional)

If you do not wish to authorize Git-Zen to access your GitHub repositories automatically, you can still use Git-Zen by adding webhooks manually to your GitHub repostories. To do this, you will need your webhook URL from the Git-Zen menu.

IMPORTANT: Git-Zen cannot create GitHub issues without oAuth access; if you manually create webhooks, you can still link GitHub issues by adding a "gz#" comment in the issue comments, but you cannot create an issue directly from the Zendesk application.

First, complete the above steps (including the Zendesk authorization), but close the window when you are asked to authorize GitHub. Then, refresh your Zendesk browser window. Click on the "Webhooks" menu at the top of the Git-Zen application:

GitHub menu

GitHub menu

On the subsequent settings screen, find the section titled "Manual GitHub Configuration". This section will have a unique webhook URL for you to use.

GitHub webhook

GitHub webhook

Copy this URL to your clipboard, and then follow these steps:

  1. Sign in to GitHub, then select the desired repository
  2. Click on "Settings" from the top repository menu
  3. Click on "Webhooks" from the left panel
  4. Click the "Add WebHook" button
  5. Paste the copied URL in the "Payload URL" field
  6. Select "application/json" as the content type
  7. Leave the "Secret" field blank
  8. Leave SSL verification set to "Enable SSL verification"
  9. Select "Let me select individual events", and check "Commit comments", "Issues", "Pushes", and "Issue comments"
  10. Leave the "Active" checkbox checked
  11. Click the "Add webhook" button

Repeat these steps for each repository that you wish to use with Git-Zen. The same URL is used for every repository.