Created
July 18, 2025 09:46
-
-
Save bgrgicak/1520cc4a0f8e8aaed2b877a6f62a95ae to your computer and use it in GitHub Desktop.
Export GitHub PR comments into text by running script in Dev tools from the PR page
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Array.from(document.querySelectorAll('.timeline-comment-group')).map( | |
| comment => ({ | |
| name: comment.querySelector('.author').text, | |
| text: comment.querySelector('.comment-body').innerText | |
| }) | |
| ).map(comment => 'from @' + comment.name + '\n' + comment.text + '\n\n').join('') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment