Skip to content

Commit 280145c

Browse files
committed
feat: add repository info section and enhance authentication behavior in README
1 parent 6e33c99 commit 280145c

1 file changed

Lines changed: 77 additions & 2 deletions

File tree

Readme.md

Lines changed: 77 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ A lightweight, cross-platform CLI tool to inspect **recent GitHub user activity*
2525
- [Usage](#usage)
2626

2727
- [Scopes & Commands](#scopes--commands)
28+
- [Repository](#repository)
2829
- [Pushes](#pushes)
2930
- [Pull Requests](#pull-requests)
3031
- [Issues](#issues)
3132
- [Watches](#watches)
3233
- [Summary](#summary)
3334

3435
- [Flags](#flags)
35-
- [Summary](#summary)
3636
- [Notes](#notes)
3737
- [Roadmap](#roadmap)
3838
- [License](#license)
@@ -184,6 +184,12 @@ To view the saved token:
184184

185185
```bash
186186
gh-activity get token
187+
188+
### Authentication behavior
189+
190+
- The CLI prints a single auth status message once per run (token vs no token).
191+
- If GitHub returns “Bad credentials”, the saved token is removed and the request is retried unauthenticated.
192+
- Unauthenticated requests are rate-limited — set a valid token to avoid hitting limits.
187193
```
188194

189195
---
@@ -198,9 +204,73 @@ The CLI follows a **strict positional structure**:
198204
gh-activity <scope> <entity> <command> [flags]
199205
```
200206

201-
Currently supported scope:
207+
Currently supported scopes:
202208

203209
- `user`
210+
- `repo`
211+
### Repository
212+
213+
View repository metadata and a summary of recent events in one go.
214+
215+
#### Repo Info
216+
217+
```bash
218+
gh-activity repo <owner>/<repo> info [--limit N]
219+
```
220+
221+
Shows a two-column table with key fields, followed by a compact events summary.
222+
223+
Field order:
224+
225+
1. Name
226+
2. Description
227+
3. Primary Language
228+
4. License
229+
5. Visibility
230+
6. Stars
231+
7. Forks
232+
8. Open Issues
233+
9. Created
234+
10. Last Updated
235+
11. Last Push
236+
12. Topics
237+
238+
Events order: Push, Issues, Watch, Pull Requests.
239+
240+
#### Example
241+
242+
```
243+
- Using GitHub Token for authentication.
244+
245+
📦 Repository Info
246+
247+
FIELD VALUE
248+
------------------ --------------------------------------------
249+
Name ndk123-web/github-activity
250+
Description A lightweight, cross-platform CLI tool to inspect recent GitHub user activity
251+
Primary Language Go
252+
License MIT
253+
Visibility Public
254+
Stars 1
255+
Forks 0
256+
Open Issues 0
257+
Created 2025-12-24
258+
Last Updated 2025-12-28
259+
Last Push 2025-12-28
260+
Topics [cli] [command-line-tool] [cross-platform] [golang] [tool]
261+
262+
📦 Repository Events (recent)
263+
--------------------
264+
EVENT COUNT
265+
------------- -----
266+
Push Events 20
267+
Issues 2
268+
Watch Events 1
269+
Pull Requests 0
270+
```
271+
272+
`--limit` controls the number of recent events considered when building the summary.
273+
204274

205275
---
206276

@@ -371,6 +441,11 @@ For internal architecture and extension guidance, see [docs/developer-guide.md](
371441
- One push event ≠ one commit
372442
- Output is optimized for terminal readability and scripting
373443

444+
### Formatting notes
445+
446+
- Long descriptions are normalized (whitespace collapsed) and truncated to avoid breaking table layout.
447+
- Topic tags render as bracketed labels: `[tag1] [tag2] …`.
448+
374449
---
375450

376451
## License

0 commit comments

Comments
 (0)