Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
chore: update tend workflows (0.3.4 → 0.3.5) (#4324)
Worktrunk Bote9bfc368f4ce
diff --git a/.github/workflows/tend-ci-fix.yaml b/.github/workflows/tend-ci-fix.yamlindex a8381ffa8..07586d647 100644--- a/.github/workflows/tend-ci-fix.yaml+++ b/.github/workflows/tend-ci-fix.yaml@@ -1,4 +1,4 @@-# Generated by tend 0.3.4. Regenerate with: uvx tend@latest init+# Generated by tend 0.3.5. Regenerate with: uvx tend@latest init## Do not edit this file directly — it will be overwritten on regeneration.# To change this workflow, edit .config/tend.yaml. To change what the agent@@ -45,7 +45,7 @@ jobs:- uses: ./.github/actions/tend-setup- run: for t in cargo-insta cargo-nextest pre-commit nu nix; do command -v "$t" >/dev/null || { echo "::error::tend setup is missing $t; see Sandbox toolchain in .github/AGENTS.md"; exit 1; }; done- - uses: max-sixty/tend/[email protected]+ - uses: max-sixty/tend/[email protected]with:github_token: ${{ secrets.TEND_BOT_TOKEN }}merge: restricteddiff --git a/.github/workflows/tend-mention-relay.yaml b/.github/workflows/tend-mention-relay.yamlindex 372fb2374..5b7c44c58 100644--- a/.github/workflows/tend-mention-relay.yaml+++ b/.github/workflows/tend-mention-relay.yaml@@ -1,4 +1,4 @@-# Generated by tend 0.3.4. Regenerate with: uvx tend@latest init+# Generated by tend 0.3.5. Regenerate with: uvx tend@latest init## Do not edit this file directly — it will be overwritten on regeneration.# To change this workflow, edit .config/tend.yaml. To change what the agent@@ -43,12 +43,12 @@ jobs:# Widening this is a separate decision, and moot while a fork run's token# is refused the dispatch POST (403, probed).#- # The pause variable is deliberately absent: it gates the jobs that boot- # the agent, and this job boots none. `TEND_ENABLED=false` skips- # tend-mention's `verify` — and `handle`, which needs it — so a relayed- # event reaches nothing. A paused repo still runs this job and still POSTs- # the dispatch; both runs then do nothing.- if: github.event.pull_request.head.repo.full_name == github.repository+ # This job boots no agent, but it carries the pause check anyway: a paused+ # repo's tend-mention skips everything it would dispatch, so running it+ # would only spend a runner, the dispatch POST, and a second empty run.+ if: >-+ vars.TEND_ENABLED != 'false' &&+ github.event.pull_request.head.repo.full_name == github.repositoryruns-on: ubuntu-24.04# No secrets here. `contents: write` is what the dispatch POST needs, and# is the whole of what this token can do — probed both ways on a live@@ -62,15 +62,19 @@ jobs:permissions:contents: writesteps:- # Identifiers only: `verify` re-reads the review or comment from the+ # The review or comment travels as identifiers: `verify` re-reads it from the# API, so the words the bot weighs and acts on are the ones GitHub# holds, and a forged dispatch faces the same scrutiny as a relayed one.+ # The PR title names the tend-mention run and nothing else: the+ # notifications poll matches a live run to its subject by that name.- name: Re-enter on an admitted refenv:GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}+ PR_TITLE: ${{ github.event.pull_request.title }}run: |gh api "repos/$GITHUB_REPOSITORY/dispatches" \-f event_type=tend-mention-review \-f "client_payload[kind]=${{ github.event_name }}" \-f "client_payload[pr]=${{ github.event.pull_request.number }}" \- -f "client_payload[id]=${{ github.event.review.id || github.event.comment.id }}"+ -f "client_payload[id]=${{ github.event.review.id || github.event.comment.id }}" \+ -f "client_payload[title]=$PR_TITLE"diff --git a/.github/workflows/tend-mention.yaml b/.github/workflows/tend-mention.yamlindex 67bf8cc8f..994059c3a 100644--- a/.github/workflows/tend-mention.yaml+++ b/.github/workflows/tend-mention.yaml@@ -1,4 +1,4 @@-# Generated by tend 0.3.4. Regenerate with: uvx tend@latest init+# Generated by tend 0.3.5. Regenerate with: uvx tend@latest init## Do not edit this file directly — it will be overwritten on regeneration.# To change this workflow, edit .config/tend.yaml. To change what the agent@@ -8,6 +8,10 @@# happen upstream in the tend-ci-runner plugin.name: tend-mention+# A relayed review's run would otherwise be named for its event type. Named+# for the PR, like every other run, the notifications poll can see it holds+# that PR.+run-name: ${{ github.event.client_payload.title || github.event.issue.title }}on:issues:types: [edited]@@ -55,7 +59,7 @@ jobs:env:UV_NO_MODIFY_PATH: "1"with:- version: "0.12.17"+ version: "0.12.19"enable-cache: falseignore-empty-workdir: true- name: Verify bot engagement@@ -102,20 +106,11 @@ jobs:def gh_paginated(path: str) -> list[dict[str, Any]]:- text = gh("api", "--paginate", path)- decoder = json.JSONDecoder()- position = 0- items: list[dict[str, Any]] = []- while position < len(text):- while position < len(text) and text[position].isspace():- position += 1- if position == len(text):- break- page, position = decoder.raw_decode(text, position)- if not isinstance(page, list):- raise TypeError("paginated GitHub response was not an array")- items.extend(page)- return items+ # `--slurp` prints one array holding every page.+ pages = gh_json("api", "--paginate", "--slurp", path)+ if not all(isinstance(page, list) for page in pages):+ raise TypeError("paginated GitHub response was not an array")+ return [item for page in pages for item in page]def actor_login(actor: object) -> str:@@ -351,7 +346,7 @@ jobs:- uses: ./.github/actions/tend-setup- run: for t in cargo-insta cargo-nextest pre-commit nu nix; do command -v "$t" >/dev/null || { echo "::error::tend setup is missing $t; see Sandbox toolchain in .github/AGENTS.md"; exit 1; }; done- - uses: max-sixty/tend/[email protected]+ - uses: max-sixty/tend/[email protected]with:github_token: ${{ secrets.TEND_BOT_TOKEN }}merge: restricteddiff --git a/.github/workflows/tend-nightly.yaml b/.github/workflows/tend-nightly.yamlindex e612f9855..8c0a8fed7 100644--- a/.github/workflows/tend-nightly.yaml+++ b/.github/workflows/tend-nightly.yaml@@ -1,4 +1,4 @@-# Generated by tend 0.3.4. Regenerate with: uvx tend@latest init+# Generated by tend 0.3.5. Regenerate with: uvx tend@latest init## Do not edit this file directly — it will be overwritten on regeneration.# To change this workflow, edit .config/tend.yaml. To change what the agent@@ -36,7 +36,7 @@ jobs:- uses: ./.github/actions/tend-setup- run: for t in cargo-insta cargo-nextest pre-commit nu nix; do command -v "$t" >/dev/null || { echo "::error::tend setup is missing $t; see Sandbox toolchain in .github/AGENTS.md"; exit 1; }; done- - uses: max-sixty/tend/[email protected]+ - uses: max-sixty/tend/[email protected]with:github_token: ${{ secrets.TEND_BOT_TOKEN }}merge: restricteddiff --git a/.github/workflows/tend-notifications.yaml b/.github/workflows/tend-notifications.yamlindex 5accfba9a..e0c57a18b 100644--- a/.github/workflows/tend-notifications.yaml+++ b/.github/workflows/tend-notifications.yaml@@ -1,4 +1,4 @@-# Generated by tend 0.3.4. Regenerate with: uvx tend@latest init+# Generated by tend 0.3.5. Regenerate with: uvx tend@latest init## Do not edit this file directly — it will be overwritten on regeneration.# To change this workflow, edit .config/tend.yaml. To change what the agent@@ -34,7 +34,7 @@ jobs:env:UV_NO_MODIFY_PATH: "1"with:- version: "0.12.17"+ version: "0.12.19"enable-cache: falseignore-empty-workdir: true- name: Check for unread notifications and conflicted PRs@@ -100,24 +100,11 @@ jobs:def _paginated(path: str) -> list[Any]:- text = _gh("api", path, "--paginate", quiet=True)- decoder = json.JSONDecoder()- pages: list[Any] = []- position = 0- saw_page = False- while position < len(text):- while position < len(text) and text[position].isspace():- position += 1- if position == len(text):- break- page, position = decoder.raw_decode(text, position)- saw_page = True- if not isinstance(page, list):- raise TypeError("paginated GitHub response was not an array")- pages.extend(page)- if not saw_page:- raise ValueError("paginated GitHub response was empty")- return pages+ # `--slurp` prints one array holding every page.+ pages = _json("api", "--paginate", "--slurp", path, quiet=True)+ if not all(isinstance(page, list) for page in pages):+ raise TypeError("paginated GitHub response was not an array")+ return [item for page in pages for item in page]def _output(name: str, value: str | int) -> None:@@ -127,13 +114,8 @@ jobs:def _notifications(cutoff: str) -> int:try:- return len(_paginated(f"notifications?before={cutoff}&per_page=100"))- except (- json.JSONDecodeError,- subprocess.CalledProcessError,- TypeError,- ValueError,- ):+ return len(_paginated(f"notifications?before={cutoff}"))+ except (json.JSONDecodeError, subprocess.CalledProcessError, TypeError):print("::warning::notifications fetch failed; queue left for the next cycle")return 0@@ -195,11 +177,15 @@ jobs:return 0+ #: How old a notification must be before this poll takes it. The event run a+ #: notification started usually finishes, and marks it read, within this, so a+ #: poll doesn't boot a session only to find that run still holds its subject.+ GRACE = timedelta(minutes=10)++def main(*, now: datetime | None = None) -> int:repo = os.environ["GITHUB_REPOSITORY"]- cutoff = ((now or datetime.now(UTC)) - timedelta(minutes=10)).strftime(- "%Y-%m-%dT%H:%M:%SZ"- )+ cutoff = ((now or datetime.now(UTC)) - GRACE).strftime("%Y-%m-%dT%H:%M:%SZ")_output("cutoff", cutoff)try:@@ -249,7 +235,7 @@ jobs:if: steps.check.outputs.count != '0' || steps.check.outputs.conflict_count != '0' || github.event_name == 'workflow_dispatch'- run: for t in cargo-insta cargo-nextest pre-commit nu nix; do command -v "$t" >/dev/null || { echo "::error::tend setup is missing $t; see Sandbox toolchain in .github/AGENTS.md"; exit 1; }; doneif: steps.check.outputs.count != '0' || steps.check.outputs.conflict_count != '0' || github.event_name == 'workflow_dispatch'- - uses: max-sixty/tend/[email protected]+ - uses: max-sixty/tend/[email protected]if: steps.check.outputs.count != '0' || steps.check.outputs.conflict_count != '0' || github.event_name == 'workflow_dispatch'with:github_token: ${{ secrets.TEND_BOT_TOKEN }}diff --git a/.github/workflows/tend-review-runs.yaml b/.github/workflows/tend-review-runs.yamlindex d6763f83b..ea6937ffe 100644--- a/.github/workflows/tend-review-runs.yaml+++ b/.github/workflows/tend-review-runs.yaml@@ -1,4 +1,4 @@-# Generated by tend 0.3.4. Regenerate with: uvx tend@latest init+# Generated by tend 0.3.5. Regenerate with: uvx tend@latest init## Do not edit this file directly — it will be overwritten on regeneration.# To change this workflow, edit .config/tend.yaml. To change what the agent@@ -36,7 +36,7 @@ jobs:- uses: ./.github/actions/tend-setup- run: for t in cargo-insta cargo-nextest pre-commit nu nix; do command -v "$t" >/dev/null || { echo "::error::tend setup is missing $t; see Sandbox toolchain in .github/AGENTS.md"; exit 1; }; done- - uses: max-sixty/tend/[email protected]+ - uses: max-sixty/tend/[email protected]with:github_token: ${{ secrets.TEND_BOT_TOKEN }}merge: restricteddiff --git a/.github/workflows/tend-review.yaml b/.github/workflows/tend-review.yamlindex e9380b50a..e266eec70 100644--- a/.github/workflows/tend-review.yaml+++ b/.github/workflows/tend-review.yaml@@ -1,4 +1,4 @@-# Generated by tend 0.3.4. Regenerate with: uvx tend@latest init+# Generated by tend 0.3.5. Regenerate with: uvx tend@latest init## Do not edit this file directly — it will be overwritten on regeneration.# To change this workflow, edit .config/tend.yaml. To change what the agent@@ -54,7 +54,7 @@ jobs:- uses: ./.github/actions/tend-setup- run: for t in cargo-insta cargo-nextest pre-commit nu nix; do command -v "$t" >/dev/null || { echo "::error::tend setup is missing $t; see Sandbox toolchain in .github/AGENTS.md"; exit 1; }; done- - uses: max-sixty/tend/[email protected]+ - uses: max-sixty/tend/[email protected]with:github_token: ${{ secrets.TEND_BOT_TOKEN }}merge: restricteddiff --git a/.github/workflows/tend-triage.yaml b/.github/workflows/tend-triage.yamlindex 44b019a1d..e974b9029 100644--- a/.github/workflows/tend-triage.yaml+++ b/.github/workflows/tend-triage.yaml@@ -1,4 +1,4 @@-# Generated by tend 0.3.4. Regenerate with: uvx tend@latest init+# Generated by tend 0.3.5. Regenerate with: uvx tend@latest init## Do not edit this file directly — it will be overwritten on regeneration.# To change this workflow, edit .config/tend.yaml. To change what the agent@@ -48,7 +48,7 @@ jobs:- uses: ./.github/actions/tend-setup- run: for t in cargo-insta cargo-nextest pre-commit nu nix; do command -v "$t" >/dev/null || { echo "::error::tend setup is missing $t; see Sandbox toolchain in .github/AGENTS.md"; exit 1; }; done- - uses: max-sixty/tend/[email protected]+ - uses: max-sixty/tend/[email protected]with:github_token: ${{ secrets.TEND_BOT_TOKEN }}merge: restricteddiff --git a/.github/workflows/tend-weekly.yaml b/.github/workflows/tend-weekly.yamlindex aba23c1f6..291522ca7 100644--- a/.github/workflows/tend-weekly.yaml+++ b/.github/workflows/tend-weekly.yaml@@ -1,4 +1,4 @@-# Generated by tend 0.3.4. Regenerate with: uvx tend@latest init+# Generated by tend 0.3.5. Regenerate with: uvx tend@latest init## Do not edit this file directly — it will be overwritten on regeneration.# To change this workflow, edit .config/tend.yaml. To change what the agent@@ -36,7 +36,7 @@ jobs:- uses: ./.github/actions/tend-setup- run: for t in cargo-insta cargo-nextest pre-commit nu nix; do command -v "$t" >/dev/null || { echo "::error::tend setup is missing $t; see Sandbox toolchain in .github/AGENTS.md"; exit 1; }; done- - uses: max-sixty/tend/[email protected]+ - uses: max-sixty/tend/[email protected]with:github_token: ${{ secrets.TEND_BOT_TOKEN }}merge: restricted