Skip to content

Commit

Permalink
refactor: Remove broken Atom commit convention
Browse files Browse the repository at this point in the history
  • Loading branch information
pawamoy committed Aug 17, 2023
1 parent 9e879f5 commit 2f33180
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 30 deletions.
7 changes: 3 additions & 4 deletions README.md
Expand Up @@ -15,7 +15,7 @@ Automatic Changelog generator using Jinja2 templates. From git logs to change lo
Built-in [Keep a Changelog][keep-a-changelog] and [Angular][angular] templates
(also see [Conventional Changelog][conventional-changelog]).
- Commit styles/conventions parsing.
Built-in [Angular][angular-convention], [Conventional Commit][conventional-commit], [Atom][atom-convention] and basic conventions.
Built-in [Angular][angular-convention], [Conventional Commit][conventional-commit] and basic conventions.
- Git service/provider agnostic,
plus references parsing (issues, commits, etc.).
Built-in [GitHub][github-refs], [Gitlab][gitlab-refs] and [Bitbucket][bitbucket-refs] support.
Expand All @@ -39,7 +39,6 @@ Automatic Changelog generator using Jinja2 templates. From git logs to change lo
[angular]: https://github.com/angular/angular/blob/master/CHANGELOG.md
[conventional-changelog]: https://github.com/conventional-changelog/conventional-changelog
[semantic-versioning]: http://semver.org/spec/v2.0.0.html
[atom-convention]: https://github.com/atom/atom/blob/master/CONTRIBUTING.md#git-commit-messages
[angular-convention]: https://github.com/angular/angular/blob/master/CONTRIBUTING.md#commit
[conventional-commit]: https://www.conventionalcommits.org/en/v1.0.0/
[github-refs]: https://help.github.com/articles/autolinked-references-and-urls/
Expand Down Expand Up @@ -71,7 +70,7 @@ pipx install git-changelog
```
usage: git-changelog [-b] [-h] [-i] [-g VERSION_REGEX] [-m MARKER_LINE]
[-o OUTPUT] [-r] [-R] [-I INPUT]
[-c {angular,atom,conventional,basic}] [-s SECTIONS]
[-c {angular,conventional,basic}] [-s SECTIONS]
[-t {angular,keepachangelog}] [-T] [-E] [-v]
[REPOSITORY]
Expand Down Expand Up @@ -174,7 +173,7 @@ options:
in the changelog. Default: False.
-I, --input INPUT Read from given file when creating release notes.
Default: CHANGELOG.md.
-c, --style, --commit-style, --convention {angular,atom,conventional,basic}
-c, --style, --commit-style, --convention {angular,conventional,basic}
The commit convention to match against. Default:
basic.
-s, --sections SECTIONS
Expand Down
4 changes: 1 addition & 3 deletions src/git_changelog/build.py
Expand Up @@ -14,7 +14,6 @@

from git_changelog.commit import (
AngularConvention,
AtomConvention,
BasicConvention,
Commit,
CommitConvention,
Expand Down Expand Up @@ -157,7 +156,6 @@ class Changelog:
CONVENTION: ClassVar[dict[str, type[CommitConvention]]] = {
"basic": BasicConvention,
"angular": AngularConvention,
"atom": AtomConvention, # type: ignore[type-abstract]
"conventional": ConventionalCommitConvention,
}

Expand All @@ -177,7 +175,7 @@ def __init__(
Arguments:
repository: The repository (directory) for which to build the changelog.
provider: The provider to use (github.com, gitlab.com, etc.).
convention: The commit convention to use (angular, atom, etc.).
convention: The commit convention to use (angular, etc.).
parse_provider_refs: Whether to parse provider-specific references in the commit messages.
parse_trailers: Whether to parse Git trailers in the commit messages.
sections: The sections to render (features, bug fixes, etc.).
Expand Down
2 changes: 1 addition & 1 deletion src/git_changelog/cli.py
Expand Up @@ -35,7 +35,7 @@

DEFAULT_VERSION_REGEX = r"^## \[(?P<version>v?[^\]]+)"
DEFAULT_MARKER_LINE = "<!-- insertion marker -->"
CONVENTIONS = ("angular", "atom", "conventional", "basic")
CONVENTIONS = ("angular", "conventional", "basic")


class Templates(tuple): # (subclassing tuple)
Expand Down
22 changes: 0 additions & 22 deletions src/git_changelog/commit.py
Expand Up @@ -388,25 +388,3 @@ def parse_commit(self, commit: Commit) -> dict[str, str | bool]: # noqa: D102
"is_minor": is_minor,
"is_patch": is_patch,
}


class AtomConvention(CommitConvention):
"""Atom commit message convention."""

TYPES: ClassVar[dict[str, str]] = {
":art:": "", # when improving the format/structure of the code
":racehorse:": "", # when improving performance
":non-potable_water:": "", # when plugging memory leaks
":memo:": "", # when writing docs
":penguin:": "", # when fixing something on Linux
":apple:": "", # when fixing something on Mac OS
":checkered_flag:": "", # when fixing something on Windows
":bug:": "", # when fixing a bug
":fire:": "", # when removing code or files
":green_heart:": "", # when fixing the CI build
":white_check_mark:": "", # when adding tests
":lock:": "", # when dealing with security
":arrow_up:": "", # when upgrading dependencies
":arrow_down:": "", # when downgrading dependencies
":shirt:": "", # when removing linter warnings
}

0 comments on commit 2f33180

Please sign in to comment.