Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why necessarily bug if github refernce in message? #145

Open
hlibbabii opened this issue Mar 1, 2021 · 0 comments
Open

Why necessarily bug if github refernce in message? #145

hlibbabii opened this issue Mar 1, 2021 · 0 comments
Labels
heuristic suggestion Use this issue to propose a heuristic

Comments

@hlibbabii
Copy link
Member

Why necessarily bug if github refernce in message? Can't it be reference to feature or enhancement?

@Heuristic(Commit)
def github_ref_in_message(commit: Commit) -> Optional[Labels]:
    """
    >>> github_ref_in_message(Commit("x", "y", "12afbc4564ba", "gh-123: bug"))
    CommitLabel.BugFix
    >>> github_ref_in_message(Commit("x", "y", "12afbc4564ba", "gh 123"))
    CommitLabel.BugFix
    >>> github_ref_in_message(Commit("x", "y", "12afbc4564ba", "GH 123: bug2"))
    CommitLabel.BugFix
    >>> github_ref_in_message(Commit("x", "y", "12afbc4564ba", "GH123: wrong issue reference")) is None
    True
    """
    return CommitLabel.BugFix if GITHUB_REF_RE.search(commit.message.raw) else None
@hlibbabii hlibbabii added the heuristic suggestion Use this issue to propose a heuristic label Mar 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
heuristic suggestion Use this issue to propose a heuristic
Projects
None yet
Development

No branches or pull requests

1 participant