Skip to content

Instantly share code, notes, and snippets.

@gr2m
Last active September 23, 2017 01:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gr2m/48ad793b3fb7dbb59bcd696bbf75baee to your computer and use it in GitHub Desktop.
Save gr2m/48ad793b3fb7dbb59bcd696bbf75baee to your computer and use it in GitHub Desktop.

Local setup

git clone git@gist.github.com:48ad793b3fb7dbb59bcd696bbf75baee.git github-lock-issue-test
cd github-lock-issue-test
npm install
node github-lock-issue-test.js

Should log

REQUEST:  { host: 'api.github.com',
  port: 443,
  path: '/repos/gr2m/sandbox/issues/6/lock',
  method: 'put',
  headers: 
   { host: 'api.github.com',
     'content-length': 0,
     'content-type': 'application/json; charset=utf-8',
     'user-agent': 'NodeJS HTTP Client',
     accept: 'application/vnd.github.v3+json' },
  ca: undefined,
  family: undefined }
const GitHub = require('octokit/node-github#collaborators-test')
const github = new GitHub({
debug: true
})
github.issues.lock({
owner: 'gr2m',
repo: 'sandbox',
number: 6
})
{
"name": "48ad793b3fb7dbb59bcd696bbf75baee",
"version": "1.0.0",
"description": "",
"main": "github-lock-issue-test.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+ssh://git@gist.github.com/48ad793b3fb7dbb59bcd696bbf75baee.git"
},
"keywords": [],
"author": "",
"license": "ISC",
"bugs": {
"url": "https://gist.github.com/48ad793b3fb7dbb59bcd696bbf75baee"
},
"homepage": "https://gist.github.com/48ad793b3fb7dbb59bcd696bbf75baee",
"dependencies": {
"github": "github:octokit/node-github#collaborators-test"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment