|
1 |
| -# ghif, Issues formatter for Github's gh CLI issues |
| 1 | +# ghif, an issues formatter for Github's gh CLI issues |
| 2 | + |
| 3 | +Maintaining a project's changelog shouldn't be a chore yet it often ends up being one of 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. |
| 4 | + |
| 5 | +ghif is a simple command line utility that can dramatically reduce the chore of manually maintaining your project's changelog. ghif requires a single terminal command that retrieves a list of issues from your project's Github repository using Github's CLI `gh issue list` command and pipes the output from that into ghif, which formats the issues according to the options that you provide and then sends the formatted output to stdout. |
| 6 | + |
| 7 | +ghif gives you the option to format its output in either plain text |
| 8 | + |
| 9 | +```shell |
| 10 | +ghif |
| 11 | +``` |
| 12 | + |
| 13 | +or to markdown |
| 14 | + |
| 15 | +```shell |
| 16 | +ghif --markdown-unordered-list |
| 17 | +``` |
| 18 | + |
| 19 | +which should suffice most use cases. |
| 20 | + |
| 21 | +## Installation |
| 22 | + |
| 23 | +\* [Requires Github CLI](https://cli.github.com/) |
| 24 | + |
| 25 | +```shell |
| 26 | +npm i -g 4awpawz/ghif |
| 27 | +``` |
| 28 | + |
| 29 | +## Output Examples |
| 30 | + |
| 31 | +_Output issues as plain text_ |
| 32 | + |
| 33 | +```text |
| 34 | +#98: Unresolved token reporting drops the last closing brace for include tokens. [bug, revision] |
| 35 | +#97: Log warning to the console if user project does not have a 404.html document. [feature, revision] |
| 36 | +#96: Though template front matter is documented as a requirement, this is not enforced in the codebase. [wontfix, revision] |
| 37 | +#95: Update to Node v18.18.0 LTS and address all related issues. [revision] |
| 38 | +#94: Include cache bust metric when release is called without the --verbose option and is called with the --cache-bust option. [revision] |
| 39 | +#93: Refactor the cli help to accommodate multiple command options. [feature] |
| 40 | +#92: Provide CLI --verbose logging option. [feature, revision] |
| 41 | +#91: Update Buster dependency to v1.1.0. [revision] |
| 42 | +``` |
| 43 | +_Output issues as an unordered list in markdown_ |
| 44 | + |
| 45 | +```markdown |
| 46 | +- #98: Unresolved token reporting drops the last closing brace for include tokens. [bug, revision] |
| 47 | +- #97: Log warning to the console if user project does not have a 404.html document. [feature, revision] |
| 48 | +- #96: Though template front matter is documented as a requirement, this is not enforced in the codebase. [wontfix, revision] |
| 49 | +- #95: Update to Node v18.18.0 LTS and address all related issues. [revision] |
| 50 | +- #94: Include cache bust metric when release is called without the --verbose option and is called with the --cache-bust option. [revision] |
| 51 | +- #93: Refactor the cli help to accommodate multiple command options. [feature] |
| 52 | +- #92: Provide CLI --verbose logging option. [feature, revision] |
| 53 | +- #91: Update Buster dependency to v1.1.0. [revision] |
| 54 | +``` |
| 55 | + |
| 56 | +_Output issues as an ordered list in markdown_ |
| 57 | + |
| 58 | +```markdown |
| 59 | +0. #98: Unresolved token reporting drops the last closing brace for include tokens. [bug, revision] |
| 60 | +0. #97: Log warning to the console if user project does not have a 404.html document. [feature, revision] |
| 61 | +0. #96: Though template front matter is documented as a requirement, this is not enforced in the codebase. [wontfix, revision] |
| 62 | +0. #95: Update to Node v18.18.0 LTS and address all related issues. [revision] |
| 63 | +0. #94: Include cache bust metric when release is called without the --verbose option and is called with the --cache-bust option. [revision] |
| 64 | +0. #93: Refactor the cli help to accommodate multiple command options. [feature] |
| 65 | +0. #92: Provide CLI --verbose logging option. [feature, revision] |
| 66 | +0. #91: Update Buster dependency to v1.1.0. [revision] |
| 67 | +``` |
| 68 | + |
| 69 | +## Usage Examples |
| 70 | + |
| 71 | +_output text to the terminal (default)_ |
| 72 | + |
| 73 | +```shell |
| 74 | +gh issue list -s closed -m "v1.3.0" --json "number,title,labels" --repo 4awpawz/fusion.ssg | ghif |
| 75 | +``` |
| 76 | + |
| 77 | +_pipe text output to a text file_ |
| 78 | + |
| 79 | +```shell |
| 80 | +gh issue list -s closed -m "v1.3.0" --json "number,title,labels" --repo 4awpawz/fusion.ssg | ghif > issues.txt |
| 81 | +``` |
| 82 | + |
| 83 | +_pipe markdown output to a markdown file_ |
| 84 | + |
| 85 | +```shell |
| 86 | +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 |
| 87 | +``` |
| 88 | + |
| 89 | +### Options |
| 90 | + |
| 91 | +- Output issues as plain text, `default` |
| 92 | +- Output a blank line between issues, `--blank-line-between-issues` |
| 93 | +- Output issues as markdown in an unordered list, `--markdown-unordered-list` |
| 94 | +- Output issues as markdown in an ordered list, `--markdown-ordered-list` |
| 95 | + |
| 96 | +## Show some love <span>❤️</span> |
| 97 | + |
| 98 | +If using ghif provides you value then please click on the repository's _Star_ button. |
| 99 | + |
| 100 | +If you would like to be notified when there are changes then please click on the repository's _Watch_ button. |
0 commit comments