Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
pngwn committed Jan 31, 2024
1 parent 8839aa0 commit 58becbb
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions packages/find-pr/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,25 @@ async function run() {
return;
}

console.log("EVENT NAME", context.eventName);
console.log("WORKFLOW EVENT TYPE", context.payload.workflow_run.event);

if (
context.payload.workflow_run.event === "pull_request" ||
context.payload.workflow_run.event === "push"
) {
const { source_repo, source_branch, pr_number, sha, mergeable, merge_sha } =
get_pr_details_from_refs(open_pull_requests);

console.log({
source_repo,
source_branch,
pr_number,
sha,
mergeable,
merge_sha,
});

outputs.source_repo = source_repo || false;
outputs.source_branch = source_branch || false;
outputs.pr_number = pr_number ?? false;
Expand Down Expand Up @@ -235,6 +247,8 @@ function get_pr_details_from_sha(pull_requests: PullRequests): PRDetails {
sha: head_sha,
};

console.log("get_pr_details_from_sha", outputs);

return { ...empty_pr_details, ...outputs };
}

Expand Down

0 comments on commit 58becbb

Please sign in to comment.