I have a JIRA J1 and J2, I have opened PR for J1 but it has been linked to two Jira issues, J1 and J2, I have merged the code changes in J1 , now the J1 and J2 show PR merged which should not show on J2 as the files which have changes are completely different, what would happens if I decline the PR on J2 having the file changes related to J1, will it change the code merged into master ?
Thanks in advance
If it is a single PR, which I think is the case here, you can not decline it for one JIRA issue and not the other. The PR has commits related to 2 JIRA issues but you still have only one PR. And once that PR is merged, all the commits in it are merged as well.
The way to revert the code from master is to either revert the merge commit (thereby removing code related to both issues) or by reverting the individual commits related to your second JIRA issue (J2). Even if you do that, status of the PR on those issues will reflect what is on the PR.
Going forward, you might want to create multiple feature branches for your JIRA issues and start working on them. That way, you wouldn't run into this issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.