Skip to content

Support Conventional Commits Specification as a task #924

Description

@hussainweb
Q A
Version 1.3.2 (not relevant)
Bug? no
New feature? yes
Question? yes
Documentation? maybe
Related tickets none I could find

I am thinking about using conventional commits as a standard for our projects and was looking at how to enforce that with GrumPHP. Now, this is not hard to implement via the existing git_commit_message task but I am thinking it could be made so much simpler for users by adding a new task for this.

I am happy to write a PR and help test it but I wanted to know what the maintainers thought about this change first. In my mind, I would create a new task class and extend the existing GrumPHP\Task\Git\CommitMessage task. Would you rather prefer another approach or not have this at all?

Activity

  1. veewee commented on Sep 8, 2021

    @veewee
    Contributor

    Hi @hussainweb,

    Sounds good!
    Instead of creating and maintaining something custom inside this package, I'dd rather delegate this task to an external library like https://github.com/ramsey/conventional-commits.

    The existing git_commit_message is something that grow organically from a simple regex check to something far more advanced. There are some known issues that are hard to fix because of this. So if we could deprecate (at least some) options from that task in favour for the conventional commit task, I would be happy to include it! :)

    Feel free to suggest a PR.

  2. hussainweb commented on Sep 9, 2021

    @hussainweb
    ContributorAuthor

    That makes sense and I am happy you're open to it. Unfortunately, it seems that using the example you gave would need some work. It has a lot of dependencies, most notably CaptainHook. I don't think that people would use GrumPHP together with CaptainHook. There is no PHAR release either.

    I am searching for other packages that do this or just rewrite a similar parser class within GrumPHP. Would you be open to that approach?

  3. locked and limited conversation to collaborators on Sep 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions