Skip to content

Commit

Permalink
Merge pull request #10 from gradio-app/handle-non-supported-events
Browse files Browse the repository at this point in the history
Handle non supported events
  • Loading branch information
pngwn authored Feb 7, 2024
2 parents 2e2a194 + 4f723c6 commit 8290d30
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions packages/find-pr/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,25 +191,15 @@ async function run() {
outputs.source_repo = `${owner}/${repo}`;
outputs.source_branch = "main";
outputs.pr_number = false;
outputs.sha = "main";
outputs.sha = context.sha;
outputs.mergeable = false;
outputs.merge_sha = "main";
outputs.merge_sha = context.sha;
outputs.labels = [];
warning(
"This action is not being run from a pull_request, push, or issue_comment event or a workflow_run event triggered from those events and so everything is defaulting to 'main' branch."
);
}

if (
outputs.source_branch === "main" &&
outputs.source_repo === `${owner}/${repo}`
) {
outputs.found_pr = false;

outputs.sha = "main";
outputs.merge_sha = "main";
}

console.log("PULL_REQUESTS", JSON.stringify(open_pull_requests, null, 2));
console.log("OUTPUTS", outputs);

Expand Down

0 comments on commit 8290d30

Please sign in to comment.