Skip to content

Instantly share code, notes, and snippets.

View fiallalvert2007's full-sized avatar

fiallalvert2007

View GitHub Profile
@fiallalvert2007
fiallalvert2007 / labeling_script.py
Created April 23, 2026 02:20
Script to automatically label issues based on keywords in the title.
#!/usr/bin/env python3
import sys
owner = "{owner}"
repo = "{repo_name}"
issue_number = int(sys.argv[1])
# Fetch the issue to examine its title and body
issue = call_tool('github', 'get_issue', {'owner': owner, 'repo': repo, 'issue_number': issue_number})
if isinstance(issue, dict) and issue.get('result'):
title = issue['result'].get('title', '').lower()
# Apply bug label if the word 'error' appears