auto-label

command module
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 30, 2023 License: MIT Imports: 15 Imported by: 0

README

ChatGPT Auto Labeler Action

The ChatGPT Auto Labeler Action is a GitHub Action that automatically assigns labels to issues, discussions, and pull requests based on responses generated by ChatGPT. This action utilizes the power of ChatGPT to analyze the content and title of these artifacts and suggests suitable labels from the available labels.

Usage

To use this action, you need to set up the necessary inputs and provide your ChatGPT API token.

Inputs

  • openai-api-key (required): API token for ChatGPT.
  • gh-token (required): GitHub personal access token.
  • timeout (optional): Timeout for ChatGPT API requests in seconds.
  • details (optional): Additional details for label suggestions. For example: SBOM is not misconfig.
  • excluded-labels (optional): A comma-separated list of labels to exclude from automatic assignment. For example: 'bug,duplicate'.

Example Workflow

Create a workflow file (e.g., .github/workflows/auto-labeling.yaml) with the following content:

name: Auto Labeling

on:
  issues:
    types:
      - opened
  pull_request:
    types:
      - opened

jobs:
  auto-label:
    runs-on: ubuntu-latest

    steps:
      - name: Auto Labeling with ChatGPT
        uses: nikpivkin/auto-label@v0
        with:
          openai-api-key: ${{ secrets.OPENAI_API_KEY }}
          gh-token: ${{ secrets.MY_PERSONAL_GH_TOKEN }}
          excluded-labels: "duplicate"

    # Add additional steps as needed

Configuration

ChatGPT API Token: Obtain a ChatGPT API token from the ChatGPT OpenAI API.

Workflow Trigger: Configure the workflow trigger as needed. The example above triggers the workflow when a new issue or pull request is opened.

License

This project is licensed under the MIT License.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL