Giter Site home page Giter Site logo

ghreport's Introduction

ghreport

Application to check Github for Pull Requests, that are not Drafts, in repos the user cares about.

Usage

The program is configured via a YAML file located at $HOME/.config/ghreport/config.yaml.

  • token: Should be set to a Github API Token with access to the repos you are checking
    • Set permissions for token to repo - full control of private repositories, enable SSO if your repos require it
    • Github Personal Access Token Permissions
  • One of subscribedRepos, autoDiscover.organizations, or autoDiscover.users must be set if you wish to have any results. You can set all three if you wish.
  • topic limits what is returned from organizations and users to just that topic, this is an optional field.

Here's an example configuration:

autoDiscover:
  organizations:
    - name: your_organization_name
      topic: topic_to_watch
  users:
    - name: your_username
      topic: topic_to_watch
subscribedRepos:
  - Jmainguy/ghreport
  - Jmainguy/bible
  - Jmainguy/ghReview
  - Jmainguy/bak
token: e0e9eac4e84446df6f3db180d07bfb222e91234

Running the progam

ghreport [-output=<format>]

Sample output with default format.

jmainguy@fedora:~/Github/ghreport$ ./ghreport 
https://github.com/Jmainguy/statuscode/pull/32
  author: renovate
  Age: 3 days 
  reviewDecision: ❌
  mergeable ✅
https://github.com/Jmainguy/statuscode/pull/33
  author: renovate
  Age: 3 days 
  reviewDecision: ✅
  mergeable ✅
https://github.com/Standouthost/Multicraft/pull/9
  author: TheWebGamer
  Age: 3321 days 
  reviewDecision: ✅
  mergeable ❌
https://github.com/Standouthost/Multicraft/pull/28
  author: ungarscool1
  Age: 2700 days 
  reviewDecision: 😅
  mergeable ✅

Sample output with single-line format

jmainguy@fedora:~/Github/ghreport$ ./ghreport -output singleline
https://github.com/Jmainguy/coastie-operator/pull/2 author: dependabot Age: 409 days reviewDecision: 🔍 mergeable: ✅
https://github.com/Jmainguy/coastie-operator/pull/3 author: dependabot Age: 384 days reviewDecision: 🔍 mergeable: ✅
https://github.com/Jmainguy/coastie-operator/pull/4 author: renovate Age: 354 days reviewDecision: 🔍 mergeable: ✅
https://github.com/Standouthost/Multicraft/pull/9 author: TheWebGamer Age: 3321 days reviewDecision: ✅ mergeable: ❌

Sample output with JSON format

jmainguy@fedora:~/Github/ghreport$ ./ghreport -output json
{"url":"https://github.com/Jmainguy/k8sCapcity/pull/50","author":"github-actions","age":"24 days","review_decision":"😅","mergeable":"✅"}
{"url":"https://github.com/Jmainguy/k8sDrainReport/pull/27","author":"github-actions","age":"8 days","review_decision":"😅","mergeable":"✅"}
{"url":"https://github.com/Standouthost/Multicraft/pull/9","author":"TheWebGamer","age":"3321 days","review_decision":"✅","mergeable":"❌"}

Fun with jq and JSON

Select on repo name

jmainguy@fedora:~/Github/ghreport$ ./ghreport -output=json | jq '. | select(.url | contains("k8sCapcity"))'
{
  "url": "https://github.com/Jmainguy/k8sCapcity/pull/50",
  "author": "github-actions",
  "age": "24 days",
  "review_decision": "😅",
  "mergeable": "✅"
}

Select on author

jmainguy@fedora:~/Github/ghreport$ ./ghreport -output=json | jq '. | select(.author == "github-actions")'
{
  "url": "https://github.com/Jmainguy/k8sDrainReport/pull/27",
  "author": "github-actions",
  "age": "8 days",
  "review_decision": "😅",
  "mergeable": "✅"
}
{
  "url": "https://github.com/Jmainguy/k8sCapcity/pull/50",
  "author": "github-actions",
  "age": "24 days",
  "review_decision": "😅",
  "mergeable": "✅"
}

Releases

We currently build releases for RPM, DEB, macOS, and Windows.

Grab Release from The Releases Page

Build it yourself

export GO111MODULE=on
go build

ghreport's People

Contributors

jmainguy avatar renovate[bot] avatar github-actions[bot] avatar slmingol avatar

Stargazers

Pushkar Gupte avatar Matt Lemanski avatar Tom Granot avatar Omar Louis White avatar  avatar  avatar hayden avatar

Watchers

James Cloos avatar  avatar  avatar

ghreport's Issues

Show the owner of the PR in output

Would it be possible to add another column to the output or a switch to enable/disable a column showing the name of the user that created the PR?

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

This repository currently has no open or pending branches.

Detected dependencies

github-actions
.github/workflows/push.yml
  • Jmainguy/golang-workflows v1
.github/workflows/release-please.yaml
  • Jmainguy/golang-workflows v1
gomod
go.mod
  • go 1.21
  • github.com/shurcooL/githubv4 v0.0.0-20240727222349-48295856cce7@48295856cce7
  • github.com/stretchr/testify v1.9.0
  • golang.org/x/oauth2 v0.23.0
  • gopkg.in/yaml.v3 v3.0.1

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.