Skip to content

Commit b46417f

Browse files
committed
Updated docs.
1 parent a0c47e6 commit b46417f

9 files changed

+69
-58
lines changed

README.md

+69-56
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
## Automated GitHub Issues Reporting
1010

11-
Snitch is a terminal utility that automates the reporting of GitHub repository issues via interactive and informative reports in both markdown and plain text.
11+
Snitch is a terminal-based utility that automates the creation of interactive and informative reports in both markdown and text for the reporting of GitHub repository issues.
1212

13-
[![Snitch milestone report video](https://img.youtube.com/vi/u-7oJJUUdGs/0.jpg)](https://www.youtube.com/watch?v=u-7oJJUUdGs)
13+
![Snitch markdown and text reports](./readme-assets/snitch-text-markdown-side-by-side.png)
1414

1515
⚠️ This project was formerly named _ghif_ but as of v2 has diverged significantly enough from that codebase to warrant rebranding while maintaining all its previous git history.
1616

@@ -28,29 +28,31 @@ To install Snitch with NPM, please run the following command in your terminal:
2828

2929
| Report Name | Description | Example |
3030
| :-- | :-- | :-- |
31+
| assignee | a list of issues by assignee | `> snitch --name=assignee > snitch-report.md` |
32+
| label | a list of issues by label | `> snitch --name=label > snitch-report.md` |
3133
| list | a list of issues | `> snitch --name=list > snitch-report.md` |
3234
| milestone | a list of issues by milestone | `> snitch --name=milestone > snitch-report.md` |
3335
| milestone-label | a list of issues by milestone and label | `> snitch --name=milestone-label > snitch-report.md` |
34-
| label | a list of issues by label | `> snitch --name=label > snitch-report.md` |
35-
| assignee | a list of issues by assignee | `> snitch --name=assignee > snitch-report.md` |
3636

3737
## Options
3838

3939
| Option | Description | Default (if omitted)| Example |
4040
| :-- | :-- | :-- | :-- |
41-
| --as-text | output report as plain text | output report as markdown | `--as-text` |
42-
| --repo=[path to repository] | path to Github repository | the GitHub repository associated with the current project determined by git remote origin | `--repo=4awpawz/snitch` |
43-
| --state=[all \| open \| closed] | limit reporting to issues with this state | all | `--state=closed` |
41+
| --as-text (v3.0.0)| output report as plain text | output report as markdown | `--as-text` |
42+
| --blank-lines (v3.0.0) | seperate issues with a blank line | no seperating blank line | `--blank-lines` |
43+
| --debug | run in debug mode, see [below](#debug-mode) for details| run in normal mode | `--debug` |
44+
| --heading=[report heading] | the heading for the report | repository name | `--heading=CHANGELOG` |
4445
| --max-issues=integer | maximum number of issues to report on | 10000 | `--max-issues=100000` |
4546
| --name=[list \| milestone \| milestone-label \| label \| assignee] | name of report to generate | list | `--name=milestone-label` |
46-
| --heading=[report heading] | the heading for the report | repository name | `--heading=CHANGELOG` |
47+
| --no-heading (v3.0.0) | omit heading | include heading | `--no-heading` |
4748
| --non-interactive | for markdown reports only, generate non interactive issues | generate interactive issues | `--non-interactive` |
48-
| --no-attribution | attribution is not appended to the report | attribution is appended to the report | `--no-attribution` |
49-
| --debug | run in debug mode, see [below](#debug-mode) for details| run in normal mode | `--debug` |
49+
| --no-attribution | attribution is jnot appended to the report | attribution is appended to the report | `--no-attribution` |
50+
| --repo=[path to repository] | path to Github repository | the GitHub repository associated with the current project determined by git remote origin | `--repo=4awpawz/snitch` |
51+
| --state=[all \| open \| closed] | limit reporting to issues with this state | all | `--state=closed` |
5052

5153
## Saving output to a file
5254

53-
Use redirection to save report output to a file:
55+
Use redirection (i.e., `>`) to save output to a file:
5456

5557
```shell
5658
> snitch --name=list > list.md
@@ -63,81 +65,92 @@ You can run Snitch in __debug mode__ to expose the dynamically generated configu
6365
To invoke debug mode, append `--debug` to the command line that you would use to generate your desired report, such as the __list report__ in the command below:
6466

6567
```shell
66-
> snitch --name=list --repo=4awpawz/fusion.ssg --debug
68+
> snitch --name=list --debug
6769
```
6870

6971
The output from running Snitch in debug mode would look similar to the following:
7072

7173
```shell
7274
debug config: {
7375
reportName: 'list',
74-
repo: 'https://github.com/4awpawz/fusion.ssg',
76+
repo: 'https://github.com/4awpawz/snitch',
7577
state: 'all',
7678
maxIssues: 10000,
7779
nonInteractive: false,
7880
noHeading: false,
79-
heading: '4awpawz/fusion.ssg',
81+
heading: '4awpawz/snitch',
8082
debug: true,
81-
noAttribution: false
83+
noAttribution: false,
84+
asText: false,
85+
blankLines: false
8286
}
83-
debug gh command: gh issue list -L 10000 --state all --json 'number,title,labels,milestone,state,assignees,url' -R https://github.com/4awpawz/fusion.ssg
87+
debug gh command: gh issue list -L 10000 --state all --json 'number,title,labels,milestone,state,assignees,url' -R https://github.com/4awpawz/snitch
8488
```
8589

8690
You can also run the _debug gh command_ to examine the JSON payload returned by GitHub's _gh_ utility:
8791

8892
```shell
8993
> gh issue list -L 10000 --state all --json 'number,title,labels,milestone,state,assignees,url' -R https://github.com/4awpawz/snitch
9094
```
95+
## Report Sensitivity
9196

92-
## Report Examples
93-
94-
### CHANGELOG Report
95-
96-
`> snitch --name=list --state=closed --heading=CHANGELOG`
97-
98-
<img src="./readme-assets/changelog-report.png" alt="changelog report image" title="changelog report image" width="100%" style="max-width: 100%;">
99-
<br>
100-
<br>
97+
When generating a report other than the list report you might see a warning message like the one below. It is informing you that some issues were excluded from the report because they didn't meet the report's requirements. For example, if you generate a milestone report and there are issues that haven't been assigned a milestone then those issues will be excluded from the report.
10198

102-
### List Report
99+
<img src="./readme-assets/issues-missing-criteria-warning.png" alt="missing criteria warning message" title="missing criteria warning message" width="100%" style="max-width: 100%;">
103100

104-
`> snitch --name=list`
101+
## Screencasts & Tutorials
105102

106-
<img src="./readme-assets/list-report.png" alt="list report image" title="list report image" width="100%" style="max-width: 100%;">
107-
<br>
108-
<br>
109-
110-
### Milestone Report
111-
112-
`> snitch --name=milestone`
113-
114-
<img src="./readme-assets/milestone-report.png" alt="milestone report image" title="milestone report image" width="100%" style="max-width: 100%;">
115-
<br>
116-
<br>
117-
118-
### Milestone-Label Report
119-
120-
`> snitch --name=milestone-label`
121-
122-
<img src="./readme-assets/milestone-label-report.png" alt="milestone-label report image" title="milestone-label report image" width="100%" style="max-width: 100%;">
123-
<br>
124-
<br>
103+
[![Introducing Snitch v3.0.0](https://img.youtube.com/vi/_vUUfBxtSFE/0.jpg)](https://www.youtube.com/watch?v=_vUUfBxtSFE)
104+
[![Snitch milestone report video](https://img.youtube.com/vi/u-7oJJUUdGs/0.jpg)](https://www.youtube.com/watch?v=u-7oJJUUdGs)
125105

126-
### Label Report
106+
### Example - Easily Create Your Project's Changelog
127107

128-
`> snitch --name=label`
108+
`> snitch --name=list --state=closed --heading=CHANGELOG`
129109

130-
<img src="./readme-assets/label-report.png" alt="label report image" title="label report image" width="100%" style="max-width: 100%;">
110+
<img src="./readme-assets/changelog-report.png" alt="changelog report image" title="changelog report image" width="100%" style="max-width: 100%;">
131111
<br>
132112
<br>
133113

134-
### Assignee Report
135-
136-
`> snitch --name=assignee`
137-
138-
<img src="./readme-assets/assignee-report.png" alt="assignee report image" title="assignee report image" width="100%" style="max-width: 100%;">
139-
<br>
140-
<br>
114+
<!---->
115+
<!-- ### List Report -->
116+
<!---->
117+
<!-- `> snitch --name=list` -->
118+
<!---->
119+
<!-- <img src="./readme-assets/list-report.png" alt="list report image" title="list report image" width="100%" style="max-width: 100%;"> -->
120+
<!-- <br> -->
121+
<!-- <br> -->
122+
<!---->
123+
<!-- ### Milestone Report -->
124+
<!---->
125+
<!-- `> snitch --name=milestone` -->
126+
<!---->
127+
<!-- <img src="./readme-assets/milestone-report.png" alt="milestone report image" title="milestone report image" width="100%" style="max-width: 100%;"> -->
128+
<!-- <br> -->
129+
<!-- <br> -->
130+
<!---->
131+
<!-- ### Milestone-Label Report -->
132+
<!---->
133+
<!-- `> snitch --name=milestone-label` -->
134+
<!---->
135+
<!-- <img src="./readme-assets/milestone-label-report.png" alt="milestone-label report image" title="milestone-label report image" width="100%" style="max-width: 100%;"> -->
136+
<!-- <br> -->
137+
<!-- <br> -->
138+
<!---->
139+
<!-- ### Label Report -->
140+
<!---->
141+
<!-- `> snitch --name=label` -->
142+
<!---->
143+
<!-- <img src="./readme-assets/label-report.png" alt="label report image" title="label report image" width="100%" style="max-width: 100%;"> -->
144+
<!-- <br> -->
145+
<!-- <br> -->
146+
<!---->
147+
<!-- ### Assignee Report -->
148+
<!---->
149+
<!-- `> snitch --name=assignee` -->
150+
<!---->
151+
<!-- <img src="./readme-assets/assignee-report.png" alt="assignee report image" title="assignee report image" width="100%" style="max-width: 100%;"> -->
152+
<!-- <br> -->
153+
<!-- <br> -->
141154

142155
## Request a new report format
143156

core/index.mjs

-2
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ export async function snitch(args) {
3939
default:
4040
throw new TypeError(`invalid report type, you entered ${config.reportName}`)
4141
}
42-
const reportEndsWithThreeNewLines = output.endsWith("\n\n\n")
43-
console.error("report ends with three spaces: ", reportEndsWithThreeNewLines)
4442
if (!config.noAttribution && config.asText) output += "\n\n"
4543
if (!config.noAttribution) output +=
4644
config.asText ? `| ${attributionText} @ ${snitchUrl}` :

readme-assets/assignee-report.png

-611 KB
Binary file not shown.
Loading

readme-assets/label-report.png

-488 KB
Binary file not shown.

readme-assets/list-report.png

-627 KB
Binary file not shown.
-335 KB
Binary file not shown.

readme-assets/milestone-report.png

-513 KB
Binary file not shown.
Loading

0 commit comments

Comments
 (0)