|
35 | 35 | # Malformed ToC anchor links generated by the docs platform |
36 | 36 | # These contain internal routing params (domain/host/auth/audience/version/path) |
37 | 37 | # and are not real broken links — this is a fern-platform rendering bug |
| 38 | + "buildwithfern\\.com/_/buildwithfern\\.com/", |
38 | 39 | "app\\.buildwithfern\\.com/buildwithfern\\.com/", |
39 | 40 | |
40 | 41 | # Placeholder/example URLs |
@@ -508,7 +509,7 @@ jobs: |
508 | 509 | status=$(echo "$line" | sed -E 's/.*\[([0-9]+)\].*/\1/') |
509 | 510 | |
510 | 511 | # Skip malformed ToC anchor links (fern-platform rendering bug) |
511 | | - if echo "$url" | grep -qF 'app.buildwithfern.com/buildwithfern.com/'; then |
| 512 | + if echo "$url" | grep -qE 'buildwithfern\.com/_/buildwithfern\.com/|app\.buildwithfern\.com/buildwithfern\.com/'; then |
512 | 513 | continue |
513 | 514 | fi |
514 | 515 | |
@@ -824,6 +825,15 @@ jobs: |
824 | 825 | scaffoldContent += '\n---\n'; |
825 | 826 | scaffoldContent += `[View workflow run](https://github.com/${owner}/${repo}/actions/runs/${context.runId})\n`; |
826 | 827 |
|
| 828 | + // Truncate PR body to stay under GitHub's 65536 character limit |
| 829 | + // The full content is still written to the scaffold file |
| 830 | + const MAX_PR_BODY_LENGTH = 60000; // leave headroom for safety |
| 831 | + let prBody = scaffoldContent; |
| 832 | + if (prBody.length > MAX_PR_BODY_LENGTH) { |
| 833 | + const truncationNote = `\n\n---\n⚠️ **Report truncated** — full list is in the scaffold file (\`${filePath}\`) on the branch.\n[View workflow run](https://github.com/${owner}/${repo}/actions/runs/${context.runId})\n`; |
| 834 | + prBody = prBody.substring(0, MAX_PR_BODY_LENGTH - truncationNote.length) + truncationNote; |
| 835 | + } |
| 836 | +
|
827 | 837 | // Get the base branch ref |
828 | 838 | const baseRef = await github.rest.git.getRef({ |
829 | 839 | owner, |
@@ -961,7 +971,7 @@ jobs: |
961 | 971 | title: 'Fix broken links (Devin)', |
962 | 972 | head: branchName, |
963 | 973 | base: baseBranch, |
964 | | - body: scaffoldContent, |
| 974 | + body: prBody, |
965 | 975 | draft: true, |
966 | 976 | }); |
967 | 977 |
|
|
0 commit comments