@@ -78,16 +78,31 @@ runs:
78
78
# Force to true for debugging
79
79
DOC_FILES_COUNT=1
80
80
81
- # Format changed files for comment
82
- FORMATTED_FILES=$(jq -r '.[] | select(startswith("${{ inputs.docs-dir }}/")) | "- `" + . + "`"' changed_files.json)
81
+ # Get branch name for URLs
82
+ BRANCH_NAME=$(jq --raw-output .pull_request.head.ref "$GITHUB_EVENT_PATH")
83
+
84
+ # Format changed files for comment with clickable links
85
+ FORMATTED_FILES=""
86
+ while read -r file_path; do
87
+ [ -z "$file_path" ] && continue
88
+
89
+ # Create direct link to file
90
+ # Remove .md extension and docs/ prefix for the URL path
91
+ url_path=$(echo "$file_path" | sed 's/^docs\///' | sed 's/\.md$//')
92
+ file_url="https://coder.com/docs/@${BRANCH_NAME}/${url_path}"
93
+
94
+ # Add the formatted line with link
95
+ FORMATTED_FILES="${FORMATTED_FILES}- [$file_path]($file_url)\n"
96
+ done < <(jq -r '.[] | select(startswith("${{ inputs.docs-dir }}/"))' changed_files.json)
83
97
84
98
# Add a minimum placeholder if no files found
85
99
if [ -z "$FORMATTED_FILES" ]; then
86
- FORMATTED_FILES="- Test file - debugging workflow"
100
+ # Hardcode a test example that links directly to the parameters.md file
101
+ FORMATTED_FILES="- [docs/admin/templates/extending-templates/parameters.md](https://coder.com/docs/@${BRANCH_NAME}/admin/templates/extending-templates/parameters)\n"
87
102
fi
88
103
89
104
echo "changed_files<<EOF" >> $GITHUB_OUTPUT
90
- echo "$FORMATTED_FILES" >> $GITHUB_OUTPUT
105
+ echo -e "$FORMATTED_FILES" >> $GITHUB_OUTPUT
91
106
echo "EOF" >> $GITHUB_OUTPUT
92
107
93
108
# Determine if docs have changed - force true for testing
0 commit comments