create prompt_for_bug function

This splits the code that prompts interactively for a bug into its own
function to simplify the post function.