Skip to content
 
 

Latest commit

 

History

187 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Activity Log

activity log

made with love typescript

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.

🛠️Features

  • Customizable Event Limits
  • Event Filtering
  • Flexibility with Inputs

✍️ Example

  1. 🎉 Created a new repository DevOpsJira2024/PublicTest
  2. ➕ Created a new branch main in DevOpsJira2024/PublicTest
  3. 📝 Committed to a private repo
  4. 📝 Committed to a private repo
  5. 📝 Committed to a private repo
  6. 📝 Committed to a private repo
  7. 📝 Committed to a private repo
  8. 📝 Committed to a private repo
  9. 📝 Committed to a private repo
  10. 📝 Committed to a private repo
  11. 📝 Committed to a private repo
  12. 📝 Committed to a private repo
  13. 📝 Committed to a private repo
  14. 📝 Committed to a private repo
  15. ➕ Created a new tag v1 in a private repo
  16. 🚀 Published release in a private repo
  17. 📝 Committed to liehcheng/activity-log
  18. 📝 Committed to liehcheng/activity-log
  19. 📝 Committed to liehcheng/activity-log
  20. 📝 Committed to liehcheng/activity-log
  21. 📝 Committed to liehcheng/activity-log
  22. 📝 Committed to liehcheng/activity-log
  23. 📝 Committed to a private repo
  24. 📝 Committed to a private repo
  25. 📝 Committed to a private repo
  26. 📝 Committed to liehcheng/activity-log
  27. 📝 Committed to liehcheng/activity-log
  28. 🍴 Forked TheDanniCraft/activity-log
  29. 📝 Committed to a private repo
  30. ➕ Created a new branch ttttttttttttt in a private repo
  31. 📝 Committed to a private repo
  32. 📝 Committed to a private repo
  33. 📝 Committed to a private repo
  34. 📝 Committed to a private repo
  35. 📝 Committed to a private repo
  36. 📝 Committed to a private repo
  37. 📝 Committed to a private repo
  38. 📝 Committed to a private repo
  39. 📝 Committed to a private repo
  40. 📝 Committed to a private repo
  41. 📝 Committed to a private repo
  42. 📝 Committed to a private repo
  43. 📝 Committed to a private repo
  44. 📝 Committed to a private repo
  45. 📝 Committed to a private repo
  46. 📝 Committed to a private repo
  47. 📝 Committed to a private repo
  48. 📝 Committed to a private repo
  49. 🗑️ Deleted a branch b1 in a private repo
  50. 📝 Committed to a private repo
  51. 🔀 Merged a PR in a private repo
  52. 📥 Opened a PR in a private repo
  53. 📝 Committed to a private repo
  54. 📝 Committed to a private repo
  55. ➕ Created a new branch b1 in a private repo
  56. 🗑️ Deleted a branch liehcheng-patch-1 in a private repo
  57. 📝 Committed to a private repo
  58. 📝 Committed to a private repo
  59. 📝 Committed to a private repo
  60. 📝 Committed to a private repo
  61. 📝 Committed to a private repo
  62. 📝 Committed to a private repo
  63. 📝 Committed to a private repo
  64. 📝 Committed to a private repo
  65. 📝 Committed to a private repo
  66. 📝 Committed to a private repo
  67. 📝 Committed to a private repo
  68. 📝 Committed to a private repo
  69. 📝 Committed to a private repo
  70. 📝 Committed to a private repo
  71. 📝 Committed to a private repo
  72. 📝 Committed to a private repo
  73. ➕ Created a new branch liehcheng-patch-1 in a private repo
  74. 📝 Committed to a private repo
  75. 📝 Committed to a private repo
  76. 📝 Committed to a private repo
  77. 📝 Committed to a private repo
  78. 📝 Committed to a private repo
  79. 📝 Committed to a private repo
  80. 📝 Committed to a private repo

📖Usage

1. Add Sections to README.md

Include the following placeholders in your README.md where you want the activity log to appear:

<!--START_SECTION:activity-->
<!--END_SECTION:activity-->

For a reference example, you can view this sample README.md.

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. 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.
  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:

# .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 for customization

The above job runs every half an hour, you can change it as you wish based on the cron syntax.

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.

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
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"])
README_PATH The path to your README file. README.md Any valid file path
COMMIT_MESSAGE Your commit message. - Any valid commit message

📜License

MIT

✍️Authors

About

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.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages