Consolidate GitHub helpers for community scripts (#63198)

It's been fun for a while to have the same function calling GitHub API
in every single script, but we're going to have fun in different ways
now.

This one's for you, @MrSubidubi! :clinking_glasses: 

## Testing

I've ran the things that had `--dry-run` locally and nothing blew up,
but the ultimate smoke test will be carried out in production.

---

Release Notes:

- N/A
a7bc7d7736Lena committed on 9/4/2026, 11:40:05 AM· committed by GitHubparent52af3dd
15 files changedLine totals unavailable