Skip to content

Command-line tool for checking the quality of your bug reports in GitHub Issues

License

Notifications You must be signed in to change notification settings

h1alexbel/ghiqc

Repository files navigation

ghiqc (GitHub Issues Quality Checker)

DevOps By Rultor.com We recommend IntelliJ IDEA

just Crates.io Version codecov PDD status Hits-of-Code License Known Vulnerabilities

Command-line tool for checking quality of bug reports in GitHub Issues.

Motivation. The quality of bug reports is paramount for the overall quality of a software project: poorly formulated bug reports often lead to wasted time, programmers frustration, and delays. This repository is a command-line tool that would scan given issue for quality problems in its formulations, generate recommendation, and report to the bug report author asking to fix the report.

How to use?

First, install it from crate:

cargo install ghiqc

or with homebrew (macOS):

brew install ghiqc

Then, run it:

ghiqc --repo h1alexbel/fakehub --issue 1

CLI Options

You can use the following options within ghiqc command-line tool:

Name Value Default Description
--repo, -r String - Repository to check, in @owner/repo format, i.e. jeff/foo.
--issue, -i int - Issue number to check.
--stdout boolean false Print the result to the console, instead of posting on GitHub.
--verbose, -v boolean false Verbose run output, i.e. debug logs, etc.

There are two more arguments ghiqc will look for: GITHUB_TOKEN and DEEPINFRA_TOKEN (you can obtain it here). They should be located in your environment variables. Export them like that:

export GITHUB_TOKEN=...
export DEEPINFRA_TOKEN=...

Ignore issues from checking

You can prevent ghiqc from running checks on the issue. In order to do that, include special file ignore.ghiqc in the root of your repo. In this file you can specify a list of rules - what kind of issues to ignore:

author:jeff
label:enhancement
title:new feature request
title:!*something

We support the following issue scope dimensions: author, label, and title. Supported syntax features:

  • assignment: author:jeff
  • exclusion: label:!bug
  • multiple values with author and label: author:[jeff,foo,max], label:[enhancement]
  • multiple values to exclude with author and label: author:![jeff,foo], labelL:![bug,question]
  • "starts with" with title: title:*this is feature request:
  • "starts with" exclusion with title: title:!*BUG:, thus it will skip everything that not starts with BUG:.

Using with GitHub Actions

In order to use ghiqc within GitHub Actions, you can make the following configuration:

name: ghiqc
on:
  issues:
    types: [ opened ]
permissions:
  issues: write
  contents: read
env:
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  DEEPINFRA_TOKEN: ${{ secrets.DEEPINFRA_TOKEN }}
  ISSUE: ${{ github.event.issue.number }}
jobs:
  check:
    runs-on: ubuntu-22.04
    steps:
      - uses: actions/checkout@v4
      - name: Install ghiqc
        run: cargo install ghiqc
      - name: Run ghiqc
        run: |
          ghiqc --repo "${{ github.repository }}" --issue "$ISSUE"

How to contribute?

Make sure that you have Rust and just installed on your system, then fork this repository, make changes, send us a pull request. We will review your changes and apply them to the master branch shortly, provided they don't violate our quality standards. To avoid frustration, before sending us your pull request please run full build:

just build

Here is the contribution vitals, made by zerocracy/judges-action (updated every hour!).

About

Command-line tool for checking the quality of your bug reports in GitHub Issues

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published