npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@4awpawz/ghif

v1.1.0

Published

An issues formatter for Github's gh CLI issues

Downloads

7

Readme

ghif, an issues formatter for Github's CLI gh issue list

Maintaining a project's changelog shouldn't be a chore yet it often ends up being one. Having to repetitively cut and paste from our Github issues into our project's changelog and then having to format everything in a consistent manner can be a significant task in its own right. That's where ghif steps in to radically reduce the effort of changelog maintenance.

ghif is a simple command line utility that takes the issues output from Github's gh issue list --json "number,title,labels" command, formats them according to any additional ghif formatting options that you provide (please see below), and then sends the formatted output to stdout.

⚠️ ghif expects gh issue list to return JSON and for issue objects to contain the number, title and labels fields and will fail to run otherwise. Therefor the minimum gh issue list command required is the following:

> gh issue list --json "number,title,labels"

You can, of course, include any of the gh issue list filters that support your project's use case, such as status (-s), repository (--repo), milestone (-m), etc.

Installation

⚠️ ghif requires the Github CLI

> npm i -g 4awpawz/ghif

Supported output formats and examples

Plain text

> gh issue list --json "number,title,labels" | ghif --text --header="v1.3.0"

Example: a list of issues with a heading

v1.3.0

#98: Unresolved token reporting drops the last closing brace for include tokens. [bug, revision]
#97: Log warning to the console if user project does not have a 404.html document. [feature, revision]
#96: Though template front matter is documented as a requirement, this is not enforced in the codebase. [wontfix, revision]
#95: Update to Node v18.18.0 LTS and address all related issues. [revision]
#94: Include cache bust metric when release is called without the --verbose option and is called with the --cache-bust option. [revision]
#93: Refactor the cli help to accommodate multiple command options. [feature]
#92: Provide CLI --verbose logging option. [feature, revision]
#91: Update Buster dependency to v1.1.0. [revision]

Markdown

As a list:

> gh issue list --json "number,title,labels" | ghif --markdown-list --header="## v1.3.0"

Example: a list of issues with a h2 header

## v1.3.0

#98: Unresolved token reporting drops the last closing brace for include tokens. [bug, revision]

#97: Log warning to the console if user project does not have a 404.html document. [feature, revision]

#96: Though template front matter is documented as a requirement, this is not enforced in the codebase. [wontfix, revision]

#95: Update to Node v18.18.0 LTS and address all related issues. [revision]

#94: Include cache bust metric when release is called without the --verbose option and is called with the --cache-bust option. [revision]

#93: Refactor the cli help to accommodate multiple command options. [feature]

#92: Provide CLI --verbose logging option. [feature, revision]

#91: Update Buster dependency to v1.1.0. [revision]

As an unordered list:

> gh issue list --json "number,title,labels" | ghif --markdown-unordered-list

Example: an unordered list of issues

- #98: Unresolved token reporting drops the last closing brace for include tokens. [bug, revision]
- #97: Log warning to the console if user project does not have a 404.html document. [feature, revision]
- #96: Though template front matter is documented as a requirement, this is not enforced in the codebase. [wontfix, revision]
- #95: Update to Node v18.18.0 LTS and address all related issues. [revision]
- #94: Include cache bust metric when release is called without the --verbose option and is called with the --cache-bust option. [revision]
- #93: Refactor the cli help to accommodate multiple command options. [feature]
- #92: Provide CLI --verbose logging option. [feature, revision]
- #91: Update Buster dependency to v1.1.0. [revision]

As an ordered list:

> gh issue list --json "number,title,labels" | ghif --markdown-ordered-list

Example: an ordered list of issues

1. #98: Unresolved token reporting drops the last closing brace for include tokens. [bug, revision]
1. #97: Log warning to the console if user project does not have a 404.html document. [feature, revision]
1. #96: Though template front matter is documented as a requirement, this is not enforced in the codebase. [wontfix, revision]
1. #95: Update to Node v18.18.0 LTS and address all related issues. [revision]
1. #94: Include cache bust metric when release is called without the --verbose option and is called with the --cache-bust option. [revision]
1. #93: Refactor the cli help to accommodate multiple command options. [feature]
1. #92: Provide CLI --verbose logging option. [feature, revision]
1. #91: Update Buster dependency to v1.1.0. [revision]

Usage examples

Output text to the terminal

> gh issue list -s closed -m "v1.3.0" --json "number,title,labels" --repo 4awpawz/fusion.ssg | ghif --text

Pipe text output to a text file

> gh issue list -s closed -m "v1.3.0" --json "number,title,labels" --repo 4awpawz/fusion.ssg | ghif --text > issues.txt

Pipe markdown output to a markdown file

> gh issue list -s closed -m "v1.3.0" --json "number,title,labels" --repo 4awpawz/fusion.ssg | ghif --markdown-unordered-list --blank-line-between-issues > issues.md

Formatting options

  • --colored-labels: colorize labels, ignored if output format is not markdown
  • --blank-line-between-issues: output a blank line between issues
  • --text: output a list of issues as plain text
  • --markdown-list: output a list of issues in markdown
  • --markdown-unordered-list: output an unordered list of issues in markdown
  • --markdown-ordered-list: output an ordered list of issues in markdown
  • --header: prepend a header (e.g. V1.0.3) to the output, supports markdown headers and plain text headings

Show some love ❤️

If using ghif provides you value then please click on the repository's Star button.

If you would like to be notified when there are changes then please click on the repository's Watch button.