Skip to content

Is there a way to get branch name in a user-defined rule? #108

@and-semakin

Description

@and-semakin

By convention in our company we should put Jira ticket ID in the beginning of branch name (for example JIRA-123_do_something_great) and also we should put ticket id in commit message. I would like to check if they are the same. For this I need to get branch name inside of validate method of the rule. But I don't see that there is some property in commit or context objects that would help me. Do I miss something or gitlint is not able to help me in this case?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions