Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mgwalker/github-discussion-users
Fetch information about the people who have participated in a GitHub discussion board
https://github.com/mgwalker/github-discussion-users
Last synced: about 1 month ago
JSON representation
Fetch information about the people who have participated in a GitHub discussion board
- Host: GitHub
- URL: https://github.com/mgwalker/github-discussion-users
- Owner: mgwalker
- License: isc
- Created: 2024-12-05T15:18:33.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2024-12-05T15:26:01.000Z (about 1 month ago)
- Last Synced: 2024-12-05T16:29:15.996Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 7.81 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# GitHub discussion users
This little script scrapes a GitHub discussion board to get a list of all the users who have participated and some metadata about their participation. This was necessary because I needed to get that information for a discussion board inside an organization where I could not create a PAT with the necessary permissions to work with the GraphQL API and there's not a REST API for discussion. (Thanks, GitHub. Solid.)
Anyway, usage is simple:
```sh
node main https://github.com/[org]/[repo]/discussions
```It'll first go through all the pages of discussions making a list of discussion URLs. Then it'll walk through each discussion to scrape out the usernames involved. The final output is two files in the `./data` directory:
- `./data/discussions.json`
This is a list of URLs to individual discussion threads. That's all.
- `./data/users.json`
This is a map of all users that have participated in discussions, sorted by the total number of comments they've contributed. The keys```json
{
"username": GitHub username,
"url": link to their profile,
"commentCount": total number of comments,
"comments": [
// list of comments, sorted by date, looks like this:
{
"link": url to the specific comment,
"timestamp": ISO-8601 timestamp of the comment
}
]
}
```