Skip to content

vinitshahdeo/GitHub-Popular-Searches

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Popular Searches

Github Popular Searces Postman Collection

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

Run in Postman

Set the following environment variables before you run this collection :

  • {{searchTerm}} : the query you want to search
  • {{maxSize}} : maximum number of repositories you want to fetch

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

Thanks

  1. 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}}
  1. GET fetch comments - Fetching comments for each repositories using GitHub API.
https://api.github.com/repos/{{userName}}/{{repoName}}/comments  
  • {{repoName}} : Name of the GitHub repository
  • {{userName}} : GitHub username for the given repository
  1. 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={{apiKey}}
  1. POST push to slack - Pushing most popular repos to Slack using webhook.
https://hooks.slack.com/services/XXXXXXXXX

Made by Vinit Shahdeo Powered By

Thanks!

Glad to see you here! I'm social. Let's get connected.

     

Releases

No releases published

Packages

No packages published