Browse Source
chore(deps): bump webfactory/ssh-agent from 0.9.0 to 0.10.0 (#4910) Bumps [webfactory/ssh-agent](https://github.com/webfactory/ssh-agent) from 0.9.0 to 0.10.0. - [Release notes](https://github.com/webfactory/ssh-agent/releases) - [Changelog](https://github.com/webfactory/ssh-agent/blob/master/CHANGELOG.md) - [Commits](https://github.com/webfactory/ssh-agent/compare/v0.9.0...v0.10.0) --- updated-dependencies: - dependency-name: webfactory/ssh-agent dependency-version: 0.10.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> chore(deps): bump dessant/lock-threads from 5 to 6 (#4909) Bumps [dessant/lock-threads](https://github.com/dessant/lock-threads) from 5 to 6. - [Release notes](https://github.com/dessant/lock-threads/releases) - [Changelog](https://github.com/dessant/lock-threads/blob/main/CHANGELOG.md) - [Commits](https://github.com/dessant/lock-threads/compare/v5...v6) --- updated-dependencies: - dependency-name: dessant/lock-threads dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> feat: sync GitHub issue types with `type:` labels feat: enable manual backfill for issue labels This change introduces a `workflow_dispatch` triggered job that allows for manually re-evaluating and applying labels to existing issues. The new job iterates through a specified set of issues (filtered by state and an optional limit), adds a temporary `maintenance: relabel-backfill` label, and immediately removes it. The primary `labeling-issues` workflow is updated to specifically *not* ignore these bot-generated label events when the temporary label is involved, thus forcing a re-evaluation of the issue by the current labeling logic. This provides a mechanism to correct mislabeled issues or apply updated labeling rules to the entire issue backlog. feat: enhance relabel backfill with detailed summary and update github-script This change significantly improves the observability of the manual issue relabel backfill workflow by introducing: - Detailed console logging for each issue being processed. - A comprehensive `core.summary` output in the workflow run, providing tables for overall statistics, processed issues, and any encountered failures. Additionally, the `actions/github-script` action is updated to v8. chore: make issue type inference more robust by respecting existing labels Previously, the automated issue type inference relied solely on the issue title. This could result in valid `type:` labels being removed if the title was ambiguous or didn't explicitly match a predefined pattern. This change introduces a fallback mechanism where existing `type:` labels are considered if a type cannot be clearly inferred from the title. This reduces unnecessary label churn and improves the accuracy of automated labeling. fix: backfill runs triage inline instead of label-toggle GitHub does not fire new workflow runs when GITHUB_TOKEN creates label events (built-in loop prevention). Replace the label-toggle backfill approach with an inline version that mirrors the deterministic reconciliation logic from issue-ai-maintenance directly: type labels, command/distro labels, game/engine labels, Issue Type GraphQL sync, and tmux false-positive cleanup. No AI call is made during backfill. Also removes the now-unnecessary BACKFILL_TRIGGER_LABEL exemption from the bot-loop guard in issue-ai-maintenance. fix: track issue type + locked state in backfill summary - Add 'Issue Type set' column to processed issues summary table - Track issueTypeSet per issue (null when already correct/unchanged) - Skip REST label mutations for locked issues (they return 403) with a console note; Issue Type GraphQL sync still runs for locked issues - Show lock emoji in issue number column when issue is locked - Track actual applied add/remove counts (not desired counts) fix: allow backfill label updates on locked issues Remove locked-issue skip branch in backfill so label add/remove operations run for locked issues as well. Keep lock marker in summary for visibility. fix: keep legacy server request issues classified correctly Recognize 'server request' anywhere in issue titles (e.g. '[callofduty1] Server Request') and prefer type: game server request over generic feature when both labels exist. Apply this in both issue-ai-maintenance and backfill logic. fix: classify legacy server-request titles in backfill and maintenance Detect legacy server-request phrasing in issue titles: - bracketed game/server titles ending with 'Creation' - titles containing 'Server Creation' - titles containing 'Server Support' or 'Support for ... server' Apply the same heuristics in both issue-ai-maintenance and backfill inferTypeFromTitle paths so old issues are not downgraded to feature. feat: infer game labels from legacy issue text in relabel When no structured Game form section is present, infer game labels/scripts deterministically from title/body using serverlist alias mappings. Apply this to both issue-ai-maintenance and backfill to improve historical game labeling without relying on AI. feat: add optional AI fallback for backfill game detection Add workflow_dispatch input ai_game_fallback (default false). In backfill mode, only call AI when deterministic game mapping finds no match; accept only high-confidence results and map through known game aliases/labels. Include AI usage stats in the run summary table. fix: avoid pruning legacy game labels without structured game input Only remove existing game:* labels when an issue has explicit structured Game form selections. For legacy title/body inference (and AI fallback), add matched game labels but do not remove other existing game labels. This prevents edge cases like issue #1 from losing valid multi-game tags. fix: require alias evidence for AI game fallback labels Backfill AI game fallback now accepts a detected game only when the issue text contains a literal alias token for the mapped game label. Add explicit logs for AI accept/reject/unmapped outcomes to make attribution auditable in job logs and prevent false positives like issue #17. feat: annotate game label adds with detection source in backfill logs Each game label add now shows its source in the per-issue log line: #240: added "game: Opposing Force" (text-match) #248: added "game: Counter-Strike: Global Offensive" (form-field) #N: added "game: X" (ai-fallback) Non-game labels (engine, type, needs, etc.) are unchanged. fix: add missing hasAliasHitForLabel to backfill script context Each github-script step runs in its own isolated JS context. The backfill step was calling hasAliasHitForLabel (used by the AI alias-evidence gate) but the function was only defined in the triage step, causing a ReferenceError on any issue that triggered AI fallback. fix: retry AI fallback once on HTTP 429 with Retry-After backoff When the GitHub Models API rate-limits the backfill (429), read the Retry-After header (capped at 60s), wait, then retry the request once. If the retry also fails the issue is skipped as before. fix: accept joined-token alias evidence in AI game fallback gate Alias evidence now allows multi-token aliases to match when words are joined in issue text (e.g. counterstrike vs counter strike), while keeping exact token checks for single-word aliases. fix: treat generic AI detections as non-game in backfill When AI fallback returns generic platform/engine terms (e.g. srcds, source dedicated server, steamcmd), treat them as non-game detections instead of logging them as unmapped games. Also prompt the model to return null for generic terms. chore: log AI rate-limit headers and 429 count in backfill Capture Retry-After, X-RateLimit-* and request id on 429 responses, log them on retry and final skip, and include total AI 429 hits in the workflow summary table. fix: disable AI fallback for run on long Retry-After cooldown When GitHub Models returns 429 with a large Retry-After (over 300s), stop AI fallback for the remainder of the backfill run instead of sleeping and retrying per issue. Include disable reason in summary. fix: prevent overlapping game alias double-matches in text detection Prefer longest non-overlapping alias matches so titles like "Killing Floor 2" do not also infer "Killing Floor" unless both are explicitly present as separate mentions. fix: prune stale broad game labels when specific game is inferred For legacy issues without structured game selection, remove existing game labels only when they are broader overlaps of a newly inferred specific game label (e.g. remove Killing Floor when Killing Floor 2 is inferred). fix: stop relabel backfill early when API rate limit is hit Detect GitHub API rate limit errors during processing, stop the run gracefully, and report header-derived rate limit details in logs and summary instead of emitting repeated per-issue failures.pull/4911/head
22 changed files with 2369 additions and 322 deletions
@ -0,0 +1,29 @@ |
|||||
|
--- |
||||
|
title: "LinuxGSM PR Review Guidance" |
||||
|
applyTo: "**" |
||||
|
description: "Use when reviewing pull requests in LinuxGSM; prioritize regressions, behavior changes, shell safety, and missing tests over style-only feedback." |
||||
|
--- |
||||
|
|
||||
|
Focus review effort on correctness and operational safety first. |
||||
|
|
||||
|
Primary priorities: |
||||
|
|
||||
|
- Identify behavior regressions and compatibility risks. |
||||
|
- Flag unsafe shell patterns (`rm -rf`, unquoted vars, unchecked command failures). |
||||
|
- Verify workflow changes do not weaken permissions or secret handling. |
||||
|
- Check for missing tests/validation when logic changes. |
||||
|
- Confirm labels, templates, and automation rules stay internally consistent. |
||||
|
|
||||
|
Feedback expectations: |
||||
|
|
||||
|
- Give concrete, actionable findings with file and reason. |
||||
|
- Prefer high-signal issues over style nits. |
||||
|
- If no defects are found, state that clearly and mention residual risk areas. |
||||
|
- Suggest minimal, low-risk fixes before proposing broad refactors. |
||||
|
|
||||
|
LinuxGSM-specific checks: |
||||
|
|
||||
|
- Shell scripts should preserve robust defaults (`set -euo pipefail` where appropriate). |
||||
|
- Label/workflow updates should avoid duplicate or stale taxonomy. |
||||
|
- Automation should fail safe (log and continue for advisory AI; block on true CI errors). |
||||
|
- Keep issue/PR automation rules aligned with templates and existing labels. |
||||
@ -0,0 +1,87 @@ |
|||||
|
#!/usr/bin/env bash |
||||
|
# sync-game-labels.sh |
||||
|
# Reads lgsm/data/serverlist.csv and ensures a "game: <name>" label exists in |
||||
|
# the GitHub repo for every unique game name. Safe to run multiple times. |
||||
|
# |
||||
|
# Requires: gh CLI authenticated with issues:write scope. |
||||
|
# Usage: .github/scripts/sync-game-labels.sh [OWNER/REPO] |
||||
|
# |
||||
|
# The OWNER/REPO argument is optional; if omitted gh uses the current repo. |
||||
|
|
||||
|
set -euo pipefail |
||||
|
|
||||
|
REPO="${1:-}" |
||||
|
SERVERLIST="lgsm/data/serverlist.csv" |
||||
|
LABEL_COLOR="5b21b6" |
||||
|
LABEL_PREFIX="game: " |
||||
|
|
||||
|
normalize_label() { |
||||
|
printf '%s' "$1" | tr '[:upper:]' '[:lower:]' |
||||
|
} |
||||
|
|
||||
|
if [[ ! -f "${SERVERLIST}" ]]; then |
||||
|
echo "ERROR: ${SERVERLIST} not found. Run from the repository root." |
||||
|
exit 1 |
||||
|
fi |
||||
|
|
||||
|
declare -A EXISTING_COLORS=() |
||||
|
declare -A EXISTING_DESCRIPTIONS=() |
||||
|
declare -A EXISTING_NAMES=() |
||||
|
|
||||
|
# Fetch all existing game label metadata once (up to 1000) and cache locally. |
||||
|
echo "Fetching existing labels..." |
||||
|
while IFS=$'\t' read -r NAME COLOR DESCRIPTION; do |
||||
|
[[ -n "${NAME}" ]] || continue |
||||
|
EXISTING_COLORS["${NAME}"]="${COLOR}" |
||||
|
EXISTING_DESCRIPTIONS["${NAME}"]="${DESCRIPTION}" |
||||
|
EXISTING_NAMES["$(normalize_label "${NAME}")"]="${NAME}" |
||||
|
done < <( |
||||
|
gh label list --limit 1000 --json name,color,description ${REPO:+--repo "$REPO"} \ |
||||
|
| jq -r '.[] | select(.name | startswith("game: ")) | [.name, .color, (.description // "")] | @tsv' |
||||
|
) |
||||
|
|
||||
|
# Parse unique game names from the CSV (column 3, skip header). |
||||
|
mapfile -t GAMES < <( |
||||
|
tail -n +2 "${SERVERLIST}" \ |
||||
|
| cut -d',' -f3 \ |
||||
|
| sort -u |
||||
|
) |
||||
|
|
||||
|
CREATED=0 |
||||
|
UPDATED=0 |
||||
|
UNCHANGED=0 |
||||
|
|
||||
|
for GAME in "${GAMES[@]}"; do |
||||
|
LABEL="${LABEL_PREFIX}${GAME}" |
||||
|
DESCRIPTION="Issues related to ${GAME}" |
||||
|
NORMALIZED_LABEL="$(normalize_label "${LABEL}")" |
||||
|
|
||||
|
if [[ -v EXISTING_NAMES["${NORMALIZED_LABEL}"] ]]; then |
||||
|
CURRENT_LABEL="${EXISTING_NAMES["${NORMALIZED_LABEL}"]}" |
||||
|
CURRENT_COLOR="${EXISTING_COLORS["${CURRENT_LABEL}"]}" |
||||
|
CURRENT_DESCRIPTION="${EXISTING_DESCRIPTIONS["${CURRENT_LABEL}"]}" |
||||
|
|
||||
|
if [[ "${CURRENT_LABEL}" != "${LABEL}" || "${CURRENT_COLOR}" != "${LABEL_COLOR}" || "${CURRENT_DESCRIPTION}" != "${DESCRIPTION}" ]]; then |
||||
|
echo " update ${LABEL}" |
||||
|
gh label edit "${CURRENT_LABEL}" \ |
||||
|
--name "${LABEL}" \ |
||||
|
--color "${LABEL_COLOR}" \ |
||||
|
--description "${DESCRIPTION}" \ |
||||
|
${REPO:+--repo "$REPO"} |
||||
|
((UPDATED++)) || true |
||||
|
else |
||||
|
echo " ok ${LABEL}" |
||||
|
((UNCHANGED++)) || true |
||||
|
fi |
||||
|
else |
||||
|
echo " create ${LABEL}" |
||||
|
gh label create "${LABEL}" \ |
||||
|
--color "${LABEL_COLOR}" \ |
||||
|
--description "${DESCRIPTION}" \ |
||||
|
${REPO:+--repo "$REPO"} |
||||
|
((CREATED++)) || true |
||||
|
fi |
||||
|
done |
||||
|
|
||||
|
echo "" |
||||
|
echo "Done. Created: ${CREATED} Updated: ${UPDATED} Unchanged: ${UNCHANGED}" |
||||
@ -1,29 +0,0 @@ |
|||||
name: Update copyright year(s) in license file |
|
||||
|
|
||||
on: |
|
||||
workflow_dispatch: |
|
||||
schedule: |
|
||||
- cron: "0 3 1 1 *" # 03:00 AM on January 1 |
|
||||
|
|
||||
permissions: |
|
||||
contents: write |
|
||||
|
|
||||
jobs: |
|
||||
update-license-year: |
|
||||
runs-on: ubuntu-latest |
|
||||
steps: |
|
||||
- name: Checkout |
|
||||
uses: actions/checkout@v6 |
|
||||
with: |
|
||||
fetch-depth: 0 |
|
||||
persist-credentials: false |
|
||||
- name: Action Update License Year |
|
||||
uses: FantasticFiasco/action-update-license-year@v3 |
|
||||
with: |
|
||||
token: ${{ secrets.GITHUB_TOKEN }} |
|
||||
path: LICENSE.md |
|
||||
- name: Merge pull request |
|
||||
env: |
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
|
||||
run: | |
|
||||
gh pr merge --merge --delete-branch |
|
||||
File diff suppressed because it is too large
@ -1,27 +0,0 @@ |
|||||
name: Potential Duplicates |
|
||||
on: |
|
||||
issues: |
|
||||
types: |
|
||||
- opened |
|
||||
|
|
||||
permissions: |
|
||||
issues: write |
|
||||
|
|
||||
jobs: |
|
||||
potential-duplicates: |
|
||||
if: github.repository_owner == 'GameServerManagers' |
|
||||
runs-on: ubuntu-latest |
|
||||
steps: |
|
||||
- name: Potential Duplicates |
|
||||
uses: wow-actions/potential-duplicates@v1 |
|
||||
with: |
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
|
||||
filter: "" |
|
||||
exclude: "" |
|
||||
label: potential-duplicate |
|
||||
state: all |
|
||||
threshold: 0.8 |
|
||||
comment: > |
|
||||
Potential duplicates: {{#issues}} |
|
||||
- [#{{ number }}] {{ title }} ({{ accuracy }}%) |
|
||||
{{/issues}} |
|
||||
@ -0,0 +1,28 @@ |
|||||
|
name: Sync Game Labels |
||||
|
on: |
||||
|
push: |
||||
|
branches: |
||||
|
- master |
||||
|
- develop |
||||
|
paths: |
||||
|
- "lgsm/data/serverlist.csv" |
||||
|
workflow_dispatch: {} |
||||
|
|
||||
|
permissions: |
||||
|
issues: write |
||||
|
contents: read |
||||
|
|
||||
|
jobs: |
||||
|
sync-game-labels: |
||||
|
if: github.repository_owner == 'GameServerManagers' |
||||
|
runs-on: ubuntu-latest |
||||
|
steps: |
||||
|
- name: Checkout |
||||
|
uses: actions/checkout@v5 |
||||
|
|
||||
|
- name: Sync game labels from serverlist |
||||
|
env: |
||||
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
||||
|
run: | |
||||
|
chmod +x .github/scripts/sync-game-labels.sh |
||||
|
.github/scripts/sync-game-labels.sh |
||||
Loading…
Reference in new issue