Skip to content

Commit 77ac115

Browse files
maximevtushaarongarciah
andauthoredFeb 11, 2025··
[core] Fix typo on Netlify script (#45278)
Signed-off-by: Maxim Evtush <[email protected]> Signed-off-by: Aarón García Hervás <[email protected]> Co-authored-by: Aarón García Hervás <[email protected]>
1 parent a442c35 commit 77ac115

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed
 

‎netlify/functions/feedback-management.mts

+12-14
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ app.action<BlockAction<ButtonAction>>('delete_action', async ({ ack, body, clien
106106

107107
const channelId = channel?.id;
108108

109-
const { comment, currentLocationURL = '', commmentSectionURL = '' } = JSON.parse(value);
109+
const { comment, currentLocationURL = '', commentSectionURL = '' } = JSON.parse(value);
110110

111111
const googleAuth = new JWT({
112112
email: 'service-account-804@docs-feedbacks.iam.gserviceaccount.com',
@@ -121,7 +121,7 @@ app.action<BlockAction<ButtonAction>>('delete_action', async ({ ack, body, clien
121121
range: 'Deleted messages!A:D',
122122
valueInputOption: 'USER_ENTERED',
123123
resource: {
124-
values: [[username, comment, currentLocationURL, commmentSectionURL]],
124+
values: [[username, comment, currentLocationURL, commentSectionURL]],
125125
},
126126
});
127127

@@ -150,7 +150,7 @@ app.action('save_message', async ({ ack, body, client, logger }) => {
150150
} = body as BlockAction<ButtonAction>;
151151

152152
const channelId = channel?.id;
153-
const { comment, currentLocationURL = '', commmentSectionURL = '' } = JSON.parse(value);
153+
const { comment, currentLocationURL = '', commentSectionURL = '' } = JSON.parse(value);
154154

155155
const googleAuth = new JWT({
156156
email: 'service-account-804@docs-feedbacks.iam.gserviceaccount.com',
@@ -165,7 +165,7 @@ app.action('save_message', async ({ ack, body, client, logger }) => {
165165
range: 'Sheet1!A:D',
166166
valueInputOption: 'USER_ENTERED',
167167
updates: {
168-
values: [[username, comment, currentLocationURL, commmentSectionURL]],
168+
values: [[username, comment, currentLocationURL, commentSectionURL]],
169169
},
170170
});
171171

@@ -198,24 +198,22 @@ export const handler: Handler = async (event, context, callback) => {
198198
rating,
199199
comment,
200200
currentLocationURL,
201-
commmentSectionURL: inCommmentSectionURL,
202-
commmentSectionTitle,
201+
commentSectionURL: inCommentSectionURL,
202+
commentSectionTitle,
203203
githubRepo,
204204
productId,
205205
} = data;
206206

207207
// The design feedback alert was removed in https://github.com/mui/material-ui/pull/39691
208208
// This dead code is here to simplify the creation of special feedback channel
209-
const isDesignFeedback = inCommmentSectionURL.includes('#new-docs-api-feedback');
210-
const commmentSectionURL = isDesignFeedback ? '' : inCommmentSectionURL;
209+
const isDesignFeedback = inCommentSectionURL.includes('#new-docs-api-feedback');
210+
const commentSectionURL = isDesignFeedback ? '' : inCommentSectionURL;
211211

212212
const simpleSlackMessage = [
213213
`New comment ${rating === 1 ? '👍' : ''}${rating === 0 ? '👎' : ''}`,
214214
`>${comment.split('\n').join('\n>')}`,
215215
`sent from ${currentLocationURL}${
216-
commmentSectionTitle
217-
? ` (from section <${commmentSectionURL}|${commmentSectionTitle})>`
218-
: ''
216+
commentSectionTitle ? ` (from section <${commentSectionURL}|${commentSectionTitle})>` : ''
219217
}`,
220218
].join('\n\n');
221219

@@ -224,7 +222,7 @@ export const handler: Handler = async (event, context, callback) => {
224222
body: `Feedback received:
225223
${comment}
226224
227-
from ${commmentSectionURL}
225+
from ${commentSectionURL}
228226
`,
229227
});
230228

@@ -260,7 +258,7 @@ from ${commmentSectionURL}
260258
value: JSON.stringify({
261259
comment,
262260
currentLocationURL,
263-
commmentSectionURL,
261+
commentSectionURL,
264262
}),
265263
action_id: 'save_message',
266264
},
@@ -273,7 +271,7 @@ from ${commmentSectionURL}
273271
value: JSON.stringify({
274272
comment,
275273
currentLocationURL,
276-
commmentSectionURL,
274+
commentSectionURL,
277275
}),
278276
style: 'danger',
279277
action_id: 'delete_action',

0 commit comments

Comments
 (0)
Please sign in to comment.