https://github.com/thedannicraft/activity-log
A GitHub Action that automatically updates your README file with the latest activity from your GitHub account. Customize the displayed events, set a limit on the number of events, and ignore specific event types. Ideal for keeping your personal README file current with recent contributions and changes.
https://github.com/thedannicraft/activity-log
activity bun github-action-javascript github-actions github-workflow hacktoberfest javascript profile-page profile-readme readme readme-profile
Last synced: 3 months ago
JSON representation
A GitHub Action that automatically updates your README file with the latest activity from your GitHub account. Customize the displayed events, set a limit on the number of events, and ignore specific event types. Ideal for keeping your personal README file current with recent contributions and changes.
- Host: GitHub
- URL: https://github.com/thedannicraft/activity-log
- Owner: TheDanniCraft
- License: mit
- Created: 2024-07-25T15:30:27.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2026-03-04T20:42:45.000Z (3 months ago)
- Last Synced: 2026-03-04T20:55:22.214Z (3 months ago)
- Topics: activity, bun, github-action-javascript, github-actions, github-workflow, hacktoberfest, javascript, profile-page, profile-readme, readme, readme-profile
- Language: JavaScript
- Homepage: https://github.com/marketplace/actions/github-activity-log
- Size: 1020 KB
- Stars: 16
- Watchers: 2
- Forks: 78
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
- Support: SUPPORT.md
Awesome Lists containing this project
README
y
Activity Log

A GitHub Action that automatically updates your README file with the latest activity from your GitHub account. Customize the displayed events, set a limit on the number of events, and ignore specific event types. Ideal for keeping your personal README file current with recent contributions and changes.
## π Project Docs
- [Contributing Guidelines](./CONTRIBUTING.md)
- [Security Policy](./SECURITY.md)
- [Support Guide](./SUPPORT.md)
- [Code of Conduct](./CODE_OF_CONDUCT.md)
## π οΈFeatures
- Customizable Event Limits
- Event Filtering
- Flexibility with Inputs
- Customizable
- Dry Run Mode (preview changes without committing)
- Custom Commit Messages
- Markdown or HTML Output Styles
- Hide Details on Private Repositories
## βοΈ Example
1. π Published release v0.0.16 in [TheDanniCraft/activity-log](https://github.com/TheDanniCraft/activity-log/releases/tag/v0.0.16) on Mar 11, 2026
2. π Committed to master in [TheDanniCraft/activity-log](https://github.com/TheDanniCraft/activity-log/commit/d3e1ec09f07f30cd4472c34c194f57de6ee0404d) on Mar 11, 2026
3. π Merged PR #111 in [TheDanniCraft/activity-log](https://github.com/TheDanniCraft/activity-log/pull/111) on Mar 11, 2026
4. π Committed to patch-v0.0.16 in [TheDanniCraft/activity-log](https://github.com/TheDanniCraft/activity-log/commit/973573cf9087425d7cee4df0c4e967e87f06b01d) on Mar 11, 2026
5. π Committed to patch-v0.0.16 in [TheDanniCraft/activity-log](https://github.com/TheDanniCraft/activity-log/commit/5da54f7cd22e3084f7621e500985e55c33be0510) on Mar 11, 2026
6. π Opened PR #111 in [TheDanniCraft/activity-log](https://github.com/TheDanniCraft/activity-log/pull/111) on Mar 11, 2026
7. π Committed to patch-v0.0.16 in [TheDanniCraft/activity-log](https://github.com/TheDanniCraft/activity-log/commit/8a4b74d3e23febea5fe985b089431b11abcb8509) on Mar 11, 2026
8. β¨ Created a new branch patch-v0.0.16 in [TheDanniCraft/activity-log](https://github.com/TheDanniCraft/activity-log/tree/patch-v0.0.16) on Mar 10, 2026
9. π Published release v0.0.15 in [TheDanniCraft/activity-log](https://github.com/TheDanniCraft/activity-log/releases/tag/v0.0.15) on Mar 10, 2026
10. π£ Commented on issue #40 in [TheDanniCraft/activity-log](https://github.com/TheDanniCraft/activity-log/issues/40#issuecomment-4035171044) on Mar 10, 2026
## πUsage
### 1. Add Sections to `README.md`
Include the following placeholders in your `README.md` where you want the activity log to appear:
```markdown
```
For a reference example, you can view this [sample `README.md`](https://github.com/TheDanniCraft/activity-log/blob/master/README.md?plain=1#L20-L31).
### 2. Create a Personal Access Token
Quick Setup (Recommended)
1. To create a personal access token with the necessary permissions, click this [link to create a new token](https://github.com/settings/tokens/new?description=Github%20Activity%20Log%20(TheDanniCraft/activity-log)&scopes=repo). This link pre-fills the token description and scopes for your convenience.
2. On the token creation page, review the pre-filled data and set the expiration date to "Never".
3. Click "Generate token" and copy the token (be sure to save it as you wonβt be able to see it again).
Manual Setup
1. Go to your GitHub [Personal Access Tokens settings](https://github.com/settings/tokens).
2. Click on "Generate new token".
3. Provide a descriptive name for the token, such as `Github Activity Log (TheDanniCraft/activity-log)`.
4. Select the `repo` scope (recommended if you want private repo activity to show up).
5. Set the expiration date to "Never".
6. Click "Generate token" and copy the token (be sure to save it as you wonβt be able to see it again).
### 3. Add the Token as a Repository Secret
1. Navigate to your GitHub repository.
2. Go to "Settings" > "Secrets and variables" > "Actions".
3. Click "New repository secret".
4. Name the secret (e.g., `TOKEN`).
5. Paste the personal access token into the value field.
6. Click "Add secret".
### 4. Create the Workflow File
Create a new file in your repository under `.github/workflows/`, for example, `activity-log.yml`. Add the following content to this file:
```yml
# .github/workflows/update-activity.yml:
name: Update GitHub Activity
on:
schedule:
- cron: "*/30 * * * *" # Runs every 30 minutes
workflow_dispatch: # Allows manual triggering
jobs:
update-activity:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Update GitHub Activity
uses: TheDanniCraft/activity-log@v1
with:
GITHUB_USERNAME: "thedannicraft"
GITHUB_TOKEN: ${{ secrets.TOKEN }} # Ensure this matches the secret name in repository settings
```
Take a look at all possible [Inputs](#inputs) for customization
The above job runs every half an hour, you can change it as you wish based on the [cron syntax](https://crontab.guru).
Please note that only those public events that belong to the following list show up:
- `CreateEvent`
- `PushEvent`
- `IssuesEvent`
- `opened`
- `edited`
- `closed`
- `reopened`
- `assigned`
- `unassigned`
- `labeled`
- `unlabeled`
- `PullRequestEvent`
- `opened`
- `edited`
- `closed`
- `merged`
- `reopened`
- `assigned`
- `unassigned`
- `review_requested`
- `review_request_removed`
- `labeled`
- `unlabeled`
- `synchronize`
- `ReleaseEvent`
- `ForkEvent`
- `CommitCommentEvent`
- `IssueCommentEvent`
- `PullRequestReviewEvent`
- `PullRequestReviewCommentEvent`
- `RepositoryEvent`
- `WatchEvent`
- `StarEvent`
- `PublicEvent`
- `GollumEvent`
You can find an example [here](https://github.com/TheDanniCraft/activity-log/blob/master/.github/workflows/update-activity.yml).
### Inputs
| **Input** | **Description** | **Required** | **Default** | **Possible Options** |
|---------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------|-----------------------------------------|-----------------------------------------------------------------------------|
| `GITHUB_USERNAME` | Your GitHub username. | β
| `-` | A valid GitHub username |
| `GITHUB_TOKEN` | Your GitHub token. | β
| `-` | A valid GitHub access token (must belong to the specified GitHub username) |
| `EVENT_LIMIT` | The maximum number of events to display. | β | `10` | Any positive integer (250 max.) |
| `OUTPUT_STYLE` | Specifies the format in which your output should be rendered.
Must be one of:
- `MARKDOWN`: Output in Markdown format
- `HTML`: Output in HTML format | β | `MARKDOWN` | `MARKDOWN` or `HTML` |
| `IGNORE_EVENTS` | The events to ignore, specified as a JSON array. | β | `[]` | JSON array of event types (e.g., `["PushEvent", "PullRequestEvent"]`) |
| `HIDE_DETAILS_ON_PRIVATE_REPOS` | Hide details (branch/tag name) on private repositories | β | `false` | `true` or `false` |
| `README_PATH` | The path to your README file. | β | `README.md` | Any valid file path |
| `COMMIT_MESSAGE` | Commit message used when updating the README file. | β | `Update README.md with latest activity` | Any valid commit message |
| `EVENT_EMOJI_MAP` | Optional YAML object mapping event types to emojis. (See [π¨ Customizing Emojis](https://github.com/TheDanniCraft/activity-log#-customizing-emojis)) | β | `""` | YAML object mapping event types to emojis |
| `EVENT_TEMPLATE` | Template used to render all events. Placeholders: `{emoji}`, `{event_type}`, `{action}`, `{subject}`, `{verb}`, `{repo}`, `{repo_url}`, `{date}`, `{number}`, `{url}`, `{ref}`, `{ref_type}` | β | `"{emoji} {action} {subject} {ref} {number} {verb} [{repo}]({url})"` | Template string |
| `DRY_RUN` | Enable dry run mode (no changes will be committed) | β | `false` | `true` or `false` |
## π¨ Customizing Emojis
You can personalize the emojis shown for each event type using the `EVENT_EMOJI_MAP` input. This input accepts a YAML object mapping event types (and subtypes) to your preferred emojis.
**Example usage in your workflow:**
```yaml
uses: TheDanniCraft/activity-log@v1
with:
GITHUB_USERNAME: "thedannicraft"
GITHUB_TOKEN: ${{ secrets.TOKEN }}
EVENT_EMOJI_MAP: |
PushEvent: "π"
CreateEvent: "β¨"
DeleteEvent: "π₯"
IssuesEvent: |
opened: "π"
closed: "β
"
```
Reference the `EVENT_EMOJI_MAP` input in the [Inputs](#inputs) table above for more details.
## π― Custom Event Templates
You can customize event rendering with one global template using `EVENT_TEMPLATE`.
Supported placeholders:
- `{emoji}`: Event emoji from the default map or `EVENT_EMOJI_MAP` (example: `π`)
- `{event_type}`: Raw GitHub event type (example: `PushEvent`)
- `{action}`: Human-readable action text (example: `Committed`, `Opened`, `Merged`)
- `{subject}`: Event object for readable phrasing (example: `PR`, `issue`, `commit`, `release`)
- `{verb}`: Connector based on legacy phrasing (example: `to`, `in`, or empty)
- `{repo}`: Repository name (or `a private repository` for private events)
- `{repo_url}`: Repository URL (example: `https://github.com/TheDanniCraft/activity-log`)
- `{date}`: Formatted event date in UTC (example: `Mar 10, 2026`)
- `{number}`: Issue/PR number when available (example: `#110`)
- `{url}`: Link to the related resource (commit/comment/review/PR/issue/release when available, otherwise the repository URL for public events)
- `{ref}`: Branch/tag ref when available (example: `main`, `v1.2.0`)
- `{ref_type}`: Ref type for create/delete events (example: `branch`, `tag`, `repository`)
Example:
```yaml
EVENT_TEMPLATE: "{emoji} {action} {subject} {ref} {number} {verb} [{repo}]({url})"
```
## πLicense
[MIT](https://choosealicense.com/licenses/mit/)
## βοΈAuthors
- [@thedannicraft](https://www.github.com/thedannicraft)
## β¨Contributors
Thanks goes to these wonderful people: [Emoji key for contribution types](https://allcontributors.org/docs/en/emoji-key).

Rounak Joshi
π π» β οΈ

Glched
π π
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
## π Blog Posts
How to automate your GitHub README
Oct 23, 2025 β’ by TheDanniCraft
Wrote a blog post about activity-log? [Open an issue](https://github.com/TheDanniCraft/activity-log/issues/new) and share the article link.