{"id":574,"date":"2017-05-07T03:22:59","date_gmt":"2017-05-07T01:22:59","guid":{"rendered":"https:\/\/blog.unetresgrossebite.com\/?p=574"},"modified":"2017-08-20T01:27:49","modified_gmt":"2017-08-19T23:27:49","slug":"keengreeper","status":"publish","type":"post","link":"https:\/\/blog.unetresgrossebite.com\/?p=574","title":{"rendered":"KeenGreeper"},"content":{"rendered":"<p>Short post today, introducing <a href=\"https:\/\/github.com\/faust64\/keengreeper\" target=\"_blank\">KeenGreeper<\/a>, a project I freshly released to GitHub, aiming to replace Greenkeeper 2.<\/p>\n<p>For those of you that may not be familiar with Greenkeeper, they provide with a public service that integrates with GitHub, detects your NodeJS projects dependencies and issues a pull request whenever one of these may be updated. In the last couple weeks, they started advertising about their original service being scheduled for shutdown, while Greenkeeper 2 was supposed to replace it. Until last week, I&#8217;ve only been using Greenkeeper free plan, allowing me to process a single private repository. Migrating to GreenKeeper 2, I started registering all my NodeJS repositories and only found out 48h later that it would cost me 15$\/month, once they would have definitely closed the former service.<\/p>\n<p>Considering that they advertise on their website the new version offers some <em>shrinkwrap<\/em> support, while in practice outdated wrapped libraries are just left to rot, &#8230; I figured writing my own scripts collection would definitely be easier.<\/p>\n<div id=\"attachment_576\" style=\"width: 310px\" class=\"wp-caption alignleft\"><a href=\"https:\/\/blog.unetresgrossebite.com\/wp-content\/uploads\/2017\/05\/kg-addrepo.png\"><img aria-describedby=\"caption-attachment-576\" decoding=\"async\" loading=\"lazy\" src=\"https:\/\/blog.unetresgrossebite.com\/wp-content\/uploads\/2017\/05\/kg-addrepo-300x240.png\" alt=\"keengreeper lists repositories, ignored packages, cached versions\" width=\"300\" height=\"240\" class=\"size-medium wp-image-576\" srcset=\"https:\/\/blog.unetresgrossebite.com\/wp-content\/uploads\/2017\/05\/kg-addrepo-300x240.png 300w, https:\/\/blog.unetresgrossebite.com\/wp-content\/uploads\/2017\/05\/kg-addrepo.png 337w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-576\" class=\"wp-caption-text\">keengreeper lists repositories, ignored packages, cached versions<\/p><\/div>\n<p>That first release addresses the first basics, adding or removing repositories to some track list, adding or removing modules to some ignore list, preventing their being upgraded. Resolving the last version for a package from NPMJS repositories, and keeping these in a local cache. Works with GitHub as well as any ssh-capable git endpoint. Shrinkwrap libraries are actually refreshed, if such are present. Whenever an update is available, a new branch is pushed to your repository, named after the dependency and corresponding version.<\/p>\n<div id=\"attachment_581\" style=\"width: 285px\" class=\"wp-caption alignright\"><a href=\"https:\/\/blog.unetresgrossebite.com\/wp-content\/uploads\/2017\/05\/kg-refresh.png\"><img aria-describedby=\"caption-attachment-581\" decoding=\"async\" loading=\"lazy\" src=\"https:\/\/blog.unetresgrossebite.com\/wp-content\/uploads\/2017\/05\/kg-refresh.png\" alt=\"refresh logs\" width=\"275\" height=\"195\" class=\"size-full wp-image-581\" \/><\/a><p id=\"caption-attachment-581\" class=\"wp-caption-text\">refresh logs<\/p><\/div>\n<p>Having registered your first repositories, you may run the update job manually and confirm everything works. Eventually, setup a cron task executing our job script.<\/p>\n<p>Note that right now, it is assumed the user running these scripts has access to a SSH key granting it with write privileges to our repositories, pushing new branches. Now ideally, either you run this from your laptop and can assume using your own private key is no big deal, or I would recommend creating a third-party GitHub user, with its own SSH key pair, and grant it read &#038; write access to the repositories you intend to have it work with.<\/p>\n<div id=\"attachment_580\" style=\"width: 310px\" class=\"wp-caption alignleft\"><a href=\"https:\/\/blog.unetresgrossebite.com\/wp-content\/uploads\/2017\/05\/kg-reporefresh.png\"><img aria-describedby=\"caption-attachment-580\" decoding=\"async\" loading=\"lazy\" src=\"https:\/\/blog.unetresgrossebite.com\/wp-content\/uploads\/2017\/05\/kg-reporefresh-300x133.png\" alt=\"repositories listing\" width=\"300\" height=\"133\" class=\"size-medium wp-image-580\" srcset=\"https:\/\/blog.unetresgrossebite.com\/wp-content\/uploads\/2017\/05\/kg-reporefresh-300x133.png 300w, https:\/\/blog.unetresgrossebite.com\/wp-content\/uploads\/2017\/05\/kg-reporefresh.png 652w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-580\" class=\"wp-caption-text\">repositories listing<\/p><\/div>\n<p>Being a 1 day DYI project, every feedback is welcome, <a href=\"https:\/\/github.com\/faust64\/keengreeper\" target=\"_blank\">GitHub<\/a> is good place to start, &#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Short post today, introducing KeenGreeper, a project I freshly released to GitHub, aiming to replace Greenkeeper 2. For those of you that may not be familiar with Greenkeeper, they provide with a public service that integrates with GitHub, detects your NodeJS projects dependencies and issues a pull request whenever one of these may be updated. [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[8,10,6,2],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.unetresgrossebite.com\/index.php?rest_route=\/wp\/v2\/posts\/574"}],"collection":[{"href":"https:\/\/blog.unetresgrossebite.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.unetresgrossebite.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.unetresgrossebite.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.unetresgrossebite.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=574"}],"version-history":[{"count":10,"href":"https:\/\/blog.unetresgrossebite.com\/index.php?rest_route=\/wp\/v2\/posts\/574\/revisions"}],"predecessor-version":[{"id":611,"href":"https:\/\/blog.unetresgrossebite.com\/index.php?rest_route=\/wp\/v2\/posts\/574\/revisions\/611"}],"wp:attachment":[{"href":"https:\/\/blog.unetresgrossebite.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=574"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.unetresgrossebite.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=574"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.unetresgrossebite.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=574"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}