Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/review-reviewers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ jobs:
# legs find an existing issue instead of racing to create one. Without this,
# the first cron tick of each new month produced N-1 duplicate tracking
# issues (one per matrix leg that lost the find-or-create race).
#
# This is an optimisation, not a precondition: the skill still carries its own
# find-or-create fallback, so the matrix runs even when this job doesn't
# complete (see `if:` on the matrix job below).
init-tracking:
runs-on: ubuntu-24.04
environment:
Expand Down Expand Up @@ -47,6 +51,11 @@ jobs:

review-reviewers:
needs: init-tracking
# Run even when init-tracking failed or never got a runner — losing the
# race guard costs up to N-1 duplicate tracking issues on the first tick of
# a month, while gating on it costs the whole analysis window for every
# target repo. Not `always()`: a user cancelling the run should stop here.
Comment thread
tend-agent marked this conversation as resolved.
if: ${{ !cancelled() }}
strategy:
fail-fast: false
matrix:
Expand Down
2 changes: 1 addition & 1 deletion plugins/tend-ci-runner/skills/review-reviewers/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ GIST_DESC="review-reviewers evidence: $TARGET $MONTH"

The tracking issue lives on tend (the current repo). It indexes gists via one comment per new gist — no per-run comments, no body edits.

The workflow's `init-tracking` job runs before the matrix and creates the monthly tracking issue if absent, so matrix legs always find an existing one. The find-or-create logic below remains the fallback for ad-hoc invocations and as a safety net; sort lowest-numbered first in case a race ever does produce duplicates. `gh issue create` prints the new issue's URL; parse the number from its basename.
The workflow's `init-tracking` job runs before the matrix and creates the monthly tracking issue if absent, so on a normal tick matrix legs find an existing one. It is not a precondition — the matrix runs even when that job fails or never gets a runner, so the find-or-create logic below is a live code path on the first tick of a month, not only a fallback for ad-hoc invocations. Sort lowest-numbered first so a lost race degrades to a duplicate rather than a crash. `gh issue create` prints the new issue's URL; parse the number from its basename.

```bash
TRACKING_NUMBER=$(gh issue list --state open --label "$TRACKING_LABEL" \
Expand Down
Loading