{"id":106,"date":"2016-01-27T13:40:47","date_gmt":"2016-01-27T13:40:47","guid":{"rendered":"http:\/\/joelherber.com\/?p=106"},"modified":"2019-12-27T16:05:37","modified_gmt":"2019-12-27T16:05:37","slug":"connect-gitlab-to-trello","status":"publish","type":"post","link":"https:\/\/joelherber.com\/?p=106","title":{"rendered":"Connect GitLab to Trello"},"content":{"rendered":"<p>One of the things that I have always found useful when working with task tracking software, is the ability to see a list of all git commits associated with a given issue. Currently commit tracking is only supported for Business class users, and so far only GitHub is supported.<br \/>\nHere I will explain how you can get Git to automatically link your trello cards with your git commits.<\/p>\n<p>1) Firstly, <a href=\"https:\/\/nodejs.org\/en\/download\/\">install node<\/a> and node trello,<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo npm install -g node-trello\r\n<\/pre>\n<p>2) Next get an app key from trello using the folowing link: https:\/\/trello.com\/1\/appKey\/generate<\/p>\n<p>3) Allow Git-hook to use your account &#8211; https:\/\/trello.com\/1\/connect?key=KEY_YOU_OBTAINED_FROM_STEP_TWO&amp;name=git-hook&amp;expiration=never&amp;response_type=token&amp;scope=read,write<\/p>\n<p>4) Unzip the attached ZIP file into your .git directory for your project (this file may be hidden for you). So the path should be your_project_path\/.git\/hooks<\/p>\n<p><a href=\"http:\/\/www.joelherber.com\/wp-content\/uploads\/2016\/01\/hooks.zip\">hooks<\/a><\/p>\n<p>5) You may need to make the script executeable<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nchmod +x your_project_path\/.git\/hooks\/*\r\n<\/pre>\n<p>6) Open the post-to-trello file in the hooks folder and fill in your key, token, repo link, and board id. To get you board ID, go to your trello board in a browser and append &#8220;.json&#8221; on the end of the URL e.g. https:\/\/trello.com\/e\/aaaaaa\/my-board.json<\/p>\n<p>Now anytime you mention a card number in a commit message like this : &#8220;#44 Some message&#8221;. Your comment should appear on your card. Credit to\u00a0<a href=\"https:\/\/gist.github.com\/mashihua\/2952814\">mashihua<\/a> for the initial Git -&gt; trello code.<\/p>\n<p><a href=\"http:\/\/www.joelherber.com\/wp-content\/uploads\/2016\/01\/Screen-Shot-2016-01-27-at-13.07.09.png\"><img loading=\"lazy\" class=\"alignnone size-full wp-image-108\" src=\"http:\/\/www.joelherber.com\/wp-content\/uploads\/2016\/01\/Screen-Shot-2016-01-27-at-13.07.09.png\" alt=\"Screen Shot 2016-01-27 at 13.07.09\" width=\"554\" height=\"161\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the things that I have always found useful when working with task tracking software, is the ability to see a list of all git commits associated with a given issue. Currently commit tracking is only supported for Business class users, and so far only GitHub is supported. Here I will explain how you&#8230; <\/p>\n<p class=\"more\"><a class=\"more-link\" href=\"https:\/\/joelherber.com\/?p=106\">Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":623,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false},"categories":[6],"tags":[],"_links":{"self":[{"href":"https:\/\/joelherber.com\/index.php?rest_route=\/wp\/v2\/posts\/106"}],"collection":[{"href":"https:\/\/joelherber.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/joelherber.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/joelherber.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/joelherber.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=106"}],"version-history":[{"count":1,"href":"https:\/\/joelherber.com\/index.php?rest_route=\/wp\/v2\/posts\/106\/revisions"}],"predecessor-version":[{"id":727,"href":"https:\/\/joelherber.com\/index.php?rest_route=\/wp\/v2\/posts\/106\/revisions\/727"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/joelherber.com\/index.php?rest_route=\/wp\/v2\/media\/623"}],"wp:attachment":[{"href":"https:\/\/joelherber.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=106"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/joelherber.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=106"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/joelherber.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=106"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}