Milestone Tracking #24
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: Milestone Tracking | |
| on: | |
| schedule: | |
| - cron: '0 8 * * 1,3,5' # Monday, Wednesday, Friday at 8 AM | |
| workflow_dispatch: | |
| inputs: | |
| milestone_type: | |
| description: 'Type of milestone check' | |
| required: true | |
| default: 'weekly' | |
| type: choice | |
| options: | |
| - weekly | |
| - monthly | |
| - term_progress | |
| - course_completion | |
| jobs: | |
| track-milestones: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Calculate Progress Metrics | |
| uses: actions/github-script@v6 | |
| with: | |
| script: | | |
| const { context, github } = require('@actions/github'); | |
| const fs = require('fs'); | |
| // Get all issues and categorize them | |
| const issues = await github.rest.issues.listForRepo({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| state: 'all', | |
| per_page: 100 | |
| }); | |
| // Initialize progress tracking | |
| const courses = ['MO-IT103', 'MO-IT143', 'MO-IT147', 'MO-IT148', 'MO-IT151']; | |
| const progress = { | |
| overall: { total: 0, completed: 0, inProgress: 0, pending: 0 }, | |
| courses: {} | |
| }; | |
| courses.forEach(course => { | |
| progress.courses[course] = { total: 0, completed: 0, inProgress: 0, pending: 0 }; | |
| }); | |
| // Analyze issues | |
| issues.data.forEach(issue => { | |
| const title = issue.title; | |
| const state = issue.state; | |
| const labels = issue.labels.map(label => label.name); | |
| // Skip automation and system issues | |
| if (labels.includes('automation') || labels.includes('weekly-summary')) { | |
| return; | |
| } | |
| progress.overall.total++; | |
| if (state === 'closed') { | |
| progress.overall.completed++; | |
| } else if (labels.includes('in-progress')) { | |
| progress.overall.inProgress++; | |
| } else { | |
| progress.overall.pending++; | |
| } | |
| // Categorize by course | |
| courses.forEach(course => { | |
| if (title.includes(course) || labels.includes(course.toLowerCase())) { | |
| progress.courses[course].total++; | |
| if (state === 'closed') { | |
| progress.courses[course].completed++; | |
| } else if (labels.includes('in-progress')) { | |
| progress.courses[course].inProgress++; | |
| } else { | |
| progress.courses[course].pending++; | |
| } | |
| } | |
| }); | |
| }); | |
| // Calculate percentages | |
| const overallCompletion = progress.overall.total > 0 | |
| ? Math.round((progress.overall.completed / progress.overall.total) * 100) | |
| : 0; | |
| // Store progress data for later use | |
| global.progressData = { | |
| progress, | |
| overallCompletion, | |
| timestamp: new Date().toISOString() | |
| }; | |
| console.log('Progress calculated:', JSON.stringify(global.progressData, null, 2)); | |
| - name: Create Milestone Report | |
| uses: actions/github-script@v6 | |
| with: | |
| script: | | |
| const { context, github } = require('@actions/github'); | |
| const fs = require('fs'); | |
| const milestoneType = context.payload.inputs?.milestone_type || 'weekly'; | |
| const currentDate = new Date().toISOString().split('T')[0]; | |
| const { progress, overallCompletion } = global.progressData; | |
| // Generate milestone report based on type | |
| let reportTitle, reportBody; | |
| switch(milestoneType) { | |
| case 'monthly': | |
| reportTitle = `📊 Monthly Milestone Report - ${currentDate}`; | |
| reportBody = ` | |
| # Monthly Academic Progress Report | |
| ## Overall Progress Summary | |
| - **Completion Rate**: ${overallCompletion}% | |
| - **Total Tasks**: ${progress.overall.total} | |
| - **Completed**: ${progress.overall.completed} | |
| - **In Progress**: ${progress.overall.inProgress} | |
| - **Pending**: ${progress.overall.pending} | |
| ## Course-by-Course Progress | |
| ${Object.entries(progress.courses).map(([course, stats]) => { | |
| const courseCompletion = stats.total > 0 ? Math.round((stats.completed / stats.total) * 100) : 0; | |
| const courseFullName = course.replace('MO-IT', '').replace(/(\d+)/, ' $1'); | |
| return `### ${course} - ${courseFullName} | |
| - **Progress**: ${courseCompletion}% (${stats.completed}/${stats.total}) | |
| - **Status**: ${stats.inProgress} in progress, ${stats.pending} pending | |
| `; | |
| }).join('\n')} | |
| ## Key Achievements This Month | |
| - [ ] Complete weekly assignments consistently | |
| - [ ] Develop portfolio items for each course | |
| - [ ] Implement feedback from previous month | |
| - [ ] Update skills matrix and documentation | |
| ## Focus Areas for Next Month | |
| - **Portfolio Development**: Enhance professional presentation | |
| - **Skill Building**: Focus on industry-relevant technologies | |
| - **Collaboration**: Increase peer interaction and feedback | |
| - **Automation**: Improve workflow efficiency | |
| ## Action Items | |
| - [ ] Review and update course objectives | |
| - [ ] Schedule portfolio review sessions | |
| - [ ] Plan upcoming project deadlines | |
| - [ ] Update professional development goals | |
| --- | |
| *Generated automatically on ${currentDate}* | |
| `; | |
| break; | |
| case 'term_progress': | |
| reportTitle = `🎓 Term Progress Assessment - ${currentDate}`; | |
| reportBody = ` | |
| # TERM-3 SY-2024-25 Progress Assessment | |
| ## Academic Term Overview | |
| - **Program**: BS IT Network & Cybersecurity | |
| - **Term**: TERM-3 SY-2024-25 | |
| - **Overall Completion**: ${overallCompletion}% | |
| - **Assessment Date**: ${currentDate} | |
| ## Course Completion Status | |
| ${Object.entries(progress.courses).map(([course, stats]) => { | |
| const courseCompletion = stats.total > 0 ? Math.round((stats.completed / stats.total) * 100) : 0; | |
| let status; | |
| if (courseCompletion >= 80) status = '🟢 On Track'; | |
| else if (courseCompletion >= 60) status = '🟡 Attention Needed'; | |
| else status = '🔴 Requires Focus'; | |
| return `### ${course} | |
| - **Completion**: ${courseCompletion}% | |
| - **Status**: ${status} | |
| - **Tasks**: ${stats.completed}/${stats.total} completed | |
| `; | |
| }).join('\n')} | |
| ## Portfolio Development Progress | |
| - **Course Portfolio Items**: Updated per course completion | |
| - **Professional Skills**: Developing as per industry standards | |
| - **Project Documentation**: Maintaining academic and professional quality | |
| - **Feedback Integration**: Continuous improvement process active | |
| ## Term Objectives Review | |
| - [ ] Complete all course assignments with quality standards | |
| - [ ] Build comprehensive portfolio for career preparation | |
| - [ ] Develop industry-relevant technical skills | |
| - [ ] Maintain academic excellence throughout term | |
| - [ ] Prepare for professional transition post-graduation | |
| ## Areas for Improvement | |
| - **Time Management**: Optimize workflow efficiency | |
| - **Technical Skills**: Focus on emerging technologies | |
| - **Professional Networking**: Increase industry connections | |
| - **Portfolio Quality**: Enhance professional presentation | |
| --- | |
| *Term assessment conducted automatically for continuous improvement* | |
| `; | |
| break; | |
| case 'course_completion': | |
| reportTitle = `✅ Course Completion Milestone - ${currentDate}`; | |
| reportBody = ` | |
| # Course Completion Milestone Check | |
| ## Completion Status Overview | |
| ${Object.entries(progress.courses).map(([course, stats]) => { | |
| const courseCompletion = stats.total > 0 ? Math.round((stats.completed / stats.total) * 100) : 0; | |
| const courseFullName = course.replace('MO-IT', '').replace(/(\d+)/, ' $1'); | |
| let completionStatus; | |
| if (courseCompletion >= 90) { | |
| completionStatus = '🎉 **COMPLETED** - Ready for final evaluation'; | |
| } else if (courseCompletion >= 75) { | |
| completionStatus = '🏁 **NEAR COMPLETION** - Final tasks remaining'; | |
| } else if (courseCompletion >= 50) { | |
| completionStatus = '📈 **IN PROGRESS** - On track for completion'; | |
| } else { | |
| completionStatus = '🚀 **STARTING** - Building momentum'; | |
| } | |
| return `### ${course} - ${courseFullName} | |
| ${completionStatus} | |
| - **Progress**: ${courseCompletion}% | |
| - **Completed Tasks**: ${stats.completed} | |
| - **Remaining Tasks**: ${stats.total - stats.completed} | |
| - **In Progress**: ${stats.inProgress} | |
| `; | |
| }).join('\n')} | |
| ## Next Steps for Course Completion | |
| ${Object.entries(progress.courses).map(([course, stats]) => { | |
| const courseCompletion = stats.total > 0 ? Math.round((stats.completed / stats.total) * 100) : 0; | |
| if (courseCompletion >= 90) { | |
| return `### ${course}: Final Review and Portfolio Polish | |
| - [ ] Review all completed work for quality | |
| - [ ] Finalize portfolio items | |
| - [ ] Prepare for course assessment | |
| - [ ] Document key learnings and achievements | |
| `; | |
| } else if (courseCompletion >= 75) { | |
| return `### ${course}: Complete Remaining Tasks | |
| - [ ] Focus on ${stats.total - stats.completed} remaining tasks | |
| - [ ] Prioritize high-impact assignments | |
| - [ ] Ensure portfolio items are publication-ready | |
| - [ ] Maintain quality standards in final work | |
| `; | |
| } else { | |
| return `### ${course}: Accelerate Progress | |
| - [ ] Review course objectives and requirements | |
| - [ ] Create detailed completion timeline | |
| - [ ] Focus on core competency development | |
| - [ ] Build foundation for portfolio items | |
| `; | |
| } | |
| }).join('\n')} | |
| ## Overall Term Completion Strategy | |
| - **Priority**: Complete courses with highest completion percentage first | |
| - **Quality**: Maintain academic and professional standards | |
| - **Portfolio**: Ensure all courses contribute to professional portfolio | |
| - **Timeline**: Align with academic calendar and deadlines | |
| --- | |
| *Course completion tracking for academic success* | |
| `; | |
| break; | |
| default: // weekly | |
| reportTitle = `📈 Weekly Progress Check - ${currentDate}`; | |
| reportBody = ` | |
| # Weekly Academic Progress Report | |
| ## This Week's Progress | |
| - **Overall Completion**: ${overallCompletion}% | |
| - **Tasks Completed**: ${progress.overall.completed} | |
| - **Tasks In Progress**: ${progress.overall.inProgress} | |
| - **Tasks Pending**: ${progress.overall.pending} | |
| ## Course Progress This Week | |
| ${Object.entries(progress.courses).map(([course, stats]) => { | |
| const courseCompletion = stats.total > 0 ? Math.round((stats.completed / stats.total) * 100) : 0; | |
| return `### ${course} | |
| - **Progress**: ${courseCompletion}% | |
| - **This Week**: ${stats.inProgress} in progress | |
| `; | |
| }).join('\n')} | |
| ## Weekly Goals Review | |
| - [ ] Complete all scheduled assignments | |
| - [ ] Update portfolio items | |
| - [ ] Review and respond to feedback | |
| - [ ] Plan next week's priorities | |
| ## Focus for Next Week | |
| - **Priority Courses**: Focus on courses with lower completion rates | |
| - **Portfolio Items**: Develop and refine showcase projects | |
| - **Skill Development**: Practice emerging technologies | |
| - **Collaboration**: Engage with feedback and improvement opportunities | |
| ## Weekly Action Items | |
| - [ ] Review completed tasks for quality | |
| - [ ] Plan upcoming assignment deadlines | |
| - [ ] Update skills matrix based on learning | |
| - [ ] Engage with course communities and resources | |
| --- | |
| *Weekly progress tracking for continuous improvement* | |
| `; | |
| } | |
| // Create the milestone issue | |
| await github.rest.issues.create({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| title: reportTitle, | |
| body: reportBody, | |
| labels: ['milestone-tracking', milestoneType, 'progress-report'] | |
| }); | |
| - name: Update Progress Documentation | |
| uses: actions/github-script@v6 | |
| with: | |
| script: | | |
| const fs = require('fs'); | |
| const path = require('path'); | |
| const { progress, overallCompletion, timestamp } = global.progressData; | |
| const currentDate = new Date().toISOString().split('T')[0]; | |
| // Update workspace progress file | |
| const progressFile = 'documentation/workspace-progress.md'; | |
| let progressContent = ''; | |
| try { | |
| progressContent = fs.readFileSync(progressFile, 'utf8'); | |
| } catch (error) { | |
| progressContent = '# Workspace Progress Tracking\n\n'; | |
| } | |
| const progressEntry = `## ${currentDate} - Automated Progress Update | |
| ### Overall Metrics | |
| - **Completion Rate**: ${overallCompletion}% | |
| - **Total Tasks**: ${progress.overall.total} | |
| - **Completed**: ${progress.overall.completed} | |
| - **In Progress**: ${progress.overall.inProgress} | |
| - **Pending**: ${progress.overall.pending} | |
| ### Course Progress | |
| ${Object.entries(progress.courses).map(([course, stats]) => { | |
| const courseCompletion = stats.total > 0 ? Math.round((stats.completed / stats.total) * 100) : 0; | |
| return `- **${course}**: ${courseCompletion}% (${stats.completed}/${stats.total})`; | |
| }).join('\n')} | |
| ### Next Focus Areas | |
| ${Object.entries(progress.courses) | |
| .filter(([course, stats]) => { | |
| const courseCompletion = stats.total > 0 ? Math.round((stats.completed / stats.total) * 100) : 0; | |
| return courseCompletion < 80; | |
| }) | |
| .map(([course, stats]) => `- **${course}**: Requires attention`) | |
| .join('\n') || '- All courses on track'} | |
| --- | |
| `; | |
| progressContent = progressEntry + progressContent; | |
| fs.writeFileSync(progressFile, progressContent); | |
| console.log('Progress documentation updated'); | |
| - name: Generate Achievement Badges | |
| uses: actions/github-script@v6 | |
| with: | |
| script: | | |
| const fs = require('fs'); | |
| const path = require('path'); | |
| const { progress, overallCompletion } = global.progressData; | |
| const currentDate = new Date().toISOString().split('T')[0]; | |
| // Define achievement thresholds and badges | |
| const achievements = []; | |
| // Overall completion badges | |
| if (overallCompletion >= 25) achievements.push('🥉 Quarter Complete'); | |
| if (overallCompletion >= 50) achievements.push('🥈 Half Complete'); | |
| if (overallCompletion >= 75) achievements.push('🥇 Three Quarters Complete'); | |
| if (overallCompletion >= 90) achievements.push('🏆 Near Completion'); | |
| if (overallCompletion >= 100) achievements.push('🎓 Fully Complete'); | |
| // Course-specific achievements | |
| Object.entries(progress.courses).forEach(([course, stats]) => { | |
| const courseCompletion = stats.total > 0 ? Math.round((stats.completed / stats.total) * 100) : 0; | |
| if (courseCompletion >= 50) { | |
| achievements.push(`📚 ${course} - Halfway Champion`); | |
| } | |
| if (courseCompletion >= 75) { | |
| achievements.push(`🎯 ${course} - Advanced Progress`); | |
| } | |
| if (courseCompletion >= 90) { | |
| achievements.push(`⭐ ${course} - Excellence Achieved`); | |
| } | |
| }); | |
| // Consistency achievements | |
| const consistentCourses = Object.entries(progress.courses).filter(([course, stats]) => { | |
| const courseCompletion = stats.total > 0 ? Math.round((stats.completed / stats.total) * 100) : 0; | |
| return courseCompletion >= 60; | |
| }); | |
| if (consistentCourses.length >= 3) { | |
| achievements.push('🔄 Consistency Champion - 3+ Courses on Track'); | |
| } | |
| if (consistentCourses.length >= 5) { | |
| achievements.push('🌟 Full Stack Excellence - All Courses Excelling'); | |
| } | |
| // Portfolio achievements | |
| if (progress.overall.completed >= 10) { | |
| achievements.push('📁 Portfolio Builder - 10+ Items Completed'); | |
| } | |
| if (progress.overall.completed >= 25) { | |
| achievements.push('🚀 Portfolio Pro - 25+ Items Completed'); | |
| } | |
| // Create achievements file | |
| const achievementsContent = `# Academic Achievements - TERM-3 SY-2024-25 | |
| ## Current Achievement Badges | |
| ${achievements.map(achievement => `- ${achievement}`).join('\n')} | |
| ## Achievement History | |
| ### ${currentDate} | |
| ${achievements.length > 0 ? achievements.map(achievement => `- Earned: ${achievement}`).join('\n') : '- No new achievements today'} | |
| ## Progress Metrics | |
| - **Overall Completion**: ${overallCompletion}% | |
| - **Total Achievements**: ${achievements.length} | |
| - **Courses Excellence**: ${consistentCourses.length}/5 courses performing well | |
| ## Next Achievement Targets | |
| ${overallCompletion < 25 ? '- 🥉 Quarter Complete (25%)' : ''} | |
| ${overallCompletion < 50 ? '- 🥈 Half Complete (50%)' : ''} | |
| ${overallCompletion < 75 ? '- 🥇 Three Quarters Complete (75%)' : ''} | |
| ${overallCompletion < 90 ? '- 🏆 Near Completion (90%)' : ''} | |
| ${overallCompletion < 100 ? '- 🎓 Fully Complete (100%)' : ''} | |
| --- | |
| *Achievements updated automatically based on academic progress* | |
| *Last updated: ${currentDate}* | |
| `; | |
| // Ensure directory exists | |
| const achievementsDir = 'portfolio/achievements'; | |
| if (!fs.existsSync(achievementsDir)) { | |
| fs.mkdirSync(achievementsDir, { recursive: true }); | |
| } | |
| fs.writeFileSync(path.join(achievementsDir, 'README.md'), achievementsContent); | |
| console.log('Achievement badges updated:', achievements.length, 'achievements earned'); | |
| commit-updates: | |
| runs-on: ubuntu-latest | |
| needs: track-milestones | |
| steps: | |
| - name: Commit Progress Updates | |
| run: | | |
| git config --local user.email "action@github.com" | |
| git config --local user.name "GitHub Action" | |
| git add documentation/ portfolio/ | |
| git diff --staged --quiet || git commit -m "Auto-update progress tracking and achievements [skip ci]" || echo "No changes to commit" | |
| git push || echo "No changes to push" |