Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
renovate
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
Renovate Bot
renovate
Commits
9675bd6d
Commit
9675bd6d
authored
6 years ago
by
Rhys Arkins
Browse files
Options
Downloads
Patches
Plain Diff
fix(github): graphql parsing
parent
d907bd4b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/platform/github/gh-got-wrapper.js
+6
-4
6 additions, 4 deletions
lib/platform/github/gh-got-wrapper.js
with
6 additions
and
4 deletions
lib/platform/github/gh-got-wrapper.js
+
6
−
4
View file @
9675bd6d
...
@@ -80,13 +80,15 @@ async function get(path, options, retries = 5) {
...
@@ -80,13 +80,15 @@ async function get(path, options, retries = 5) {
}
}
// istanbul ignore if
// istanbul ignore if
if
(
method
===
'
POST
'
&&
path
===
'
graphql
'
)
{
if
(
method
===
'
POST
'
&&
path
===
'
graphql
'
)
{
if
(
res
.
errors
&&
retries
>
0
)
{
const
goodResult
=
'
{"data":{
'
;
if
(
res
.
body
.
startsWith
(
goodResult
))
{
if
(
retries
===
0
)
{
logger
.
info
(
'
Recovered graphql query
'
);
}
}
else
if
(
retries
>
0
)
{
logger
.
info
(
'
Retrying graphql query
'
);
logger
.
info
(
'
Retrying graphql query
'
);
return
get
(
path
,
opts
,
0
);
return
get
(
path
,
opts
,
0
);
}
}
if
(
res
.
data
&&
retries
===
0
)
{
logger
.
info
(
'
Recovered graphql query
'
);
}
}
}
return
res
;
return
res
;
}
catch
(
err
)
{
}
catch
(
err
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment