diff --git a/.github/workflows/sdlc-hitl.yml b/.github/workflows/sdlc-hitl.yml new file mode 100644 index 0000000000..7c9914704d --- /dev/null +++ b/.github/workflows/sdlc-hitl.yml @@ -0,0 +1,520 @@ +name: "egg: SDLC HITL Decision Handler" + +# This workflow handles Human-In-The-Loop (HITL) decisions for the SDLC pipeline. +# It triggers when issue comments are edited (checkbox state changes) and +# updates the contract state accordingly. +# +# The workflow implements a 30-second debounce to prevent rapid-fire updates +# when humans check/uncheck multiple boxes in quick succession. + +on: + issue_comment: + types: [edited] + +permissions: + contents: write + issues: write + +# Prevent concurrent HITL runs for the same issue +concurrency: + group: sdlc-hitl-${{ github.event.issue.number }} + cancel-in-progress: false + +jobs: + handle-decision: + name: Handle HITL decision + runs-on: ubuntu-latest + # Only trigger on comments that contain HITL decision markers + # Authorization: Only jwbron can trigger HITL decisions, and bot cannot trigger itself + if: >- + contains(github.event.comment.body, ' + DECISION_ID=$(echo "$COMMENT_BODY" | grep -oP '