Commit ba30919
committed
Skip auto-label flow when TRIGGER_STRING is unset
When TRIGGER_STRING is not configured, String.prototype.includes()
coerces undefined to the literal string "undefined". A PR body or
comment containing the word "undefined" could therefore falsely match
and trigger the auto-label flow.
Add an early-return guard at the top of the pull_request.opened and
issue_comment.created handlers — matching the existing AUTHORIZED_TEAM
check in isAuthorized — so an unset or empty TRIGGER_STRING disables
the trigger feature entirely instead of matching a coerced string.1 parent 285a65f commit ba30919
1 file changed
Lines changed: 11 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
213 | 217 | | |
214 | | - | |
| 218 | + | |
215 | 219 | | |
216 | 220 | | |
217 | 221 | | |
| |||
243 | 247 | | |
244 | 248 | | |
245 | 249 | | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
246 | 254 | | |
247 | | - | |
248 | | - | |
| 255 | + | |
| 256 | + | |
249 | 257 | | |
250 | 258 | | |
251 | 259 | | |
| |||
0 commit comments