Skip to content

Action for using Relgen, an AI powered PR and Issue labeler + summarizer

License

Notifications You must be signed in to change notification settings

zlalvani/relgen-action

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

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Relgen Action

This action uses relgen to automatically generate descriptive comments for pull requests and intelligently label them using AI.

Features

  • 🤖 AI-powered PR descriptions
  • 🏷️ Intelligent PR labeling
  • ⚙️ Customizable templates and prompts
  • 🔄 Updates on PR changes

Usage

name: PR Assistant
on:
  pull_request:
    types: [opened, synchronize, reopened]

jobs:
  relgen:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      pull-requests: write
      issues: write
    steps:
      - uses: actions/checkout@v4
      - uses: zlalvani/relgen-action@v1
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          llm-key: ${{ secrets.OPENAI_API_KEY }} # or ANTHROPIC_API_KEY
          llm-provider: openai # or anthropic
          llm-model: gpt-4o-mini # or claude-3-sonnet-20240229 etc

Inputs

Input Description Required Default
github-token GitHub token for API access Yes N/A
llm-key LLM API key (OpenAI or Anthropic) Yes N/A
llm-provider LLM provider (openai or anthropic) Yes openai
llm-model Model to use (e.g. gpt-4o-mini for OpenAI or claude-3-sonnet-20240229 for Anthropic) Yes N/A
description-template Path to description template file No Default template
description-prompt Path to description prompt file No Default prompt
write-mode Where to write descriptions (comma-separated list of: title,comment,description or off to disable) No comment
label-mode How to write labels (add, set, or off) No add
footer Footer text used to identify and update relgen comments (should not be empty) No Default footer with link to action

Customization

Templates

Create a markdown template file (e.g. .github/templates/pr-description.md):

### Changes
A bullet point list of the important changes

### Implementation
Technical details of the implementation

### Other Notes
Additional context or minor changes

Prompts

Create a prompt file (e.g. .github/prompts/pr-description.txt):

Focus on the technical impact of the changes.
Highlight any breaking changes.
Include performance implications.

Then update your workflow:

- uses: zlalvani/relgen-action@v1
  with:
    github-token: ${{ secrets.GITHUB_TOKEN }}
    llm-key: ${{ secrets.OPENAI_API_KEY }} # or ANTHROPIC_API_KEY
    llm-provider: openai # or anthropic
    llm-model: gpt-4o-mini # or claude-3-sonnet-20240229 etc
    write-mode: title,comment,description # Write to PR title, comment and description
    description-template: .github/templates/pr-description.md
    description-prompt: .github/prompts/pr-description.txt

About

Action for using Relgen, an AI powered PR and Issue labeler + summarizer

Resources

License

Stars

Watchers

Forks

Packages

No packages published