Added an warning on status code 409

This commit is contained in:
Philipp Horstenkamp 2023-11-24 19:10:40 +01:00
parent 54c224ef33
commit 220e001fd3
Signed by: Philipp
GPG Key ID: DD53EAC36AFB61B4
1 changed files with 4 additions and 1 deletions

View File

@ -51,7 +51,10 @@ async function getAndPostPullRequests() {
headers,
body: JSON.stringify(postData),
});
if (postResponse.status === 409) {
core.warning("PR between the branches already exists.");
return;
}
if (!postResponse.ok) {
throw new Error(
`HTTP error! status on creating a new PR: ${postResponse.status}`,