@@ -22,11 +22,15 @@ permissions: {}
2222
2323on :
2424 pull_request :
25- types : [labeled, unlabeled, closed]
25+ # labeled -> first announce; synchronize -> re-announce each new commit (re-review on push);
26+ # unlabeled/closed -> resolve (de-announce). A synchronize on an unlabelled PR is ignored by the if.
27+ types : [labeled, synchronize, unlabeled, closed]
2628
2729jobs :
2830 announce :
29- if : github.event.action == 'labeled' && github.event.label.name == 'Agent Review Requested'
31+ if : >-
32+ (github.event.action == 'labeled' && github.event.label.name == 'Agent Review Requested') ||
33+ (github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'Agent Review Requested'))
3034 runs-on : ubuntu-latest
3135 steps :
3236 - name : Announce to the crier
3741 REPO : ${{ github.repository }}
3842 TITLE : ${{ github.event.pull_request.title }}
3943 REQUESTER : ${{ github.event.pull_request.user.login }}
44+ # The head SHA is the change detector: a re-announce with the same head is a no-op on the
45+ # bus; a new head reopens the thread for a fresh review round.
46+ HEAD_OID : ${{ github.event.pull_request.head.sha }}
4047 run : |
4148 # Missing provisioning is a config error — fail LOUD so it can't pass silently.
4249 if [ -z "$CRIER_URL" ] || [ -z "$CRIER_TOKEN" ]; then
5360 --arg repo "$REPO" \
5461 --arg title "$TITLE" \
5562 --arg requester "$REQUESTER" \
56- '{pr_url:$pr, repo:$repo, title:$title, requester:$requester}')" \
63+ --arg head_oid "$HEAD_OID" \
64+ '{pr_url:$pr, repo:$repo, title:$title, requester:$requester, head_oid:$head_oid}')" \
5765 || echo "::warning::town-crier announce failed (transient bus issue?) — not blocking the PR"
5866
5967 resolve :
0 commit comments