Created a first draft of this action. #14

Merged
Philipp merged 68 commits from draft into main 2023-11-19 23:21:49 +01:00
803 changed files with 54104 additions and 0 deletions
Showing only changes of commit 0f232d312e - Show all commits

View File

@ -48,22 +48,10 @@ async function getAndPostPullRequests() {
// core.info(`GET repsonse ${JSON.stringify(pulls, 2)}`); // core.info(`GET repsonse ${JSON.stringify(pulls, 2)}`);
// Logic to decide if a POST request is needed // Logic to decide if a POST request is needed
core.info(branch);
core.info(base_branch);
const targetPRFound = _.any( const targetPRFound = _.any(
pulls, pulls,
(pr) => pr.head.ref === branch && pr.base.ref === base_branch, (pr) => pr.head.ref === branch && pr.base.ref === base_branch,
); );
for (let pr of pulls) {
core.info(branch);
core.info(base_branch);
core.info(pr.head.ref);
core.info(pr.base.ref);
core.info(pr.base.ref === base_branch);
core.info(pr.head.ref === branch);
core.info(pr.head.ref === branch && pr.base.ref === base_branch);
}
if (!targetPRFound) { if (!targetPRFound) {
core.info( core.info(
`No open pulls found, to merge ${branch} into ${base_branch}. Trying to create a new PR.`, `No open pulls found, to merge ${branch} into ${base_branch}. Trying to create a new PR.`,