GitHub
Record the pull requests you opened, merged, closed, and reviewed into your work file.
swelog fetch githubThe first run asks for a
GitHub personal access token with the
repo scope and stores it in your operating system keyring.
Backfilling
Section titled “Backfilling”To fetch a previous date, provide MM-DD-YYYY:
swelog fetch github --date 08-17-2026For the previous day, use --yesterday instead of working out the date:
swelog fetch github --yesterdayFor last Friday, use --last-friday instead of working out the date:
swelog fetch github --last-fridayWhat gets recorded
Section titled “What gets recorded”- Opened: pull requests you created on the date.
- Merged: pull requests you authored that were merged on the date.
- Closed: pull requests you authored that were closed without merging on the date.
- Reviewed: other people’s pull requests where you submitted a review on the date. Pending reviews and reviews of your own pull requests are not included.
Reviews are matched by the UTC time they were submitted.
Output
Section titled “Output”The command creates or updates the ## GitHub section before ## Log.
## GitHub
### Opened
- "Test PR" ([#123](https://github.com/swelog-cli/swelog-cli/pull/123)) in [swelog-cli/swelog-cli](https://github.com/swelog-cli/swelog-cli)
### Merged
- "Test PR 2" ([#456](https://github.com/swelog-cli/swelog-cli/pull/456)) in [swelog-cli/swelog-cli](https://github.com/swelog-cli/swelog-cli)
### Closed
- "Test PR 3" ([#789](https://github.com/swelog-cli/swelog-cli/pull/789)) in [swelog-cli/swelog-cli](https://github.com/swelog-cli/swelog-cli)
### Reviewed
- "Teammate's PR" ([#321](https://github.com/swelog-cli/swelog-cli/pull/321)) in [swelog-cli/swelog-cli](https://github.com/swelog-cli/swelog-cli)