Financial-Times / nori

🍙 exploratory command-line tool to make changes across multiple repositories & track their progress
MIT License
11 stars 0 forks source link

Status 422 when the pull request already exists #65

Closed sjparkinson closed 5 years ago

sjparkinson commented 5 years ago
{ HttpError: Validation Failed
    at response.text.then.message (/Users/samuel.parkinson/Repositories/Financial-Times/transformation-runner/node_modules/@octokit/request/lib/request.js:56:27)
    at processTicksAndRejections (internal/process/task_queues.js:86:5)
  name: 'HttpError',
  status: 422,
  headers:
   { 'access-control-allow-origin': '*',
     'access-control-expose-headers':
      'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type',
     connection: 'close',
     'content-length': '184',
     'content-security-policy': "default-src 'none'",
     'content-type': 'application/json; charset=utf-8',
     date: 'Thu, 11 Apr 2019 15:46:15 GMT',
     'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin',
     server: 'GitHub.com',
     status: '422 Unprocessable Entity',
     'strict-transport-security': 'max-age=31536000; includeSubdomains; preload',
     'x-accepted-oauth-scopes': '',
     'x-content-type-options': 'nosniff',
     'x-frame-options': 'deny',
     'x-github-media-type': 'github.inertia-preview; format=json',
     'x-github-request-id': '7C48:0D53:0E1A:1FA3:5CAF6147',
     'x-oauth-scopes': 'repo',
     'x-ratelimit-limit': '5000',
     'x-ratelimit-remaining': '4960',
     'x-ratelimit-reset': '1555001014',
     'x-xss-protection': '1; mode=block' },
  request:
   { method: 'POST',
     url:
      'https://api.github.com/repos/Financial-Times/n-content-body/pulls',
     headers:
      { accept: 'application/vnd.github.inertia-preview+json',
        'user-agent': 'octokit.js/16.19.0 Node.js/11.13.0 (macOS Mojave; x64)',
        authorization: 'token [REDACTED]',
        'content-type': 'application/json; charset=utf-8' },
     body:
      '{"head":"unpin-ngage-patch","base":"master","title":"Unpin @financial-times/n-gage","body":""}',
     request: { validate: [Object] } },
  errors:
   [ { resource: 'PullRequest', field: 'head', code: 'invalid' } ],
  documentation_url:
   'https://developer.github.com/v3/pulls/#create-a-pull-request' }