Getting different status of Quality Gate for 2 different pull request scanner when both result have the same code smell issue

Version: SonarQube 8.9.0
We were doing SonarQube Pull Request scan on 2 different PRs
The scanner detect the same code smell on the same file. However, for the first PR, the status for the Quality Gate show 1 code smell and have Maintainability score of A and overall Quality Gate passed. However, the 2nd PR show the same code smell, but have Maintainability score of D and over status Failed.

Hi,

Welcome to the community!

How many lines of code were changed in each PR? Maintainability ratings are calculated from a ratio of technical debt on new code versus the lines changed. My guess is that the PR with the A rating had more changes in it than the other one.

 
HTH,
Ann