Skip to content

a simple react app that finds reactions to your GitHub issues, PRs, and comments using GitHub's GraphQL APIv4 🚀

Notifications You must be signed in to change notification settings

ginglis13/ghreaccs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ghreaccs

a simple react app that finds reactions to your GitHub issues, PRs, and comments using GitHub's GraphQL APIv4. https://www.ghreaccs.com

https://ginglis.me/ghreaccs-graphql/

https://yld.me/raw/ceKu.png

This project was bootstrapped with Create React App.

Motivation

My friends and I who are active in the open source community are big on reacting w/ the 🚀 emoji. A few weeks ago I thought it would be fun to write a program in Go that compiles all reactions a user has received on GitHub. This was using the v3 REST API, which proved to be difficult to use for this purpose as it required a lot of dependent, consecutive requests. Recently, I found out about GraphQL, and shortly after GitHub's API v4, which is implemented in GraphQL. This made finding the info I wanted much easier - in fact, this project involves only a single GraphQL query:

user(login: "${username}") {
    issueComments(last: 100) {
        nodes {
            reactions(last: 100){
                nodes{
                    content
                    }
            }
        }
    }
    pullRequests(last: 100) {
        nodes{
            reactions(last: 100){
                nodes{
                    content
                }
            }
        }
    }
    issues(last: 100) {
        nodes{
            reactions(last: 100){
                nodes{
                    content
                }
            }
        }
    }
}

If you don't want to use my site, you can run the query yourself in GitHub's query builder: https://developer.github.com/v4/explorer/ (You'll need to create an application oauth token).

This was a fun intro to GraphQL and React for me, as I had very minimal experience with both prior to this.

Contributing

Since it's probably obvious I'm not the best frontend developer, feel free to make this site better by opening an issue or PR ( I'll probably react to your issue/pr and you can see it update here 😄). There is definitely room for improvement with the CSS of the site.

About

a simple react app that finds reactions to your GitHub issues, PRs, and comments using GitHub's GraphQL APIv4 🚀

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published