Skip to content

Commit c6f8eb7

Browse files
committed
add style guide
Signed-off-by: Reshma Abdul Rahim <reshmarahim.abdul@microsoft.com>
1 parent 7ea2ec2 commit c6f8eb7

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

.github/workflows/auto-blog-post.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,21 @@ jobs:
7878
7979
# Get contribution guide content from re/ab branch
8080
echo "Fetching contribution guide from re/ab branch..."
81-
curl -s "https://raw.githubusercontent.com/radius-project/blog/re/ab/radblog/guide/contribution-guide.md" > contribution-guide.md
82-
if [ -f "contribution-guide.md" ] && [ -s "contribution-guide.md" ]; then
81+
HTTP_STATUS=$(curl -s -w "%{http_code}" "https://raw.githubusercontent.com/radius-project/blog/re%2Fab/radblog/guide/contribution-guide.md" -o contribution-guide.md)
82+
83+
if [ "$HTTP_STATUS" = "200" ] && [ -f "contribution-guide.md" ] && [ -s "contribution-guide.md" ]; then
8384
STYLE_GUIDE=$(cat contribution-guide.md)
84-
echo "✅ Contribution guide fetched successfully"
85+
echo "✅ Contribution guide fetched successfully (HTTP $HTTP_STATUS)"
8586
else
86-
echo "❌ Failed to fetch contribution guide, using fallback"
87-
STYLE_GUIDE="Follow Radius blog style guide: conversational, user-focused, technical depth over marketing."
87+
echo "❌ Failed to fetch contribution guide (HTTP $HTTP_STATUS), trying alternative method..."
88+
# Try using git show as fallback
89+
if git show re/ab:radblog/guide/contribution-guide.md > contribution-guide.md 2>/dev/null; then
90+
STYLE_GUIDE=$(cat contribution-guide.md)
91+
echo "✅ Contribution guide fetched via git show"
92+
else
93+
echo "❌ All methods failed, using fallback style guide"
94+
STYLE_GUIDE="Follow Radius blog style guide: conversational, user-focused, technical depth over marketing, evidence-based content only."
95+
fi
8896
fi
8997
9098
# Create AI prompt from template using safer approach

0 commit comments

Comments
 (0)