op-release-notes

1.4.8 • Public • Published

op Release Notes

op Release Notes is a simple release notes tool that pulls directly from your GitLab repository gleening closed issues based on your defined milestones.

op Release Notes utilizes GitLab API to pull all open issues that have a milestone assigned in your GitLab project. It will use the milestone as the versioning number and group closed issues to those milestones. It will create a "release-notes.json" file.

You may use the JSON file however you deem, just know there is also a web based tool available to you that will draw the release notes.


Example of usage in an application

Screen Shot

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

To use op Release Notes, you will need to have a couple of things:

Installing

Install op-release-notes NPM package

npm install op-release-notes

Edit your projects package.json file to add config variables

  "config": {
    "gitlabUrl": "https://gitlab.sandia.gov",
    "gitlabProjectId": "<git project id>",
    "gitlabAccessToken": "<personal access token>",
    "iconPath": "images/icon_sm.png"
  },

Configure JSON generation trigger

The JSON file will be created upon request. This can be setup to run real-time in your code, upon bootup of the application or as part of your CI/CD process. It is up to you to determine the correct injection point into your process.

Real-time

If you would like real-time generation... Insert the following in your application at the point in the flow where you would like GitLab queried and the "release-notes.json" file populated.

const opRelNotes = require("op-release-notes");
opRelNotes.QueryForData();
CI/CD Process

If you would like CI/CD generation... place this anywhere in your CI/CD process.

Note: The data will be gathered from GitLab at the time it processes, so any unclosed issues will not be captured. Please make sure you take this into concideration prior to injecting this step in your process. {: .note}

Here is an example of it running after a commit and unit test.

//just kidding... I havent proven this out yet to give a sample... still working on it
check back === later

Displaying the Release Results

Feel free to take the "release-notes.json" file and process it however you see fit in your application. We have provided a Javascript function to display the Release Notes in a given element id.

For an example of how to use this, try the following:

<div id="release-notes-container"></div>

<script>
    const opRelNotes = require("op-release-notes");

    // Enter your HTML element ID to create the release notes.
    opRelNotes.Draw("release-notes-container");
</script>

Authors

  • Philip Eckenroth - Initial work

Readme

Keywords

none

Package Sidebar

Install

npm i op-release-notes

Weekly Downloads

1

Version

1.4.8

License

ISC

Unpacked Size

787 kB

Total Files

19

Last publish

Collaborators

  • peckenr