We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f357b0b commit a265a1aCopy full SHA for a265a1a
1 file changed
src/index.ts
@@ -1,6 +1,12 @@
1
import { Octokit } from "@octokit/action";
2
import { readFileSync } from "fs";
3
4
+// if the action is triggered by not a pull request, exit
5
+if (!process.env.GITHUB_REF?.startsWith("refs/pull/")) {
6
+ console.log("Not a pull request, exiting.");
7
+ process.exit(0);
8
+}
9
+
10
const octokit = new Octokit();
11
12
const [owner, repo] = process.env.GITHUB_REPOSITORY?.split("/")!;
0 commit comments