Refactor repetition in GitHub-related subcommands