Conversation
mislav
left a comment
There was a problem hiding this comment.
Is there a chance we could reuse the same code, since everything is identical about leaving a comment to an issue vs. the PR?
I worry that this might not be just incidental duplication: we might need to maintain the commenting code, and it might be tricky to remember to duplicate all changes in two places, especially for outside contributors.
|
@mislav I went ahead and refactored this to clean up the duplicate code and hopefully make it easier to maintain both comment commands in the future. It seemed like there were a couple different ways to go about this refactor so let me know if you had any other thoughts on it 🙇 |
mislav
left a comment
There was a problem hiding this comment.
This looks great! Love it how you reused most commenting code between issues and PRs by defining a Commentable interface.
My last nit is about the prompt to open the editor. Everything else is 💎💎
mislav
left a comment
There was a problem hiding this comment.
Updates look good. Thank you for the hard work!
- "Press Enter" is both bold - "Enter" is capitalized - The prompt ends with "..."
This PR allows for commenting on pull requests. The commenting code for issues and pull requests was very similar so I refactored to extract the
commentable.gofile which contains the shared functionality.Additionally after talking with @ampinsk we decided that the initial input type survey was not serving much of a purpose and we decided to replace it with the standard editor survey that prompts the user to open their editor.
closes #517