cchantep/probot-jira

Important changes in the jira-pr app

Closed this issue · 3 comments

As a developer puts a commit message while filling a PR the commit message is analysed by the bot. If the JIRA issue ID is invalid the checker (pr-jira bot) fails the commit which is perfect but the one thing that I found really missing in the checker is that it allows all commit messages that doesn't contain any JIRA issue ID at all. Although there is a message saying "Pull request number X doesn't match issue expression ^[([^\[^\]]+)].*$" in the INFO event whenever the message doesn't follow this regex. How can I fail the commit when there is no JIRA issue ID at all in the message?

That's out of scope. Rather enforce such constraint with a separate action like pr-naming.

Can you at least guide me how can I modify your code so that I can disable the PR if the commit message doesn't contain Jira issue ID or if the issue ID is already closed in Jira?

@sunil-bansiwal As sauf you can enforce that each PR include a JIRA ID in title using another bot/action, thus modifying the code of this one is not something I will discuss recommend. Best regards.