Skip to content

Commit

Permalink
chore: Fix github-pr-title-lint script github PR page parsing error
Browse files Browse the repository at this point in the history
Added an explicit `response.setEncoding('utf8')` to make sure the http
response data encoding is set to utf8 (otherwise we fail to parse the
title because the separator character would not be the one we expect).
  • Loading branch information
rpl committed Feb 7, 2022
1 parent d1a050c commit 86c4ff8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/github-pr-title-lint
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ function getPullRequestTitle() {
return;
}

response.setEncoding('utf8');

var body = '';
response.on('data', function(data) {
try {
Expand Down

0 comments on commit 86c4ff8

Please sign in to comment.