Skip to content

ElasticSuite/github-to-freshdesk

 
 

Repository files navigation

Github to Freshdesk Integration

This is a really simple sinatra app which expects to be the endpoint for a Github webhook. Basically any time that an issue is closed or labeled it'll look for a ticket in Freshdesk with the Github issue number in a custom field of the user's choosing. When the issue is closed it changes the ticket status, and when the issue is label it adds a note with the label name. There's a bunch of hardcoded behavior in here, which isn't great, but it should be pretty easy to customize this basic workflow. It looks for a few environment variables:

  • FRESHDESK_API_KEY
  • FRESHDESK_DOMAIN
  • FRESHDESK_CUSTOM_FIELD

Also, this dealie now supports a config file for multiple repos. The way this works is you setup a custom field in Fresh Desk for each of your repos, named like Repo#1 Ticket Reference and Repo#2 Ticket Reference or something. Then you get the internal names for those fields (they look something like repo_one) and map them in the config file:

---
repositories:
  lyleunderwood/github-to-freshdesk: github_to_freshdesk_ticket

and obviously you can have multiple repos in here.

Behavior

  1. When Tag changed to "Fixed in Dev"
    • Add Note
    • Change Status to Pending
  2. When a Tag changed to Fixed in Staging
    • Add Note
    • Change Status to Staging
  3. Tag changed to Fixed in Production
    • Add Note
    • Change Status to Resolved

To get the custom field internal name run

curl -u <FRESHDESK_API_KEY>:X -H "Content-Type: application/json" -X GET http://<FRESHDESK_DOMAIN>.freshdesk.com/api/v2/ticket_fields

and in the response, find the name field for the field with the corresponding label.

About

Basic Github issue to Freshdesk ticket integration.

Resources

License

Stars

1 star

Watchers

3 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Ruby 93.9%
  • Shell 6.1%