GitHub Popular Searches
A Postman collection to discover popular repositories on GitHub for a given search query. It sends the popular repository on Slack channel.
██████╗ ██████╗ ███████╗████████╗███╗ ███╗ █████╗ ███╗ ██╗
██╔══██╗██╔═══██╗██╔════╝╚══██╔══╝████╗ ████║██╔══██╗████╗ ██║
██████╔╝██║ ██║███████╗ ██║ ██╔████╔██║███████║██╔██╗ ██║
██╔═══╝ ██║ ██║╚════██║ ██║ ██║╚██╔╝██║██╔══██║██║╚██╗██║
██║ ╚██████╔╝███████║ ██║ ██║ ╚═╝ ██║██║ ██║██║ ╚████║
╚═╝ ╚═════╝ ╚══════╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═══╝
This collection is published here.
How does it work?
-
Put a search query for GitHub Repositories
-
Fetch GitHub Repo URLs through API call to NPM
-
Collect all the comments, download count, stars count, fork count from GitHub API
-
Perform Sentiment Analysis on Comments
-
Suggest best available repository for given search term on Slack
Set the following environment variables before you run this collection :
searchTerm
: the query you want to search say css minifier etc.maxSize
: maximum number of repositories you want to fetch say 20.
It sends the popular repository on Slack channel using webhook.
This collection uses Github API to fetch comments and sends a report to an internal Slack channel using a webhook.
API Calls made
GET npm search - API call to NPM to fetch the popular GitHub Repositories for a given search query.
http://registry.npmjs.com/-/v1/search?text=searchTerm&size=maxSize
GET fetch comments - Fetching comments for each repositories using GitHub API.
https://api.github.com/repos/userName/repoName/comments
repoName
: Name of the GitHub repositoryuserName
: GitHub username for the given repository
POST calculate sentiments - Calculating sentiment using ParallelDots API for the comments of given GitHub repository.
https://apis.paralleldots.com/v3/sentiment?text=sentimentText&api_key=API_KEY
POST push to slack - Pushing most popular repos to Slack using webhook.
https://hooks.slack.com/services/XXXXXXXXX
Thanks!
Glad to see you here! I’m social. Let’s get connected.