Added an warning on status code 409
This commit is contained in:
parent
54c224ef33
commit
220e001fd3
5
index.js
5
index.js
@ -51,7 +51,10 @@ async function getAndPostPullRequests() {
|
|||||||
headers,
|
headers,
|
||||||
body: JSON.stringify(postData),
|
body: JSON.stringify(postData),
|
||||||
});
|
});
|
||||||
|
if (postResponse.status === 409) {
|
||||||
|
core.warning("PR between the branches already exists.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!postResponse.ok) {
|
if (!postResponse.ok) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`HTTP error! status on creating a new PR: ${postResponse.status}`,
|
`HTTP error! status on creating a new PR: ${postResponse.status}`,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user