Skip to content

Commit 669dd98

Browse files
committed
Add comment explaining try/except purpose.
1 parent ba0a966 commit 669dd98

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/scripts/branch_pr_issue_closer.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,9 @@ def _main_prog():
237237
#First try assuming the string is just a number
238238
issue_num = int(first_word[1:]) #ignore "#" symbol
239239
except ValueError:
240-
#If not, then ignore last letter:
240+
#If not, then ignore the last character, in case the user
241+
#included punctutation (i.e. a space, comma, or period)
242+
#after the PR number:
241243
try:
242244
issue_num = int(first_word[1:-1])
243245
except ValueError:

0 commit comments

Comments
 (0)