Skip to content

📚 Updates README with the recent GitHub activity of an user. It's a forked project, I changed JavaScript for TypeScript (my bad, instead of just use JSDoc) and added some features.

License

Notifications You must be signed in to change notification settings

hyduez/github-activity-readme

 
 

Repository files navigation

GitHub Activity in Readme

Updates README.md with the recent GitHub activity of a user.

profile-repo


Instructions

  • Add the comment <!--START_SECTION:activity--> (entry point) within README.md. You can find an example here.

  • It's the time to create a workflow file.

.github/workflows/update-readme.yml

name: Update README
on:
  schedule:
    - cron: "*/30 * * * *"
  workflow_dispatch:
jobs:
  build:
    name: Update this repo's README with recent activity
    runs-on: ubuntu-latest
    permissions:
      contents: write

    steps:
      - uses: actions/checkout@v3
      - uses: jamesgeorge007/github-activity-readme@master
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

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

  • IssueEvent
  • ReleaseEvent
  • IssueCommentEvent
  • PullRequestEvent

You can find an example here.

Override defaults

Use the following input params to customize it for your use case:-

Input Param Default Value Description
COMMIT_NAME github-actions[bot] Name of the committer
COMMIT_EMAIL 41898282+github-actions[bot]@users.noreply.github.com Email of the committer
COMMIT_MSG âš¡ Update README with the recent activity Commit message used while committing to the repo
MAX_LINES 5 The maximum number of lines populated in your readme file
TARGET_FILE README.md The file to insert recent activity into
name: Update README
on:
  schedule:
    - cron: "*/30 * * * *"
  workflow_dispatch:
jobs:
  build:
    name: Update this repo's README with recent activity
    runs-on: ubuntu-latest
    permissions:
      contents: write

    steps:
      - uses: actions/checkout@v3
      - uses: jamesgeorge007/github-activity-readme@master
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          COMMIT_MSG: "Specify a custom commit message"
          MAX_LINES: 10
          COMMIT_NAME: GitHub Activity Readme

Inspired by JasonEtco/activity-box

About

📚 Updates README with the recent GitHub activity of an user. It's a forked project, I changed JavaScript for TypeScript (my bad, instead of just use JSDoc) and added some features.

Resources

License

Code of conduct

Stars

Watchers

Forks

Languages

  • JavaScript 98.7%
  • TypeScript 1.3%