Skip to content

Repository files navigation

Nuxt Shared GitHub Configuration

This repository contains shared GitHub Actions workflows and scripts used across the Nuxt organization.

Reusable Workflows

Issue Triage Workflows

AI-powered issue triage using GitHub Models. These workflows automatically:

  • Categorize issues (bug, enhancement, documentation, spam)
  • Add appropriate labels
  • Translate non-English issues
  • Check for reproduction information
  • Reopen issues when new evidence is provided

Available Workflows

WorkflowTriggerDescription
triage-opened.ymlissues: [opened]Triage newly opened issues
triage-comment.ymlissue_comment: [created]Analyze comments for reproductions
triage-edited.ymlissues: [edited]Check edited issues for reproductions
triage-spam-transfer.ymlissues: [labeled]Transfer spam-labeled issues

Usage

Basic Setup

Create workflow files in your repository's .github/workflows/ directory:

triage-issue-opened.yml

name: triageon:
issues:
types: [opened]concurrency:
group: issue-triage-${{ github.event.issue.number }}cancel-in-progress: truejobs:
triage:
uses: nuxt/.github/.github/workflows/triage-opened.yml@mainwith:
enable-translation: trueenable-body-translation: truespam-repo-id: ${{ vars.TRIAGE_SPAM_REPO_ID }}project-name: 'Your Project Name'permissions:
contents: readissues: writemodels: read

triage-issue-comment.yml

name: triageon:
issue_comment:
types: [created]concurrency:
group: llm-triage-comment-${{ github.event.issue.number }}cancel-in-progress: falsejobs:
triage:
uses: nuxt/.github/.github/workflows/triage-comment.yml@mainpermissions:
contents: readissues: writemodels: read

triage-issue-edited.yml

name: triageon:
issues:
types: [edited]concurrency:
group: llm-triage-edit-${{ github.event.issue.number }}cancel-in-progress: falsejobs:
triage:
uses: nuxt/.github/.github/workflows/triage-edited.yml@mainpermissions:
contents: readissues: writemodels: read

triage-spam-transfer.yml

name: triageon:
issues:
types: [labeled]jobs:
transfer-spam:
if: | github.event.label.name == 'spam' && vars.TRIAGE_SPAM_REPO_ID != ''uses: nuxt/.github/.github/workflows/triage-spam-transfer.yml@mainwith:
spam-repo-id: ${{ vars.TRIAGE_SPAM_REPO_ID }}permissions:
contents: readissues: write

Configuration

Repository Variables

Set these in your repository's Settings > Secrets and variables > Actions > Variables:

VariableRequiredDefaultDescription
TRIAGE_SPAM_REPO_IDNo-Node ID of spam repository for issue transfers

Workflow Inputs

triage-opened.yml

InputTypeDefaultDescription
enable-translationbooleantrueTranslate non-English issue titles
enable-body-translationbooleantrueAlso translate issue body
spam-repo-idstring''Node ID for spam transfer target
scripts-refstring'main'Git ref for scripts
add-pending-labelbooleantrueAdd 'pending triage' to new issues
project-namestring'Nuxt.js framework'Project name for AI context

triage-comment.yml / triage-edited.yml

InputTypeDefaultDescription
scripts-refstring'main'Git ref for scripts

triage-spam-transfer.yml

InputTypeRequiredDescription
spam-repo-idstringYesNode ID of spam repository

Required Permissions

All triage workflows require:

permissions:
contents: read # To checkout shared scriptsissues: write # To add labels, update issuesmodels: read # To use GitHub Models AI

Labels

The workflows use these labels (create them in your repository):

LabelDescription
pending triageIssue awaiting review
needs reproductionBug report missing reproduction
possible regressionMay be a regression from upgrade
nitroRelated to deployment/Nitro
spamSpam content
duplicateDuplicate issue

How It Works

Issue Opened (triage-opened.yml)

  1. Adds pending triage label to new issues without labels
  2. Uses AI to categorize the issue
  3. For bugs without reproduction, adds needs reproduction label
  4. For possible regressions, adds possible regression label
  5. Translates non-English issues (optional)
  6. Transfers spam to dedicated repository (optional)

Comment Analysis (triage-comment.yml)

  1. Checks if comment provides reproduction for needs reproduction issues
  2. For closed issues, analyzes if new evidence warrants reopening
  3. Removes needs reproduction when valid reproduction is provided
  4. Reopens issues when regression or new evidence is found

Issue Edited (triage-edited.yml)

  1. Only runs on issues with needs reproduction label
  2. Checks if edited content now includes reproduction
  3. Removes label and reopens issue if applicable

Spam Transfer (triage-spam-transfer.yml)

  1. Triggers when spam label is added
  2. Transfers issue to dedicated spam repository
  3. Keeps main repository clean

Getting the Spam Repository Node ID

To find a repository's Node ID for spam transfers:

gh api graphql -f query=' query { repository(owner: "nuxt", name: "spam") { id } }'

Version Pinning

For production use, pin to a specific commit or tag:

uses: nuxt/.github/.github/workflows/triage-opened.yml@v1.0.0# oruses: nuxt/.github/.github/workflows/triage-opened.yml@abc1234

About

Default community health files for nuxt repositories

Resources

Code of conduct

Contributing

Security policy

Stars

6 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages