Skip to content

GitHub - Public/Private Activity - Readme

Actions
Updates README with the recent GitHub activity of a user
v1.0.2
Latest
Star (3)

Tags

 (1)

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:
    runs-on: ubuntu-latest
    name: Update this repo's README with recent activity

    steps:
      - uses: actions/checkout@v2
      - 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.

  • PushEvent
  • IssueEvent
  • IssueCommentEvent
  • PullRequestEvent

You can find an example here.

Instructions for private events

In case you want to show private events

  • Please generate a new personal token.
  • Add your token to Secrets in the repository which contains the README file.
  • Use ${{ secrets.MY_SECRET_GITHUB_TOKEN }} to get private event instead of ${{ secrets.GITHUB_TOKEN }}.

Override defaults

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

Input Param Default Value Description
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
name: Update README

on:
  schedule:
    - cron: '*/30 * * * *'
  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-latest
    name: Update this repo's README with recent activity

    steps:
      - uses: actions/checkout@v2
      - uses: jamesgeorge007/github-activity-readme@master
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          COMMIT_MSG: 'Specify a custom commit message'
          MAX_LINES: 10

Inspired by JasonEtco/activity-box

GitHub - Public/Private Activity - Readme is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Updates README with the recent GitHub activity of a user
v1.0.2
Latest

Tags

 (1)

GitHub - Public/Private Activity - Readme is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.