|
| 1 | +name: Daily Continuous Progress |
| 2 | + |
| 3 | +on: |
| 4 | + schedule: |
| 5 | + # Daily at 9:00 UTC |
| 6 | + - cron: '0 9 * * *' |
| 7 | + workflow_dispatch: |
| 8 | + |
| 9 | +jobs: |
| 10 | + continuous-progress: |
| 11 | + runs-on: ubuntu-latest |
| 12 | + timeout-minutes: 30 |
| 13 | + permissions: |
| 14 | + contents: write |
| 15 | + issues: write |
| 16 | + pull-requests: write |
| 17 | + steps: |
| 18 | + - name: Checkout |
| 19 | + uses: actions/checkout@v4 |
| 20 | + |
| 21 | + - name: Analyze repo and create progress issue |
| 22 | + uses: actions/github-script@v7 |
| 23 | + with: |
| 24 | + script: | |
| 25 | + const issueTitle = 'Daily Progress: ' + new Date().toISOString().split('T')[0]; |
| 26 | + |
| 27 | + // Check if issue already exists for today |
| 28 | + const existingIssues = await github.rest.issues.listForRepo({ |
| 29 | + owner: context.repo.owner, |
| 30 | + repo: context.repo.repo, |
| 31 | + state: 'open', |
| 32 | + labels: 'automation,continuous-progress' |
| 33 | + }); |
| 34 | + |
| 35 | + const todayIssue = existingIssues.data.find(i => i.title === issueTitle); |
| 36 | + if (todayIssue) { |
| 37 | + console.log('Issue already exists for today:', todayIssue.html_url); |
| 38 | + return; |
| 39 | + } |
| 40 | + |
| 41 | + // Create new daily progress issue |
| 42 | + const body = `## Daily Continuous Progress |
| 43 | + |
| 44 | + This issue tracks continuous progress for ${new Date().toISOString().split('T')[0]}. |
| 45 | + |
| 46 | + @copilot please analyze the repository and: |
| 47 | + 1. Review recent commits and identify the natural direction of the project |
| 48 | + 2. Suggest next logical improvements or features to implement |
| 49 | + 3. Create actionable tasks that align with the project goals |
| 50 | + 4. Prioritize quick wins and incremental progress |
| 51 | + |
| 52 | + **Context:** |
| 53 | + - Look at recent issues and PRs |
| 54 | + - Review README and documentation |
| 55 | + - Identify incomplete features or TODOs |
| 56 | + - Consider project structure and organization |
| 57 | + `; |
| 58 | + |
| 59 | + const issue = await github.rest.issues.create({ |
| 60 | + owner: context.repo.owner, |
| 61 | + repo: context.repo.repo, |
| 62 | + title: issueTitle, |
| 63 | + body: body, |
| 64 | + labels: ['automation', 'continuous-progress', 'copilot'] |
| 65 | + }); |
| 66 | + |
| 67 | + console.log('Created issue:', issue.data.html_url); |
| 68 | + |
| 69 | + // Assign to copilot |
| 70 | + await github.rest.issues.addAssignees({ |
| 71 | + owner: context.repo.owner, |
| 72 | + repo: context.repo.repo, |
| 73 | + issue_number: issue.data.number, |
| 74 | + assignees: ['copilot'] |
| 75 | + }); |
0 commit comments