<?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: abap-observability-tools</title>
    <description>The latest articles on DEV Community by abap-observability-tools (@abapobservtools).</description>
    <link>https://dev.to/abapobservtools</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%2Forganization%2Fprofile_image%2F3796%2F3d98cd83-9112-46d1-8af1-6350b7b9dbe0.png</url>
      <title>DEV Community: abap-observability-tools</title>
      <link>https://dev.to/abapobservtools</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/abapobservtools"/>
    <language>en</language>
    <item>
      <title>GitHub actions example for automatic release drafts and changelog.md creation</title>
      <dc:creator>Johannes Konings</dc:creator>
      <pubDate>Sun, 28 Feb 2021 08:15:18 +0000</pubDate>
      <link>https://dev.to/abapobservtools/github-actions-example-for-automatic-release-drafts-and-changelog-md-creation-34k7</link>
      <guid>https://dev.to/abapobservtools/github-actions-example-for-automatic-release-drafts-and-changelog-md-creation-34k7</guid>
      <description>&lt;h1&gt;
  
  
  What are GitHub actions?
&lt;/h1&gt;

&lt;p&gt;That is well described in this &lt;a href="https://dev.to/github/what-are-github-actions-3pml"&gt;post&lt;/a&gt; by &lt;a href="https://dev.to/bdougieyo"&gt;Brian Douglas&lt;/a&gt;. He has also an entire &lt;a href="https://dev.to/github/28-days-of-github-action-tips-4opg"&gt;post series&lt;/a&gt; about tips around GitHub actions.&lt;/p&gt;

&lt;h1&gt;
  
  
  Which problem should be solved?
&lt;/h1&gt;

&lt;p&gt;There are different solutions to create automatic releases based on certain criteria. Again &lt;a href="https://dev.to/bdougieyo"&gt;Brian Douglas&lt;/a&gt; pointed out some possibilities in this &lt;a href="https://dev.to/github/generate-semantic-release-with-github-actions-2lll"&gt;post&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;For &lt;a href="https://github.com/abap-observability-tools" rel="noopener noreferrer"&gt;this&lt;/a&gt; open-source project, the requirement was to determine the release structure via labels at the pull request. This was preferred over &lt;a href="https://www.conventionalcommits.org/en/v1.0.0/" rel="noopener noreferrer"&gt;conventional commits&lt;/a&gt;. Also, not every merged pull request should automatically trigger a new release. Therefore, a draft is the right way to collect the changes and publish a version whenever needed.&lt;/p&gt;

&lt;p&gt;Addionatylly to the GitHub releases, a changelog.md helps see the version history, for example, directly in the code editor. That changelog.md should be updated every time a release is published.&lt;/p&gt;

&lt;p&gt;The combination &lt;a href="https://github.com/release-drafter/release-drafter" rel="noopener noreferrer"&gt;Release Drafter&lt;/a&gt; and &lt;a href="https://github.com/github-tools/github-release-notes" rel="noopener noreferrer"&gt;gren&lt;/a&gt; is the approach to solve the problem.&lt;/p&gt;

&lt;h1&gt;
  
  
  Configure Release Drafter
&lt;/h1&gt;

&lt;p&gt;To configure &lt;a href="https://github.com/release-drafter/release-drafter" rel="noopener noreferrer"&gt;Release Drafter&lt;/a&gt; in the default way, it needs two files and the according labels.&lt;/p&gt;

&lt;p&gt;This &lt;a href="https://github.com/abap-observability-tools/abap-log-exporter/blob/main/.github/release-drafter.yml" rel="noopener noreferrer"&gt;template&lt;/a&gt; describes the structure of the release draft and the needed labels. The full path is &lt;code&gt;.github/release-drafter.yml&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;name-template: 'v$RESOLVED_VERSION 🌈'
tag-template: 'v$RESOLVED_VERSION'
categories:
  - title: '🚀 Features'
    labels:
      - 'feature'
      - 'enhancement'
  - title: '🐛 Bug Fixes'
    labels:
      - 'fix'
      - 'bugfix'
      - 'bug'
  - title: '🧰 Maintenance'
    label: 'chore'
  - title: '🧺 Miscellaneous' #Everything except ABAP
    label: 'misc'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
change-title-escapes: '\&amp;lt;*_&amp;amp;' # You can add # and @ to disable mentions, and add ` to disable code blocks.
version-resolver:
  major:
    labels:
      - 'major'
  minor:
    labels:
      - 'minor'
  patch:
    labels:
      - 'patch'
  default: patch
template: |
  ## Changes
  $CHANGES

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The GitHub actions &lt;a href="https://github.com/abap-observability-tools/abap-log-exporter/blob/main/.github/workflows/release-drafter.yml" rel="noopener noreferrer"&gt;configuration&lt;/a&gt; like this:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;github/workflows/release-drafter.yml&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;name: Release Drafter

on:
  push:
    # branches to consider in the event; optional, defaults to all
    branches:
      - main

jobs:
  update_release_draft:
    runs-on: ubuntu-latest
    steps:
      # Drafts your next Release notes as Pull Requests are merged into "master"
      - uses: release-drafter/release-drafter@v5
        env:
          GITHUB_TOKEN: $

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h1&gt;
  
  
  Configure gren
&lt;/h1&gt;

&lt;p&gt;The releases are published manually at certain times. This trigger &lt;a href="https://github.com/abap-observability-tools/abap-log-exporter/blob/main/.github/workflows/update-changelog.yml" rel="noopener noreferrer"&gt;this&lt;/a&gt; configuration.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;name: "update changelog"
on:
  release:
    types: [published]

jobs:
  update-changelog:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2

    - name: Update changelog
      run: |
        npm install github-release-notes
        export GREN_GITHUB_TOKEN=$
        npm run overrideChangelog
    - name: Create Pull Request
      uses: peter-evans/create-pull-request@v3
      with:
        commit-message: update changelog
        title: Update Changelog
        body: Update changelog to reflect release changes
        branch: update-changelog
        base: main

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The command &lt;code&gt;"overrideChangelog": "gren changelog --override"&lt;/code&gt; from the &lt;a href="https://github.com/abap-observability-tools/abap-log-exporter/blob/main/package.json" rel="noopener noreferrer"&gt;package.json&lt;/a&gt; update then the changelog.md.&lt;/p&gt;

&lt;p&gt;Because of the main branch protection, it’s not possible to push the changes directly back. This will do this via a pull request with the GitHub action &lt;a href="https://github.com/marketplace/actions/create-pull-request" rel="noopener noreferrer"&gt;create-pull-request&lt;/a&gt;.&lt;/p&gt;
&lt;h1&gt;
  
  
  How it looks like
&lt;/h1&gt;

&lt;p&gt;The collection of the changes in a release draft.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fjohanneskonings.dev%2Fimg%2F2021-02-28-github_automatic_releases_and%2520changelog%2Frelease-draft.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fjohanneskonings.dev%2Fimg%2F2021-02-28-github_automatic_releases_and%2520changelog%2Frelease-draft.png" alt="release-draft" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The labels in a pull request.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fjohanneskonings.dev%2Fimg%2F2021-02-28-github_automatic_releases_and%2520changelog%2Flabel-pull-request.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fjohanneskonings.dev%2Fimg%2F2021-02-28-github_automatic_releases_and%2520changelog%2Flabel-pull-request.png" alt="label-pull-request" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The result in the GitHub release.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fjohanneskonings.dev%2Fimg%2F2021-02-28-github_automatic_releases_and%2520changelog%2Fminor-enhancement.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fjohanneskonings.dev%2Fimg%2F2021-02-28-github_automatic_releases_and%2520changelog%2Fminor-enhancement.png" alt="minor-enhancement" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The result in the CHANGELOG.md.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fjohanneskonings.dev%2Fimg%2F2021-02-28-github_automatic_releases_and%2520changelog%2Fchangelog.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fjohanneskonings.dev%2Fimg%2F2021-02-28-github_automatic_releases_and%2520changelog%2Fchangelog.png" alt="changelog" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;
  
  
  Code
&lt;/h1&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fassets.dev.to%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/abap-observability-tools" rel="noopener noreferrer"&gt;
        abap-observability-tools
      &lt;/a&gt; / &lt;a href="https://github.com/abap-observability-tools/abap-log-exporter" rel="noopener noreferrer"&gt;
        abap-log-exporter
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Exports SAP Netweaver logs to a log system of your choice.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/abap-observability-tools/abap-log-exporterdocs/logo-abap-log-exporter-horizontal.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2Fabap-observability-tools%2Fabap-log-exporterdocs%2Flogo-abap-log-exporter-horizontal.png" alt="abap-log-exporter"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;abap-log-exporter 🚧 WIP&lt;/h1&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://snyk.io/test/github/Goala/abap-log-exporter?targetFile=package.json" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/c4e5d877dcd6909ec799e172f02bc25d4809e04b72e2c408c6d94ab30bd21f39/68747470733a2f2f736e796b2e696f2f746573742f6769746875622f476f616c612f616261702d6c6f672d6578706f727465722f62616467652e7376673f74617267657446696c653d7061636b6167652e6a736f6e" alt="Known Vulnerabilities"&gt;&lt;/a&gt;
&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/2e8284eb0bc04449989392bec8d7f5a31a21b67d1130e0bdb2d8e7685e7bbec4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7061636b6167652d6a736f6e2f646570656e64656e63792d76657273696f6e2f476f616c612f616261702d6c6f672d6578706f727465722f6465762f40616261706c696e742f636c69"&gt;&lt;img src="https://camo.githubusercontent.com/2e8284eb0bc04449989392bec8d7f5a31a21b67d1130e0bdb2d8e7685e7bbec4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7061636b6167652d6a736f6e2f646570656e64656e63792d76657273696f6e2f476f616c612f616261702d6c6f672d6578706f727465722f6465762f40616261706c696e742f636c69" alt="GitHub package.json dependency version (dev dep on branch)"&gt;&lt;/a&gt;
&lt;a rel="noopener noreferrer" href="https://github.com/Goala/abap-log-exporter/workflows/Run%20abaplint/badge.svg"&gt;&lt;img src="https://github.com/Goala/abap-log-exporter/workflows/Run%20abaplint/badge.svg" alt="Run abaplint"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;architecture&lt;/h1&gt;

&lt;/div&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/abap-observability-tools/abap-log-exporter./out/architecture/architecture/architecture.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2Fabap-observability-tools%2Fabap-log-exporter.%2Fout%2Farchitecture%2Farchitecture%2Farchitecture.png" alt="architecture"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;documentation&lt;/h1&gt;

&lt;/div&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;components&lt;/h2&gt;

&lt;/div&gt;
&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;component&lt;/th&gt;
&lt;th&gt;variant&lt;/th&gt;
&lt;th&gt;status&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;reader&lt;/td&gt;
&lt;td&gt;BAL&lt;/td&gt;
&lt;td&gt;✔️&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;

&lt;td&gt;SMICM&lt;/td&gt;
&lt;td&gt;open&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;

&lt;td&gt;SM21&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/abap-observability-tools/abap-log-exporter/issues/41" rel="noopener noreferrer"&gt;#41&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;converter&lt;/td&gt;
&lt;td&gt;GELF&lt;/td&gt;
&lt;td&gt;✔️&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;

&lt;td&gt;Loki&lt;/td&gt;
&lt;td&gt;✔️&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;connector&lt;/td&gt;
&lt;td&gt;GELF&lt;/td&gt;
&lt;td&gt;✔️&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;

&lt;td&gt;Loki&lt;/td&gt;
&lt;td&gt;✔️&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;customizing&lt;/h2&gt;

&lt;/div&gt;
&lt;p&gt;Different scenarios can be customized via transaction ZALE_CONFIG. This are the fields for each sceanrio&lt;/p&gt;
&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Field&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;reader class&lt;/td&gt;
&lt;td&gt;class for the reader component&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;converter class&lt;/td&gt;
&lt;td&gt;class for the converter component&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;connector url&lt;/td&gt;
&lt;td&gt;URL to the log tool e.g. GrayLog&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;connector class&lt;/td&gt;
&lt;td&gt;class for the connector component&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;local tests&lt;/h1&gt;

&lt;/div&gt;
&lt;p&gt;&lt;a href="https://github.com/abap-observability-tools/abap-log-exporterlocal-tests/" rel="noopener noreferrer"&gt;local test folder&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;⚠️ instead of localhost the URLs have to be customized with the IP of the Ethernet Adapter&lt;/p&gt;
&lt;/div&gt;



&lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/abap-observability-tools/abap-log-exporter" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;


</description>
      <category>github</category>
      <category>githubactions</category>
    </item>
  </channel>
</rss>
