An Interest In:
Web News this Week
- March 5, 2024
- March 4, 2024
- March 3, 2024
- March 2, 2024
- March 1, 2024
- February 29, 2024
- February 28, 2024
September 25, 2022 08:23 pm GMT
Original Link: https://dev.to/optnc/count-comments-on-a-github-issue-1j4d
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
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'
Original Link: https://dev.to/optnc/count-comments-on-a-github-issue-1j4d
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To