New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comment on pull requests #2776
Comment on pull requests #2776
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 🙇 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 💎💎
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.go
file 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