Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8eb0265e75 | ||
|
|
3664ce858d | ||
|
|
f542d4e1cd | ||
|
|
b6a33dc218 | ||
|
|
ed9e946cd1 |
@@ -45,7 +45,7 @@ on:
|
|||||||
# Owner-set user-scope variables (see README "Central config via variables"):
|
# Owner-set user-scope variables (see README "Central config via variables"):
|
||||||
# GADFLY_DEFAULT_MODELS, GADFLY_DEFAULT_SPECIALISTS,
|
# GADFLY_DEFAULT_MODELS, GADFLY_DEFAULT_SPECIALISTS,
|
||||||
# GADFLY_DEFAULT_PROVIDER_CONCURRENCY, GADFLY_DEFAULT_PROVIDER_LENS_CONCURRENCY,
|
# GADFLY_DEFAULT_PROVIDER_CONCURRENCY, GADFLY_DEFAULT_PROVIDER_LENS_CONCURRENCY,
|
||||||
# GADFLY_ENDPOINT_RAGNAROS (the 4090 Ti endpoint).
|
# GADFLY_ENDPOINT_NETHERSTORM (the local GPU box endpoint).
|
||||||
# An unset variable + no input → the image default (one model, default suite),
|
# An unset variable + no input → the image default (one model, default suite),
|
||||||
# so a public consumer with neither still gets a sane minimal review.
|
# so a public consumer with neither still gets a sane minimal review.
|
||||||
inputs:
|
inputs:
|
||||||
@@ -59,6 +59,11 @@ on:
|
|||||||
max_steps: { type: string, default: "14" } # GADFLY_MAX_STEPS
|
max_steps: { type: string, default: "14" } # GADFLY_MAX_STEPS
|
||||||
worker_model: { type: string, default: "" } # GADFLY_WORKER_MODEL
|
worker_model: { type: string, default: "" } # GADFLY_WORKER_MODEL
|
||||||
allowed_users: { type: string, default: "" } # GADFLY_ALLOWED_USERS (consumer-specific; set in your stub)
|
allowed_users: { type: string, default: "" } # GADFLY_ALLOWED_USERS (consumer-specific; set in your stub)
|
||||||
|
# Gitea >= 1.27 does not propagate the CALLER's workflow_dispatch inputs into a
|
||||||
|
# called workflow's github.event, so a manual "review PR #N" dispatch arrived
|
||||||
|
# here with an empty PR and died at the entrypoint's "PR required" check. The
|
||||||
|
# caller stub must thread it explicitly: `pr_number: ${{ github.event.inputs.pr_number }}`.
|
||||||
|
pr_number: { type: string, default: "" }
|
||||||
trigger_phrase: { type: string, default: "" } # GADFLY_TRIGGER_PHRASE
|
trigger_phrase: { type: string, default: "" } # GADFLY_TRIGGER_PHRASE
|
||||||
consolidate: { type: string, default: "" } # GADFLY_CONSOLIDATE — "" => auto (one consensus comment for >=2 models); "0" => one comment per model
|
consolidate: { type: string, default: "" } # GADFLY_CONSOLIDATE — "" => auto (one consensus comment for >=2 models); "0" => one comment per model
|
||||||
inline_review: { type: string, default: "" } # GADFLY_INLINE_REVIEW — "" => on (post a COMMENT-state PR review with inline comments on changed lines); "0" => off
|
inline_review: { type: string, default: "" } # GADFLY_INLINE_REVIEW — "" => on (post a COMMENT-state PR review with inline comments on changed lines); "0" => off
|
||||||
@@ -94,7 +99,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: ${{ inputs.timeout_minutes }}
|
timeout-minutes: ${{ inputs.timeout_minutes }}
|
||||||
steps:
|
steps:
|
||||||
- uses: docker://gitea.stevedudenhoeffer.com/steve/gadfly:sha-3095ebf
|
- uses: docker://gitea.stevedudenhoeffer.com/steve/gadfly:sha-ed9e946
|
||||||
env:
|
env:
|
||||||
# --- event context (from the CALLER's github.*) -------------------
|
# --- event context (from the CALLER's github.*) -------------------
|
||||||
GITEA_API: ${{ github.server_url }}/api/v1/repos/${{ github.repository }}
|
GITEA_API: ${{ github.server_url }}/api/v1/repos/${{ github.repository }}
|
||||||
@@ -104,7 +109,7 @@ jobs:
|
|||||||
# forwarding, since the auto token isn't a forwarded workflow_call secret.
|
# forwarding, since the auto token isn't a forwarded workflow_call secret.
|
||||||
GITEA_TOKEN: ${{ github.token }}
|
GITEA_TOKEN: ${{ github.token }}
|
||||||
EVENT_NAME: ${{ github.event_name }}
|
EVENT_NAME: ${{ github.event_name }}
|
||||||
PR: ${{ github.event.pull_request.number || github.event.issue.number || github.event.inputs.pr_number }}
|
PR: ${{ github.event.pull_request.number || github.event.issue.number || github.event.inputs.pr_number || inputs.pr_number }}
|
||||||
PR_BRANCH: ${{ github.head_ref }}
|
PR_BRANCH: ${{ github.head_ref }}
|
||||||
IS_DRAFT: ${{ github.event.pull_request.draft }}
|
IS_DRAFT: ${{ github.event.pull_request.draft }}
|
||||||
COMMENT_BODY: ${{ github.event.comment.body }}
|
COMMENT_BODY: ${{ github.event.comment.body }}
|
||||||
@@ -124,12 +129,14 @@ jobs:
|
|||||||
# token, keep that one a secret instead.
|
# token, keep that one a secret instead.
|
||||||
GADFLY_ENDPOINT_M1: ${{ vars.GADFLY_ENDPOINT_M1 }}
|
GADFLY_ENDPOINT_M1: ${{ vars.GADFLY_ENDPOINT_M1 }}
|
||||||
GADFLY_ENDPOINT_M5: ${{ vars.GADFLY_ENDPOINT_M5 }}
|
GADFLY_ENDPOINT_M5: ${{ vars.GADFLY_ENDPOINT_M5 }}
|
||||||
# ragnaros = the 4090 Ti via its llama-swap proxy. Defined in the user
|
# netherstorm = the local GPU box via its llama-swap proxy. Defined in the
|
||||||
# var GADFLY_ENDPOINT_RAGNAROS (format "<provider>|<base-url>[|<key>]")
|
# user var GADFLY_ENDPOINT_NETHERSTORM (format "<provider>|<base-url>[|<key>]",
|
||||||
# so the URL can change without editing this file; the matching model is
|
# e.g. "llamaswap|https://llama-swap.netherstorm...") so the URL can change
|
||||||
# ragnaros/qwen3.6-27b in GADFLY_DEFAULT_MODELS. NB: use the un-hyphenated
|
# without editing this file; the matching model is netherstorm/qwen3.6-27b in
|
||||||
# `llamaswap` provider spelling in the var — the pinned image needs it.
|
# GADFLY_DEFAULT_MODELS. NB: use the un-hyphenated `llamaswap` provider
|
||||||
GADFLY_ENDPOINT_RAGNAROS: ${{ vars.GADFLY_ENDPOINT_RAGNAROS }}
|
# spelling in the var — the pinned image needs it. Without this line the var
|
||||||
|
# is silently dropped at the workflow_call boundary ('unknown provider').
|
||||||
|
GADFLY_ENDPOINT_NETHERSTORM: ${{ vars.GADFLY_ENDPOINT_NETHERSTORM }}
|
||||||
# --- findings telemetry (optional) --------------------------------
|
# --- findings telemetry (optional) --------------------------------
|
||||||
GADFLY_FINDINGS_URL: ${{ secrets.GADFLY_FINDINGS_URL }}
|
GADFLY_FINDINGS_URL: ${{ secrets.GADFLY_FINDINGS_URL }}
|
||||||
GADFLY_FINDINGS_TOKEN: ${{ secrets.GADFLY_FINDINGS_TOKEN }}
|
GADFLY_FINDINGS_TOKEN: ${{ secrets.GADFLY_FINDINGS_TOKEN }}
|
||||||
|
|||||||
@@ -110,6 +110,26 @@ actor_allowed() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# --- trigger gating --------------------------------------------------------
|
# --- trigger gating --------------------------------------------------------
|
||||||
|
# Gitea >= 1.27 (breaking change go-gitea#37478, "improve support for reusable
|
||||||
|
# workflows") runs a CALLED workflow with github.event_name = 'workflow_call'
|
||||||
|
# instead of propagating the caller's event, so every consumer stub's trigger
|
||||||
|
# arrived here as an unhandled event and the review silently self-skipped
|
||||||
|
# (observed 2026-07-14: mort PRs #1445-#1447 got 1-second "success" runs).
|
||||||
|
# Reclassify from the forwarded event payload: a comment body can only come
|
||||||
|
# from issue_comment (its trigger-phrase + actor gates still apply below);
|
||||||
|
# otherwise a PR number means a pull_request-shaped trigger (this also covers
|
||||||
|
# dispatch-through-reusable, whose pr_number input populates PR — the draft
|
||||||
|
# check degrades safely since IS_DRAFT defaults false). Neither → fall through
|
||||||
|
# to the unhandled-event skip. Pre-1.27 servers still send the caller's event
|
||||||
|
# name and never enter this branch.
|
||||||
|
if [ "${EVENT_NAME:-}" = "workflow_call" ]; then
|
||||||
|
if [ -n "${COMMENT_BODY:-}" ]; then
|
||||||
|
EVENT_NAME="issue_comment"
|
||||||
|
elif [ -n "${PR:-}" ]; then
|
||||||
|
EVENT_NAME="pull_request"
|
||||||
|
fi
|
||||||
|
log "caller event arrived as 'workflow_call'; reclassified to '${EVENT_NAME}'"
|
||||||
|
fi
|
||||||
case "$EVENT_NAME" in
|
case "$EVENT_NAME" in
|
||||||
workflow_dispatch)
|
workflow_dispatch)
|
||||||
log "manual dispatch for PR #${PR}" ;;
|
log "manual dispatch for PR #${PR}" ;;
|
||||||
|
|||||||
Reference in New Issue
Block a user