πŸ“Š Count comments on a GitHub issue 🎫

☝️ Why counting comments matters ?

There are two type issues with a lot of comments :

1️⃣ The ones that are popular, then getting a lot of feedback πŸ€—
2️⃣ The ones that have a lot of comments because we struggle to fix them efficiently 😱

πŸ‘‰…


This content originally appeared on DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’» and was authored by adriens

☝️ Why counting comments matters ?

There are two type issues with a lot of comments :

1️⃣ The ones that are popular, then getting a lot of feedback πŸ€—
2️⃣ The ones that have a lot of comments because we struggle to fix them efficiently 😱

πŸ‘‰ In both cases, performing report on them can be helpful to monitor your RUN performances.

❔ Count with API calls

☝️ There actually is no native gh issue command to count issues on a specific command...

πŸ‘‰ but gh api...

"Makes an authenticated HTTP request to the GitHub API and prints the response."

gh api <endpoint> [flags]

πŸ’‘ This short post is documenting how easy it is to count comments on a given issue.

πŸ€“ Snippet

gh api -X GET \
  -H "Accept: application/vnd.github.v3+json" \
  -F per_page=100 \
  /repos/YOUR_ORGA/REPO/issues/ISSUEID/comments | \
  jq '. | length'

Image description


This content originally appeared on DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’» and was authored by adriens


Print Share Comment Cite Upload Translate Updates
APA

adriens | Sciencx (2022-09-25T20:23:02+00:00) πŸ“Š Count comments on a GitHub issue 🎫. Retrieved from https://www.scien.cx/2022/09/25/%f0%9f%93%8a-count-comments-on-a-github-issue-%f0%9f%8e%ab/

MLA
" » πŸ“Š Count comments on a GitHub issue 🎫." adriens | Sciencx - Sunday September 25, 2022, https://www.scien.cx/2022/09/25/%f0%9f%93%8a-count-comments-on-a-github-issue-%f0%9f%8e%ab/
HARVARD
adriens | Sciencx Sunday September 25, 2022 » πŸ“Š Count comments on a GitHub issue 🎫., viewed ,<https://www.scien.cx/2022/09/25/%f0%9f%93%8a-count-comments-on-a-github-issue-%f0%9f%8e%ab/>
VANCOUVER
adriens | Sciencx - » πŸ“Š Count comments on a GitHub issue 🎫. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/09/25/%f0%9f%93%8a-count-comments-on-a-github-issue-%f0%9f%8e%ab/
CHICAGO
" » πŸ“Š Count comments on a GitHub issue 🎫." adriens | Sciencx - Accessed . https://www.scien.cx/2022/09/25/%f0%9f%93%8a-count-comments-on-a-github-issue-%f0%9f%8e%ab/
IEEE
" » πŸ“Š Count comments on a GitHub issue 🎫." adriens | Sciencx [Online]. Available: https://www.scien.cx/2022/09/25/%f0%9f%93%8a-count-comments-on-a-github-issue-%f0%9f%8e%ab/. [Accessed: ]
rf:citation
» πŸ“Š Count comments on a GitHub issue 🎫 | adriens | Sciencx | https://www.scien.cx/2022/09/25/%f0%9f%93%8a-count-comments-on-a-github-issue-%f0%9f%8e%ab/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.