Pick a repo's latest pipeline by number instead of id (#7001)