Giter VIP home page Giter VIP logo

summaraizehub's Introduction

SummarAIzeHub

SummarAIzeHub automatically summarizes an issue on GitHub when /summarize-issue is written in an issue comment. This action generates summaries using OpenAI's GPT model.

Prerequisites

  1. You need access to the OpenAI API. First, sign up for OpenAI and obtain an API key.
  2. Add OPENAI_API_KEY and PERSONAL_ACCESS_TOKEN to your GitHub repository secrets. The OPENAI_API_KEY is obtained in the previous step. Use ${{ secrets.PERSONAL_ACCESS_TOKEN }} for the PERSONAL_ACCESS_TOKEN.

Installation

  1. Create a .github/workflows directory in your repository and create a file named summarize_issue.yml within it.
  2. Add the following code to summarize_issue.yml:
name: Summarize Issue

on:
  issue_comment:
    types: [created]

jobs:
  summarize_issue:
    if: startsWith(github.event.comment.body, '/summarize-issue')
    runs-on: ubuntu-latest
    name: Checkout code & SummarAIze
    steps:
      - uses: actions/checkout@v3
      - uses: zerebom/SummarAIzeHub@main
        with:
          PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
          OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}

Replace your-username with the GitHub username hosting the action.

Now, SummarAIzeHub is installed in your repository. When a comment contains /summarize-issue, a summary will be automatically generated.

Using Custom Prompt Templates

By default, the prompt template is stored in path/to/default/prompt_template.txt. If you want to use a custom prompt template, add prompt_template_path to the with section as follows:

with:
  PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
  openai_api_key: ${{ secrets.OPENAI_API_KEY }}
  prompt_template_path: 'path/to/your/custom_template.txt'

Using a custom template allows you to freely customize the format and questions of the summary. The prompt template is text sent to the GPT model along with the issue information, allowing GPT to generate an appropriate summary.

Notes

  • This action is triggered only when the comment contains /summarize-issue. It will not be executed for other comments.
  • Summaries are automatically generated and may not be perfect. Corrections may be necessary for the summaries.
  • Manage your OpenAI API key properly, as it is associated with costs for API requests. Storing the API key in the repository's secrets ensures that the key will not be leaked to other users.

License

This project is released under the Apache License. For more information, see the LICENSE file.

summaraizehub's People

Contributors

zerebom avatar

Stargazers

Yuki Oshima avatar  avatar mono — Masayuki Ono avatar Hazumi Ichijo avatar nasa avatar

Watchers

 avatar

summaraizehub's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.