logo

NJP

Git My Stuff v1.0 - Automatically save your update sets to GitHub

Import · Mar 08, 2018 · article

Just uploaded to Share a quick app I made to automatically upload local update sets to your GitHub repository. That way if you lose access to your dev instance, you haven't lost all your code and configs. Of course this is even more useful if you're really diligent about organizing your update sets, but that's another topic altogether...

The app is fired by a scheduled job, and then goes through each update set and offloads it (the same way you do when you click the "Export to XML" link) to an XML packet. That packet is then uploaded to GitHub via REST. The file name of the upload is the instance name plus the sys_id of the update set. The description of the file is the description of your update set in ServiceNow.

The app keeps track of when it last sent an update set, so it only sends update sets that were updated since last time, and each upload shows up as a different commit of the same file. The app can upload to a public or a private repo as well.

Link: https://share.servicenow.com/app.do#/detailV2/4911c924db749f001afe13141b961970/overview

Please let me know if you run into any issues or have any feedback!

imageimage

View original source

https://www.servicenow.com/community/developer-articles/git-my-stuff-v1-0-automatically-save-your-update-sets-to-github/ta-p/2321107