forked from mirrors/probot
refactor: github.request(route, options) is so pretty
This commit is contained in:
parent
291824960c
commit
6dc8dccdf8
|
@ -58,10 +58,9 @@ export class ManifestCreation {
|
|||
|
||||
public async createAppFromCode (code: any) {
|
||||
const github = GitHubAPI()
|
||||
const response = await github.request({
|
||||
headers: { accept: 'application/vnd.github.fury-preview+json' },
|
||||
method: 'POST',
|
||||
url: `/app-manifests/${code}/conversions`
|
||||
const response = await github.request('POST /app-manifests/:code/conversions', {
|
||||
code,
|
||||
headers: { accept: 'application/vnd.github.fury-preview+json' }
|
||||
})
|
||||
|
||||
const { id, webhook_secret, pem } = response.data
|
||||
|
|
Loading…
Reference in New Issue