Use "Unknown" as fallback agent type for unidentified sessions #63
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Plan Minion Task | |
| on: | |
| issues: | |
| types: [labeled] | |
| workflow_dispatch: | |
| inputs: | |
| program: | |
| description: "Program .md file path" | |
| required: true | |
| type: string | |
| permissions: | |
| contents: read | |
| issues: write | |
| jobs: | |
| plan: | |
| if: > | |
| github.event_name == 'workflow_dispatch' || | |
| (github.event_name == 'issues' && github.event.label.name == 'minion-planning') | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Claude Code | |
| run: npm install -g @anthropic-ai/claude-code | |
| - name: Install minions | |
| run: | | |
| go install github.com/partio-io/minions/cmd/minions@v0.0.3 | |
| echo "$(go env GOPATH)/bin" >> "$GITHUB_PATH" | |
| - name: Determine program | |
| id: program | |
| env: | |
| GH_TOKEN: ${{ secrets.GH_PAT }} | |
| run: | | |
| if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then | |
| echo "path=${{ inputs.program }}" >> "$GITHUB_OUTPUT" | |
| else | |
| ISSUE_NUM="${{ github.event.issue.number }}" | |
| ISSUE_BODY=$(gh issue view "$ISSUE_NUM" --repo "${{ github.repository }}" --json body -q '.body') | |
| PROGRAM_PATH=$(echo "$ISSUE_BODY" | grep -oP '(?<=<!-- program: ).*(?= -->)' || true) | |
| if [ -z "$PROGRAM_PATH" ]; then | |
| echo "::error::No program reference in issue #${ISSUE_NUM}" | |
| exit 1 | |
| fi | |
| echo "path=${PROGRAM_PATH}" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Run program with planner | |
| env: | |
| ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | |
| GH_TOKEN: ${{ secrets.GH_PAT }} | |
| run: minions run ${{ steps.program.outputs.path }} --dry-run |