Skip to content

A GitHub Action that automatically updates your README file with list of your pull requests that have been successfully merged.

License

Notifications You must be signed in to change notification settings

asciimoth/prlist

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

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PR's list

A GitHub Action that automatically updates your README file with list of your pull requests that have been successfully merged.
Inspired by TheDanniCraft/activity-log

Features

  • Filter for specific repos/repo owners
  • Multiple render formats

Example

Merged pull requests by Linus Torvalds:

Usage

1. Add Sections to Your README

Include the following placeholders in your README:

<!--START_SECTION:prlist-->
<!--END_SECTION:prlist-->

2. Create the GitHub Workflow File

Create a new file in your repository under .github/workflows/, for example, pr-list.yml. Add the following content to this file:

# .github/workflows/pr-list.yml:

name: Update list of my PRs

on:
  schedule:
    - cron: '0 0 * * *'   # every day at 00:00 UTC
  workflow_dispatch: # Allows manual triggering

jobs:
  prlist:
    runs-on: ubuntu-latest
    permissions:
      # Give the default GITHUB_TOKEN write permission to commit and push the
      # added or changed files to the repository.
      contents: write
    steps:
      - name: Update PRs list in README
        uses: asciimoth/prlist@v0.1.0
        with:
          ignore: "owner/repo:owner/*:*/repo"
          format: "md"

Inputs

ignore

ignore input defines filter for repos in form of colon-separated list of patterns:
owner/repo:owner/*:*/repo

  • To ignore specific repo with name a owned by user b use b/a pattern
  • To ignore all repos by user c use c/* pattern
  • To ignore all repos with name d by any user use pattern */d

format

There is three list formats available:

md (default) produce markdown list of links:

<!--START_SECTION:prlist-->
- [subsurface/libdc](https://github.com/subsurface/libdc/pulls?q=is%3Apr+author%3Atorvalds)
- [subsurface/subsurface](https://github.com/subsurface/subsurface/pulls?q=is%3Apr+author%3Atorvalds)
- [libgit2/libgit2](https://github.com/libgit2/libgit2/pulls?q=is%3Apr+author%3Atorvalds)
<!--END_SECTION:prlist-->

html produce <ul>&<li> list:

<!--START_SECTION:prlist-->
<ul>
<li> <a href="https://github.com/subsurface/libdc/pulls?q=is%3Apr&#43;author%3Atorvalds">subsurface/libdc</a> </li>
<li> <a href="https://github.com/subsurface/subsurface/pulls?q=is%3Apr&#43;author%3Atorvalds">subsurface/subsurface</a> </li>
<li> <a href="https://github.com/libgit2/libgit2/pulls?q=is%3Apr&#43;author%3Atorvalds">libgit2/libgit2</a> </li>
</ul>
<!--END_SECTION:prlist-->

GitHub README rendering is pretty simple and usual html list wrapped in centered tag may looks broken. So there is also the html-br format which produce just a set of links separated with <br> tags:

<!--START_SECTION:prlist-->
<a href="https://github.com/subsurface/libdc/pulls?q=is%3Apr&#43;author%3Atorvalds">subsurface/libdc</a> <br>
<a href="https://github.com/subsurface/subsurface/pulls?q=is%3Apr&#43;author%3Atorvalds">subsurface/subsurface</a> <br>
<a href="https://github.com/libgit2/libgit2/pulls?q=is%3Apr&#43;author%3Atorvalds">libgit2/libgit2</a> <br>
<!--END_SECTION:prlist-->

About

A GitHub Action that automatically updates your README file with list of your pull requests that have been successfully merged.

Topics

Resources

License

Stars

Watchers

Forks

Languages