ci: add reusable Pi assignment-trigger workflow #10

Merged
alex merged 1 commit from pi/issue9-1783858666991 into master 2026-07-12 12:27:08 +00:00
Contributor

Summary

Adds a new reusable workflow (.forgejo/workflows/pi-assign.yml) that reproduces the "Assignment Triggers" pattern from the pi-coding-agent-action README, adapted for Forgejo.

How it works

  • Triggers: issues: [assigned] and pull_request: [assigned] — fires when an issue or PR is assigned to someone.
  • Filter: if: forgejo.event.assignee.login == 'pi' — only runs when the assignment target is the pi bot user, ignoring all other assignments.
  • Reusable: Includes workflow_call so every other repo on the forge can consume it the same way as the existing pi.yml:
    uses: alex/.profile/.forgejo/workflows/pi-assign.yml@master
    secrets: inherit
    
  • PR-aware checkout: When triggered from a PR assignment, checks out the PR head branch; otherwise falls back to the default ref (for issues).
  • Prompt-based: Since assignment events carry no comment body, uses the prompt input to instruct the agent to analyze the issue/PR, read the full discussion thread, and take appropriate action.

Design choices

  • Kept as a separate file from pi.yml rather than merged — assignment triggers have different event types, conditions, and use a prompt instead of comment extraction, so keeping them separate is cleaner and avoids complicating the existing comment-based flow.
  • Uses the same action version (@develop), secrets (PI_TOKEN, LLM_API_KEY), vars (PROVIDER, MODEL, THINKING_LEVEL, MY_FORGEJO_PUBLIC_URL), and extensions as the existing pi.yml for consistency.

Fixes #9

## Summary Adds a new reusable workflow (`.forgejo/workflows/pi-assign.yml`) that reproduces the ["Assignment Triggers"](https://github.com/shaftoe/pi-coding-agent-action#assignment-triggers) pattern from the pi-coding-agent-action README, adapted for Forgejo. ### How it works - **Triggers**: `issues: [assigned]` and `pull_request: [assigned]` — fires when an issue or PR is assigned to someone. - **Filter**: `if: forgejo.event.assignee.login == 'pi'` — only runs when the assignment target is the `pi` bot user, ignoring all other assignments. - **Reusable**: Includes `workflow_call` so every other repo on the forge can consume it the same way as the existing `pi.yml`: ```yaml uses: alex/.profile/.forgejo/workflows/pi-assign.yml@master secrets: inherit ``` - **PR-aware checkout**: When triggered from a PR assignment, checks out the PR head branch; otherwise falls back to the default ref (for issues). - **Prompt-based**: Since assignment events carry no comment body, uses the `prompt` input to instruct the agent to analyze the issue/PR, read the full discussion thread, and take appropriate action. ### Design choices - Kept as a **separate file** from `pi.yml` rather than merged — assignment triggers have different event types, conditions, and use a `prompt` instead of comment extraction, so keeping them separate is cleaner and avoids complicating the existing comment-based flow. - Uses the same action version (`@develop`), secrets (`PI_TOKEN`, `LLM_API_KEY`), vars (`PROVIDER`, `MODEL`, `THINKING_LEVEL`, `MY_FORGEJO_PUBLIC_URL`), and extensions as the existing `pi.yml` for consistency. Fixes #9
Co-authored-by: alex <alex@forge.l3x.in>
alex merged commit 4e3864b711 into master 2026-07-12 12:27:08 +00:00
alex deleted branch pi/issue9-1783858666991 2026-07-12 12:27:09 +00:00
Sign in to join this conversation.
No reviewers
No labels
dependencies
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
alex/.profile!10
No description provided.