Skip to content

seed-of-apricot/issue-list-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

rewriteReadme

Auto Issue List in README

Display issues on the landing page ๐Ÿ‘€

Demo

The issue list below...

Title Status Assignee Body
more test โœณ๏ธ yay!
test โœณ๏ธ test
hoge
testtest
...

is compiled through this action.

# setup
steps:
  - name: checkout
    uses: actions/checkout@v2
  - name: rewriteReadme
    uses: seed-of-apricot/[email protected]
    with:
      GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
      pattern: '<!-- issueTable -->' # suffixing "Demo" for this readme
      labels: 'good first issue'
      state: 'open'
# you need to add, commit and push here
# otherwise the changes will not be pushed back into master

Usage

  1. Place two identifiers in your README.md, which the action detects as the location to inject the issue list to.
README.md

//
// your contents
//

// place two identifiers

<!-- issueTable -->

<!-- issueTable -->

//
// your another contents
//
  1. Add some issues. You can optionally use the same identifier to extract a part the body to display in the list.
Some issue

// place two identifiers (optional)

<!-- issueTable -->

<!-- issueTable -->

//
// your comment
//
  1. Then, write the following section into your action.
uses: seed-of-apricot/[email protected]
with:
  GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'

The action will fetch the issues in the repository and re-write the README.md ๐Ÿ‘
The body will show up to three first lines of the body (or the extracted part of it).

It is recommended to run this action on issue open/close or by a cron job (e.g., cron: "0 0 * * *").

Options

Available variables are:

variable required default note
GITHUB_TOKEN true - you can use ${{ secrets.GITHUB_TOKEN }}
pattern false "<!-- issueTable -->" the identifier to inject the issue table and
extract the body of each issue
labels false - comma-separated labels to filter issues
state false "all" state of the issues to filter them ("all" | "open" | "closed")

Limitations

You must have README.md (not README) to make this work. (todo)

License

MIT License. This repository uses the typescript-action template so the original MIT license also applies.