|
65 | 65 | |
66 | 66 | cat /tmp/activity.md |
67 | 67 |
|
68 | | - - name: Generate Short News Update |
69 | | - env: |
70 | | - COPILOT_GITHUB_TOKEN: ${{ github.token }} |
71 | | - run: | |
72 | | - cat > /tmp/prompt.txt << 'EOF' |
73 | | - Based on the following GitHub activity from the past week, create a concise 2-3 paragraph news update suitable for a website news section. Focus on the most significant changes and developments. Keep it professional and informative. |
74 | | - |
75 | | - EOF |
76 | | - cat /tmp/activity.md >> /tmp/prompt.txt |
77 | | - |
78 | | - gh copilot -p "$(cat /tmp/prompt.txt)" > /tmp/short_news.txt |
79 | | -
|
80 | | - - name: Generate Detailed Overview |
81 | | - env: |
82 | | - COPILOT_GITHUB_TOKEN: ${{ github.token }} |
83 | | - run: | |
84 | | - cat > /tmp/detail_prompt.txt << 'EOF' |
85 | | - Based on the following GitHub activity from the past week, create a detailed weekly overview with sections for different types of changes (commits, pull requests, issues). Include relevant details and provide context about the significance of changes. Format as markdown. |
86 | | - |
87 | | - EOF |
88 | | - cat /tmp/activity.md >> /tmp/detail_prompt.txt |
89 | | - |
90 | | - gh copilot -p "$(cat /tmp/detail_prompt.txt)" > /tmp/detailed_overview.txt |
91 | | -
|
92 | 68 | - name: Create Discussion Post |
93 | 69 | env: |
94 | 70 | GH_TOKEN: ${{ github.token }} |
|
97 | 73 | YEAR=$(date -u +%Y) |
98 | 74 | TITLE="Weekly Update - Week $WEEK_NUM, $YEAR" |
99 | 75 | |
100 | | - # Combine short summary and detailed overview into body |
101 | | - cat /tmp/short_news.txt > /tmp/discussion_body.md |
102 | | - echo "" >> /tmp/discussion_body.md |
103 | | - echo "## Detailed Activity Overview" >> /tmp/discussion_body.md |
104 | | - echo "" >> /tmp/discussion_body.md |
105 | | - cat /tmp/detailed_overview.txt >> /tmp/discussion_body.md |
| 76 | + # Use the activity report as the discussion body |
| 77 | + cat /tmp/activity.md > /tmp/discussion_body.md |
106 | 78 | echo "" >> /tmp/discussion_body.md |
107 | 79 | echo "---" >> /tmp/discussion_body.md |
108 | 80 | echo "" >> /tmp/discussion_body.md |
|
0 commit comments