Skip to content

sethrylan/issue-digest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Issue Digest

CI CodeQL

A GitHub Action that comments a list of issues. If a discussion with a matching title is found, that discussion is used, otherwise a new discussion is created.

Development

  1. 🛠️ Install the dependencies

    npm install
  2. 🏗️ Package the TypeScript for distribution

    npm run bundle
  3. ✅ Run the tests

    npm test
  4. 🚀 Build the action, rollup and run test.

    npm run all

Usage

Create a daily discussion (at 08:00 UTC), with a list of issues in the last 24 hours

on:
  schedule:
    - cron: '0 8 * * *'

permissions:
  contents: read
  discussions: write
  issues: read

jobs:
  issue-digest:
    runs-on: ubuntu-latest
    steps:
      - uses: sethrylan/issue-digest@main
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Create a weekly discussion every Monday, and comment every day at 08:00 UTC with a list of updated issues

on:
  schedule:
    - cron: '0 8 * * *'

permissions:
  contents: read
  discussions: write
  issues: read

jobs:
  issue-digest:
    runs-on: ubuntu-latest
    steps:
      - id: last
        run: |
          echo "monday=$(date -d 'last Monday' '+%Y-%m-%d')" >> "$GITHUB_OUTPUT"
      - uses: sethrylan/issue-digest@main
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          intro: |
            🤖 This discussion was created by issue-digest
            The title of the discussion will be create a new discussion each week, and every time the action runs a comment will be added with a list of issues changed in the last 24 hours.
          comment: |
            Issues updated in the last 24 hours
          title: |
            Issue Digest for Week of ${{ steps.last.outputs.monday }}

Add Copilot summaries to the digest

permissions:
  contents: read
  discussions: write
  issues: read
  models: read

jobs:
  issue-digest:
    runs-on: ubuntu-latest
    steps:
      - uses: sethrylan/issue-digest@main
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          models: true
          lookback: 4hr # optional, defaults to 1d; this can help to trim the context to recent changes

Inputs

Name Description Required Default
repo Repository to digest No Current repository
since Datetime to look back to No 24 hours ago
query Issue query string No repo:<repo> updated:>=<since>
title Title of discussion post No Issue Digest <current date UTC>
intro Text/Markdown for the discussion intro No
comment Text/Markdown for the comment intro No
discussionCategory Discussion category to use No General
models Use GitHub Models to summarize issues No false
lookback Time duration for event timeline lookback (e.g., 2hr, 1w) No 1d

Outputs

Name Description
discussionUrl The URL of the discussion post created or updated

Common Errors

Error Resource not accessible by integration

Check the permissions for the calling workflow.

No Issues are found

Check the permissions for the calling workflow.

Discussion category (General) not found

Check that discussions are enabled for the repository.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •