jenkinsci / gitlab-plugin

A Jenkins plugin for interfacing with GitLab
https://plugins.jenkins.io/gitlab-plugin/
GNU General Public License v2.0
1.44k stars 612 forks source link

IndexOutOfBoundsException on force push on target branch #1608

Closed AniketNS closed 7 months ago

AniketNS commented 7 months ago

Fixes #729

I tried to remove the exception that was causing the IndexOutOfBoundsException problem on force push.

Correct me if I'm wrong and if I should've made changes(adding try catch block) to the retrieveCauseData function instead of the handleMergeRequest function.

MarkEWaite commented 7 months ago

Asking for a review of a pull request that is failing on the CI job is a little surprising. One of the benefits of those checks is that they can tell you of changes that you need to make even before a person reviews the change. Please read the output of the checks and take the actions that are needed as listed in that output.

Once you've resolved the failing checks, then you should consider if there are ways that you can show the problem in an automated test before attempting to fix the problem with a code change. I'm much more comfortable reading a code change that has added tests, since that indicates the author has thought carefully about the code change.

If you find that an automated test is infeasible, you'll need to state that in the pull request description.

Once you've considered if tests can be added, then please describe how you tested the pull request. Were you able to duplicate the problem before you made this change? Were you able to confirm that the problems is solved after the change has been made?

AniketNS commented 7 months ago

Ohh ok @MarkEWaite. I think I have a lot more to learn in open source. I've not done the duplicate before solving the issue and also not checked if a problem is solved after making changes in the code. Sorry for the trouble.

AniketNS commented 7 months ago

Should I close this PR?