DEV Community

Nabil Alamin
Nabil Alamin

Posted on • Updated on

View Github Issues as stats in a compact way

My Workflow

Issue Stats analyses a repo's issues and then generates a table for quick and easy info. The stat points are:

  • average issue response time ⏱
  • total issues 🔢
  • open issues 📬
  • closed issues 📭
  • replied issues ☑
  • not replied issues ➖

 

Submission Category:

Maintainer Must-Haves / Wacky Wildcards

 

Link to Code and YAML File

GitHub logo arndom / issue-stats-card

Analyse a github repo's issues then generates a table of stats for quick info.

Live Preview

Issue Statistics Values
Closed Issues 📪 1
Open Issues 📫 0
Total Issues 🔢 1
Replied Issues 0
Not Replied Issues 1
Avg. Issue Response Time NA

How to use

  1. Star this repo p��

  2. Go to your special repository(repo with name the same as git username).

  3. Add the following section to your README.md file, you can give whatever title you want. Just make sure that you use <!-- <-ISSUE-STAT-HERE-> --><!-- <-ISSUE-END-HERE-> --> in your readme. The workflow will replace this comment with the actual blog post list:

    # ISSUE STATS
    <!-- <-ISSUE-STAT-HERE-> -->
    <!-- <-ISSUE-END-HERE-> -->
    Enter fullscreen mode Exit fullscreen mode
  4. Create a folder named .github and create a workflows folder inside it, if it doesn't exist.

  5. Create a new file named issue-stat-workflow.yml with the following contents inside the workflow folder:

name: Issue Stats Card
on:
  issues:
    types: [opened, edited, closed]
  issue_comment:
    types: [created,
Enter fullscreen mode Exit fullscreen mode

name: Issue Stats Card

on:
  issues:
    types: [opened, edited, closed]
  issue_comment:
    types: [created, deleted]
  workflow_dispatch: # Run workflow manually (without waiting for the cron to be called), through the Github Actions Workflow page directly

jobs:
  get_repo_issue_stats:
    runs-on: ubuntu-latest
    name: Get repo issue stats
    steps:
    - name: Checkout
      uses: actions/checkout@v2
    - name: Get issue stats then generate card 
      uses: arndom/issue-stats-card@v1

Enter fullscreen mode Exit fullscreen mode

 

Additional Resources / Info

Late submission incoming... been a wonderful hackathon, so glad I found the time to learn something new and make this.
Special thanks to @omzlaw for the help in my thought process and debugging.

Hope you like it 🤗, Don't forget to leave a star ⭐

Discussion (0)