Change system for Bug Reporter badge?

On Meta, sometimes we report bugs, and they get responded to by staff, with PRs to fix the bug we reported.

However, if the staff member didn’t like the topic post, no badge is awarded, even though it has been acknowledged and fixed accordingly.

Perhaps a change in the SQL query? Like if a staff member replies AND the topic is closed AND a Github PR link is sent (e.g. find it from having ‘Pull requests · discourse/discourse · GitHub’ in the link that was sent by a staff member)?