githubjenkinsdevops

How to fix release in Jenkins after merging PR with incorrect Jira ticket? Error: No smart commit Jira issues found in the PR title for PR


Code stored in company GitHub. After I merged code by using pull request, which included incorrect Jira ticket in the title, deployment in Jenkins failed with the message:

ReleasePrePublishCheck
No smart commit Jira issues found in the PR title for PR #5

Note: It's been merged in default branch, which I can't delete (no permissions).

What I did:

  1. I created separate branch "beta" from default by using command to get code before my PR:

    git reset --hard 1234

It worked, I'm able to deploy this branch. But if I merge it to default (with another PR with proper ticket #), I'm still getting the same message.

  1. I tried to fix message of that commit, by using command below and VIM editor:

    git commit --fixup=amed:4567

Message changed, I can see in the history new commits with it. But if I do rebuild in Jenkins, I'm getting same error again. How to fix it?


Solution

  • Documentation saying "update the PR title with correct Jira ticket". Funny that when PR was merged, I have not seen PR tab any longer. But it's possible to find PR tab even for merged pull requests. So I did it, changed PR title, and it started to work. Easy fix, took long time to find though. Even if you don't see the tab, then use direct URL with PR # to get to it. And they you will be able to edit the title. For example use URL:

    https://github.com/yourname/yourproject/pulls
    https://github.com/yourname/yourproject/pull/3
    

    github pull request screen shot

    another pull request screen shot

    editing PR title