Skip to content

Are you an early 🐤 or a night 🦉? Let's check out in your profile README

License

Notifications You must be signed in to change notification settings

vnoctem/productive-box-in-readme

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

poster

📄✨productive-box-in-readme

Are you an early 🐤 or a night 🦉?
When are you most productive during the day?
Let's check out in your profile README!


Overview

This project uses GitHub graphQL API to get the commit histories and write into the README by rest.js

The time periods differ from the original project. The ones used to generate the stats are as follow:
6am -> 🌞 Morning -> 11am -> 🌆 Daytime -> 6pm -> 🌃 Evening -> 11pm -> 🌙 Night -> 6am

Setup

Prep work

  1. You need to add two comment lines in your profile README.md, like this:

    <!--START_SECTION:productive-box-in-readme-->
    <!--END_SECTION:productive-box-in-readme-->

    These lines will be our entry points for the productive box stats.

  2. Create a token with the repo scope and copy it. (https://github.com/settings/tokens/new)

enabling repo scope may seem DANGEROUS
but this GitHub Action only accesses your commit timestamp in repositories you contributed.

Project setup

  1. Fork this repo

  2. Open the "Actions" tab of your fork and click the "enable" button

  3. Edit the environment variables in .github/workflows/schedule.yml:

    • TIMEZONE: The timezone of your location, eg. Asia/Taipei for Taiwan, America/New_York for New York in America, etc.
    • OWNER_REPO: Your GitHub username.
    • PATH: Path to your README file (default is README.md; should not need to be changed).
  4. Go to the repo Settings > Secrets

  5. Add the following environment variables:

    • GH_TOKEN: The GitHub token generated above.