You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
echo "❌ Could not extract month or year from issue body."
37
31
exit 1
38
32
fi
39
-
33
+
34
+
# Convert month name to number
40
35
month_num=$(date -d "$month 1" '+%m')
41
36
date="${year}-${month_num}-01"
42
37
branch="feature/newsletter-${year}-${month_num}"
43
38
filename="_posts/${date}-newsletter.md"
44
-
39
+
40
+
echo "✅ Parsed values:"
41
+
echo " Month: $month"
42
+
echo " Year: $year"
43
+
echo " Month Num: $month_num"
44
+
echo " Date: $date"
45
+
echo " Branch: $branch"
46
+
echo " Filename: $filename"
47
+
45
48
echo "month=$month" >> $GITHUB_OUTPUT
46
49
echo "month_num=$month_num" >> $GITHUB_OUTPUT
47
50
echo "year=$year" >> $GITHUB_OUTPUT
@@ -73,4 +76,9 @@ jobs:
73
76
env:
74
77
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
75
78
run: |
76
-
gh issue comment ${{ github.event.issue.number }} --body "Draft file created for **${{ steps.vars.outputs.month }} ${{ steps.vars.outputs.year }}** at \`${{ steps.vars.outputs.filename }}\` in branch \`${{ steps.vars.outputs.branch }}\`.\n\nYou can now:\n1. Open the branch in VS Code using GitFlow (\`feature/newsletter-${{ steps.vars.outputs.year }}-${{ steps.vars.outputs.month_num }}\`)\n2. Edit and review the draft\n3. Open a PR into \`develop\` when ready"
79
+
gh issue comment ${{ github.event.issue.number }} --body "✅ Draft file created for **${{ steps.vars.outputs.month }} ${{ steps.vars.outputs.year }}** at \`${{ steps.vars.outputs.filename }}\` in branch \`${{ steps.vars.outputs.branch }}\`.
80
+
81
+
You can now:
82
+
1. Open the branch in VS Code using GitFlow (\`feature/newsletter-${{ steps.vars.outputs.year }}-${{ steps.vars.outputs.month_num }}\`)
0 commit comments