Code Monkey home page Code Monkey logo

matyan's Introduction

Matyan

Generate changelog from Git commits.

PyPI Version

Supported Python versions

Build Status

GPL-2.0-only OR LGPL-2.1-or-later

Coverage

Prerequisites

  • Python 3.6, 3.7 and 3.8

Documentation

Documentation is available on Read the Docs.

Installation

Latest stable version on PyPI:

Usage

Basic usage

See Basic concepts section to get impression on possible commit methodology and assumptions taken.

Generate changelog:

Generate changelog skipping orphaned commits:

In some cases you would only want to show what has been done with tickets and skip all non-ticket related commits.

Generate changelog between two releases:

In other cases you would want to show what has been done since last release. The following example would generate changelog since version 0.0.1 to version 0.0.3.

Generate changelog between two branches:

Sometimes you just need to show the changes made on acceptance since last production release. The following example would generate changelog with changes that are on acceptance branch and not yet in master.

Generate changelog with releases info shown

Generate changelog between releases with releases info shown

Generate changelog between branches with releases info shown

Generate changelog for the latest release with releases info shown

Generate changelog with headings only (no commit messages) and releases info shown

Generate changelog between two branches, show unreleased changes only:

Rendering

The following renderers are implemented:

  • Markdown
  • RestructuredText
  • Historical Markdown (for compatibility with matyan versions prior to 0.4).

Markdown

RestructuredText

Historical Markdown

Jira integration

It's possible to fetch ticket title and description from Jira. In order for it to work, you should provide a fetch-title and fetch-description arguments.

The following needs to be added to your .matyan.ini:

[Settings]
fetchDataFrom=Jira

In addition to that, you should put valid Jira credentials into your global .matyan.ini configuration file.

Command to run:

Have in mind, that matyan shall be installed with jira option.

Alternatively, make sure atlassian-python-api is installed.

Examples

See the output directory for examples.

Additionally see the Jupyter notebook examples.

Configuration

In order to customize names and texts, add a .matyan.ini in your project directory, from which you will be running the generate-changelog command.

Sample configuration:

[BranchTypes]
feature: Feature
bugfix: Bugfix
hotfix: Hotfix
deprecation: Deprecation

[OtherBranchType]
other: Other

[Unreleased]
unreleased: Unreleased

[IgnoreCommits]
exact: more
       clean up
       code comments
       more on docs
       repo
       working
       more on
       wip
       commit
prefix: more on
        continue on

Note, that placing .matyan.ini into the home root will make that configuration global for all projects. That however could be handy, since local .matyan.ini files simply extend the global ones. For example, you could use global configuration for storing Jira credentials.

[Jira]
url:https://barseghyanartur.atlassian.net/
username:[email protected]
token:abcd1234

Note, however, that sections are copied over entirely.

Tips and tricks

Write to file

Create initial config file

Testing

Simply type:

Or use tox:

Or use tox to check specific env:

Debugging

Sometimes checking logs could be handy. Matyan logs are stored in the directory, from which you are running the generate-changelog (or any other Matyan) command.

Update your .matyan.ini configuration in the following way:

[Settings]
debug=true

If you want to modify current logging, use MATYAN_LOGGING_CONFIG environment variable.

Default configuration:

Writing documentation

Keep the following hierarchy.

=====
title
=====

header
======

sub-header
----------

sub-sub-header
~~~~~~~~~~~~~~

sub-sub-sub-header
^^^^^^^^^^^^^^^^^^

sub-sub-sub-sub-header
++++++++++++++++++++++

sub-sub-sub-sub-sub-header
**************************

License

GPL-2.0-only OR LGPL-2.1-or-later

Support

For any issues contact me at the e-mail given in the Author section.

Author

Artur Barseghyan <[email protected]>

matyan's People

Contributors

barseghyanartur avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

matyan's Issues

Document methodology

Things like:

  • More on
  • Internal
  • Explain for instance, that if want to see which changes on acceptance branch have not yet been deployed, you go to that acceptance branch and do --show-releases --headings-only

Make sure JIRA merge format works



commit 1c57a939d2fa827d97c53c92c032e62408e5dd25	refs/heads/feature/gitchangelog-introduction
Merge: 2e27438a 011ba17f
Author: First Last <[email protected]>
Date:   Thu Oct 31 13:10:48 2019 +0100

    Merge pull request #1234 in PROJ/repo from bugfix/PROJ-3545-currency-not-saved-at-sso to dev
    
    * commit '011ba17f70daf21c7ee608ccfda627fc754d51b8':
      PROJ-3545 Save user currency on SSO.

By default, hide empty records

$ generate-changelog master..dev --show-releases

### Unreleased

**Bugfix**

*MSFT-1240 Linkedin Authentication Failing*

- Update authentication pipeline [Artur Barseghyan]
- Fix package configuration [Artur Barseghyan]

**Deprecation**

*MSFT-1239 Deprecate Python2*


**Other**


### 0.2

**Other**


### 0.1

**Other**

Add optional fetch info from JIRA

Goal

Add optional fetch info from JIRA And in general, make it flexible.

Update (2019-12-20)

Work in progress in branch feature/21-Add-optional-fetch-info-from-JIRA.

Sample output of generate-changelog --show-description --show-releases --headings-only command:

0.1

Deprecation

MAT-2 Deprecate old api

Deprecate old API.

* Show deprecation warnings in the Python client.
* Return deprecation message with results.
* Prepare switch to turn off old API.

Feature

MAT-1 Car type suggester

Implement cat type suggester. Pay attention to the details.

Git repository used to generate the output: bitbucket.org/barseghyanartur/matyan-testing-jira-integration.

Sample Matyan configuration

[Jira]
url:https://YOUR-SUBDOMAIN.atlassian.net/
username:YOUR-USERNAME
token:YOUR-TOKEN

[Settings]
fetchDataFrom=Jira

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.