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
[GitHub] Broaden redirects comment to include partial checks (cloudflare#23636)
* [GitHub] Broaden redirects comment to include partial checks
* update
* update
* update
* Update
* one more update
* missing quote
* update
* one more update
* update
* More indenation
* only grab filename for partials
* indentation
* Another
* remove trailing and leading slashes
* update
* one more
* flip line
* change link rendering
* final update
* ugh
* remove partial update
* partial only
* remove file changes
jq '.[] | select(.user.id == 41898282) | select(.body | contains("This PR changes current filenames or deletes current files")) | .id')
65
+
jq '.[] | select(.user.id == 41898282) | select(.body | contains("This PR requires additional review attention because it affects the following areas")) | .id')
51
66
52
67
# If the comment exists, delete it
53
68
if [ ! -z "$existing_comment_id" ]; then
@@ -58,18 +73,39 @@ jobs:
58
73
fi
59
74
else
60
75
# Construct the comment body for changed files
61
-
comment_body="This PR changes current filenames or deletes current files. Make sure you have [redirects](https://developers.cloudflare.com/pages/configuration/redirects/) set up to cover the following paths:"
62
-
for path in $CHANGED_FILES; do
63
-
clean_path=$(echo $path | sed 's/"//g') # Remove quotation marks
76
+
comment_body="This PR requires additional review attention because it affects the following areas:"
77
+
78
+
# Add CHANGED_FILES logic
79
+
if [ -n "$CHANGED_FILES" ]; then
64
80
comment_body="$comment_body
81
+
82
+
### Redirects
83
+
This PR changes current filenames or deletes current files. Make sure you have [redirects](https://developers.cloudflare.com/pages/configuration/redirects/) set up to cover the following paths:"
84
+
for path in $CHANGED_FILES; do
85
+
clean_path=$(echo "$path" | sed 's/"//g') # Remove quotation marks
86
+
comment_body="$comment_body
65
87
- [ ] \`$clean_path\`"
66
-
done
88
+
done
89
+
fi
90
+
91
+
# Conditional bit for PARTIAL_FILES
92
+
if [ -n "$PARTIAL_FILES" ]; then
93
+
comment_body="$comment_body
94
+
95
+
### Partials
96
+
This PR updates partial files, which are pieces of content used across multiple files in our [Render component](https://developers.cloudflare.com/style-guide/components/render/)."
97
+
for path in $PARTIAL_FILES; do
98
+
updated_path=$(echo "$path" | sed -e 's/"//g' -e 's/^\///' -e 's/\/$//')
0 commit comments