Autopilot #36
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: Autopilot | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| # Run at 17:00 UTC every day | |
| # 17:00 UTC is (usually) 10:00 PDT | |
| - cron: "0 17 * * 1,5" | |
| permissions: | |
| issues: write | |
| jobs: | |
| assign-issue: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Assign issue to copilot | |
| run: | | |
| issue_number=$(gh issue list --state open --label 'autopilot-candidate' --search 'no:assignee -is:blocked' --json number --jq '.[].number' | shuf -n 1) | |
| gh issue edit $issue_number --add-assignee "@copilot" | |
| env: | |
| GH_TOKEN: ${{ secrets.AUTOPILOT_PAT }} |