mirror of
https://github.com/actions/github-script.git
synced 2026-04-08 07:00:05 +00:00
Add @octokit/plugin-request-log, to produce debug output for requests
Without this plugin, the debug setting is, effectively, meaningless as none of the existing plugins produce log output. The plugin writes the request options to octokit.log.debug, and response times as *method path - status in ...ms* to octokit.log.info.
This commit is contained in:
parent
454e5d7e69
commit
d415b06b8c
5 changed files with 83 additions and 4 deletions
|
|
@ -4,6 +4,7 @@ import {context, getOctokit} from '@actions/github'
|
|||
import {defaults as defaultGitHubOptions} from '@actions/github/lib/utils'
|
||||
import * as glob from '@actions/glob'
|
||||
import * as io from '@actions/io'
|
||||
import {requestLog} from '@octokit/plugin-request-log'
|
||||
import {retry} from '@octokit/plugin-retry'
|
||||
import {RequestRequestOptions} from '@octokit/types'
|
||||
import fetch from 'node-fetch'
|
||||
|
|
@ -45,7 +46,7 @@ async function main(): Promise<void> {
|
|||
if (previews) opts.previews = previews.split(',')
|
||||
if (requestOpts) opts.request = requestOpts
|
||||
|
||||
const github = getOctokit(token, opts, retry)
|
||||
const github = getOctokit(token, opts, retry, requestLog)
|
||||
const script = core.getInput('script', {required: true})
|
||||
|
||||
// Using property/value shorthand on `require` (e.g. `{require}`) causes compilation errors.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue