Skip to content

GitHub

Record the pull requests you opened, merged, closed, and reviewed into your work file.

Terminal window
swelog fetch github

The first run asks for a GitHub personal access token with the repo scope and stores it in your operating system keyring.

To fetch a previous date, provide MM-DD-YYYY:

Terminal window
swelog fetch github --date 08-17-2026

For the previous day, use --yesterday instead of working out the date:

Terminal window
swelog fetch github --yesterday

For last Friday, use --last-friday instead of working out the date:

Terminal window
swelog fetch github --last-friday
  • 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.

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)