Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tmillr/breaking-change

A GitHub Action for automatically reporting breaking changes detected via conventional commits.
https://github.com/tmillr/breaking-change

actions breaking-changes conventional-changelog conventional-commits github-actions neovim nvim vim

Last synced: about 1 month ago
JSON representation

A GitHub Action for automatically reporting breaking changes detected via conventional commits.

Awesome Lists containing this project

README

        

# Breaking Change

[![codecov](https://codecov.io/github/tmillr/breaking-change/branch/master/graph/badge.svg?token=CdtcYcijqb)](https://codecov.io/github/tmillr/breaking-change)

This GitHub action automatically detects breaking changes by scanning the messages of commits pushed to your repository for [conventional commit](https://www.conventionalcommits.org) syntax. For each commit that signals a breaking change, its message content will be posted as a comment on a preselected/predetermined GitHub issue and/or discussion (whose number is specified via the action's inputs). The action will error if neither an issue or discussion is specified, although both may be specified. The order of commits are preserved and are reflected in the order of the comments. Such a discussion or issue not only serves as a central, autonomous, chronological log of breaking changes, but also as a source of breaking change notifications for users who subscribe to the issue/discussion.

## Usage

~~~yaml
- name: Report Breaking Changes
uses: tmillr/breaking-change@v2
# Only trigger step on push events occurring on your release branch
if: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
with:
# The token to be used for posting the comments
token: ${{ github.token }}
# Issue and/or discussion number where breaking changes should be reported
issueNumber: 1
discussionNumber: 2
~~~

### Inputs

| **Key** | **Description** | **Required** | **Default** |
| --- | --- | :---: | :---: |
| `token` | The token used for posting the comments. | `false` | `${{ github.token }}` |
| `issueNumber` | Issue to comment on for each breaking change commit found. May be combined with `discussionNumber`. (`integer`) | `false` | |
| `discussionNumber` | Discussion to comment on for each breaking change commit found. May be combined with `issueNumber`. (`integer`) | `false` | |
| `headerLevel` | Header level for the commit message title/subject (use `false` to disable header styling of commit title). (`1\|2\|3\|4\|5\|6\|false`) | `false` | `3` |

### Outputs

| **Key** | **Description** |
| ------- | --------------------------------------------------- |
| `found` | Whether a breaking change was detected. (`boolean`) |

## Tips

- Lock the issue/discussion used for reporting breaking changes (only allow maintainers etc. to comment).

## Caveats

- Using the issue/discussion method alone, it may not be clear or obvious which reported breaking changes belong to which versions/releases of the software.

- Only detects [conventional commits](https://www.conventionalcommits.org).