We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6ea39a7 commit 76300a7Copy full SHA for 76300a7
lib/github-secret.js
@@ -3,7 +3,7 @@ const crypto = require('crypto')
3
const secret = process.env.GITHUB_WEBHOOK_SECRET || 'hush-hush'
4
5
function sign (data) {
6
- const buffer = new Buffer(data, 'utf8')
+ const buffer = Buffer.from(data, 'utf8')
7
return 'sha1=' + crypto.createHmac('sha1', secret).update(buffer).digest('hex')
8
}
9
0 commit comments