<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Hans-Helge Buerger</title>
    <description>The latest articles on DEV Community by Hans-Helge Buerger (@obstschale).</description>
    <link>https://dev.to/obstschale</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F86626%2F6ad95cc1-44f0-4f15-9eb7-d6fdfe29c7d1.jpeg</url>
      <title>DEV Community: Hans-Helge Buerger</title>
      <link>https://dev.to/obstschale</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/obstschale"/>
    <language>en</language>
    <item>
      <title>Changelogger: Writing comittable changelogs</title>
      <dc:creator>Hans-Helge Buerger</dc:creator>
      <pubDate>Mon, 16 Sep 2019 07:12:44 +0000</pubDate>
      <link>https://dev.to/obstschale/changelogger-writing-comittable-changelogs-58ba</link>
      <guid>https://dev.to/obstschale/changelogger-writing-comittable-changelogs-58ba</guid>
      <description>&lt;p&gt;We all know, a good project needs a changelog. Either for other devs to inform them about breaking changes or for our users, who want to stay up to date about new features. Changelogs are incredebly useful, if done in a good manner. At our company we keep a changelog for our users. But writing them was a tedious and time-consuming task. I did some research and ended up writing a CLI tool helping us: &lt;a href="https://github.com/churchtools/changelogger" rel="noopener noreferrer"&gt;Changelogger&lt;/a&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;tl;dr&lt;br&gt;
New CLI tool named '&lt;a href="https://github.com/churchtools/changelogger" rel="noopener noreferrer"&gt;Changelogger&lt;/a&gt;'. It creates for each change a separate file, which can be committed and on release day, it grabs all logs and add them to &lt;code&gt;CHANGELOG.md&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;We use GitLab and like other projects we use Issues to manage every bug or feature. If something has changed, which needs to have a changelog entry we used to write the log message into the body of the issue.&lt;/p&gt;

&lt;p&gt;This worked int the beginning, but now it became complicated. Either the programmer forgot to add a changelog or the reviewer merged the merge request (MR), but the changelog was missing. The MR had no information if a changelog is added or missing.&lt;/p&gt;

&lt;p&gt;But the most annoying work were during a release. We need to manually copy all logs into a single file, organize them and then publish. If you manage like 3-5 issues, this is not a big deal, but our team grew and we fix more bugs, add more features and know we deal with like up to 50 issues.&lt;/p&gt;

&lt;p&gt;We need help!&lt;/p&gt;

&lt;h2&gt;
  
  
  The Solution
&lt;/h2&gt;

&lt;p&gt;We though about the problems, and few requirements were set:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Adding a changelog should be easy&lt;/li&gt;
&lt;li&gt;The changelog needs to be visible within a MR&lt;/li&gt;
&lt;li&gt;Avoid merge conflicts&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This first idea was, we add a &lt;code&gt;CHANGELOG.md&lt;/code&gt; file and we write every log directly to the file. But this is not a smart idea, to be hornest. Because if many developer start adding new log, merge conflicts are happening pretty often. So I did some research.&lt;/p&gt;

&lt;h3&gt;
  
  
  Keep a Changelog
&lt;/h3&gt;

&lt;p&gt;Quickly, I found &lt;a href="https://keepachangelog.com/" rel="noopener noreferrer"&gt;Keep a Changelog&lt;/a&gt;. This is not a standard but a recommendation. &lt;a href="https://olivierlacan.com/" rel="noopener noreferrer"&gt;Oliver Lacan&lt;/a&gt; wrote it and I think he did a great job. He describes a good format for a changelog and shows the advantages of keeping a good changelog.&lt;/p&gt;

&lt;p&gt;The site is nice, but still not a solution to our problem.&lt;/p&gt;

&lt;h3&gt;
  
  
  GitLab
&lt;/h3&gt;

&lt;p&gt;I found this documentation at GitLab about &lt;a href="https://docs.gitlab.com/ee/development/changelog.html" rel="noopener noreferrer"&gt;Changelog Entries&lt;/a&gt;. The engineers at GitLab had have the same problem and wrote a bash script, which simply creates a new YAML file for each log, which can be comittet.&lt;/p&gt;

&lt;p&gt;This is a good start. But I wanted more.&lt;/p&gt;

&lt;h2&gt;
  
  
  Changelogger
&lt;/h2&gt;

&lt;p&gt;I love open source, and I think writing changelogs need to be easier. So I started to put the idea into code and wrote "Changelogger". It's a CLI Tool for any project to add new logs.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F88mgfw6b5ecdpbo6i5lz.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F88mgfw6b5ecdpbo6i5lz.gif" alt="Changelogger Demo"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can either use Composer to install it as dependency to your project or install it globally. If you're not a PHP developer feel free to download the &lt;a href="https://github.com/churchtools/changelogger/releases" rel="noopener noreferrer"&gt;PHAR file&lt;/a&gt;, which is a PHP executable archive format.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Important:&lt;/strong&gt; Please note, that the project is still in beta. Check the &lt;a href="https://github.com/churchtools/changelogger/blob/master/CHANGELOG.md" rel="noopener noreferrer"&gt;changelog&lt;/a&gt; for information about breaking changes. Also keep in mind, that breaking change may happen in minor versions until 1.0.0 is released (see SemVer).&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Features
&lt;/h3&gt;

&lt;p&gt;The idea of the tool is simple. Add a log, and during release grab all logs and add them to the Changelog.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;changelogger new&lt;/code&gt;: Create a new log entry. The tool asks for the type&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;changelogger show&lt;/code&gt;: Show all unreleased changes&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;changelogger release &amp;lt;tag&amp;gt;&lt;/code&gt;: Take all unreleased changes and add them to &lt;code&gt;CHANGELOG.md&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;changelogger clean&lt;/code&gt;: Fresh Start. Remove all unreleasd changes&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Authors
&lt;/h3&gt;

&lt;p&gt;At GitLab the added an &lt;code&gt;author&lt;/code&gt; field. For GitLab-engineers the field is omitted, but if you are contributing to the open source project, you are allowed to add your name to take credits for the change (even if it's only a typo fix).&lt;/p&gt;

&lt;p&gt;This is pretty neat and it encourages people to contribute, I think. So using the author flag &lt;code&gt;changelogger new --author 'Peter'&lt;/code&gt; you can fill in your name.&lt;/p&gt;

&lt;h3&gt;
  
  
  Groups
&lt;/h3&gt;

&lt;p&gt;This is still a feature in work, but we build a large software with many modules. To keep the changelog readable we divide the logs into sections for each module. You can add a config file to the root of your project and define the groups you need.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# .changelogger.json
{
  "groups": [
    "Module 1",
    "Module 2",
    "Module 3"
  ]
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If groups are available the tool will also ask for a group.&lt;/p&gt;

&lt;h3&gt;
  
  
  Empty Logs
&lt;/h3&gt;

&lt;p&gt;We though about empty logs as an option to add a log file to the merge request but only to indicate that this change does not need a log entry. So the reviewer can see, that this change is not meant to be listed in the changelog.&lt;/p&gt;

&lt;p&gt;This also allows us to configure our CI Pipeline to check for the existance of a log file. So the programmer did not forget the changelog at all but rather state that s/he thinks that this change does not need an entry.&lt;/p&gt;

&lt;h3&gt;
  
  
  Internals
&lt;/h3&gt;

&lt;p&gt;The tool is written in PHP using the &lt;a href="https://laravel-zero.com/" rel="noopener noreferrer"&gt;Laravel Zero&lt;/a&gt;. However, like I mentioned about you can use the PHAR to run the tool directly. Only PHP 7.1+ is required as interpreter.&lt;/p&gt;

&lt;p&gt;Each new log file is put into the directory &lt;code&gt;./changelogs/unreleased&lt;/code&gt; and is a basic YAML file.&lt;/p&gt;

&lt;h2&gt;
  
  
  What do you think?
&lt;/h2&gt;

&lt;p&gt;I would like to know, do you keep a changelog and do you write them with passion or is a changelog more a waste of time?&lt;/p&gt;

&lt;p&gt;What do you think about Changelogger? Could such a tool help you writing better changelogs?&lt;/p&gt;

</description>
      <category>changelog</category>
      <category>php</category>
      <category>cli</category>
    </item>
    <item>
      <title>Looking for good practices for JS SDK</title>
      <dc:creator>Hans-Helge Buerger</dc:creator>
      <pubDate>Fri, 03 Aug 2018 15:36:54 +0000</pubDate>
      <link>https://dev.to/obstschale/looking-for-good-practices-for-js-sdk-597n</link>
      <guid>https://dev.to/obstschale/looking-for-good-practices-for-js-sdk-597n</guid>
      <description>

&lt;p&gt;I have built an online service with Laravel*, which has a REST API to interact with. Now I'm going to build a CLI tool to send data to the service using JS. I'm fairly new to CLI tools with JS. For this CLI tool I want to write a separated SDK so others can use it as well.&lt;/p&gt;

&lt;p&gt;What are good / best practices to write an REST SDK in JavaScript? Do you have some advice for me or do you know a good SDK I can dig into?&lt;/p&gt;

&lt;p&gt;I appreciate your help!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;* it's called &lt;a href="https://speedtest-collector.de"&gt;Speedtest Collector&lt;/a&gt; if you're interested.&lt;/em&gt;&lt;/p&gt;


</description>
      <category>javascript</category>
      <category>sdk</category>
      <category>goodpractice</category>
      <category>discuss</category>
    </item>
  </channel>
</rss>
