mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-11 22:46:27 +00:00
fix(bitbucket): log warning when PR creation fails (#5474)
This commit is contained in:
parent
98f1308689
commit
30ee09ca4a
1 changed files with 20 additions and 15 deletions
|
@ -745,22 +745,27 @@ export async function createPr({
|
||||||
reviewers,
|
reviewers,
|
||||||
};
|
};
|
||||||
|
|
||||||
const prInfo = (
|
try {
|
||||||
await api.post(`/2.0/repositories/${config.repository}/pullrequests`, {
|
const prInfo = (
|
||||||
body,
|
await api.post(`/2.0/repositories/${config.repository}/pullrequests`, {
|
||||||
})
|
body,
|
||||||
).body;
|
})
|
||||||
// TODO: fix types
|
).body;
|
||||||
const pr: Pr = {
|
// TODO: fix types
|
||||||
number: prInfo.id,
|
const pr: Pr = {
|
||||||
displayNumber: `Pull Request #${prInfo.id}`,
|
number: prInfo.id,
|
||||||
isModified: false,
|
displayNumber: `Pull Request #${prInfo.id}`,
|
||||||
} as any;
|
isModified: false,
|
||||||
// istanbul ignore if
|
} as any;
|
||||||
if (config.prList) {
|
// istanbul ignore if
|
||||||
config.prList.push(pr);
|
if (config.prList) {
|
||||||
|
config.prList.push(pr);
|
||||||
|
}
|
||||||
|
return pr;
|
||||||
|
} catch (err) /* istanbul ignore next */ {
|
||||||
|
logger.warn({ err }, 'Error creating pull request');
|
||||||
|
throw err;
|
||||||
}
|
}
|
||||||
return pr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Reviewer {
|
interface Reviewer {
|
||||||
|
|
Loading…
Reference in a new issue