diff --git a/src/automations.ts b/src/automations.ts
new file mode 100644
index 00000000..ad9c703a
--- /dev/null
+++ b/src/automations.ts
@@ -0,0 +1,27 @@
+import { readFile } from "fs-extra";
+import { join } from "path";
+import { Octokit } from "@octokit/rest";
+import { config } from "dotenv";
+config();
+
+const createAutomatedIssue = async () => {
+ const octokit = new Octokit({
+ auth: process.env.AUTOMATION_TOKEN,
+ });
+ const body = await readFile(join(".", "src", "issue-template.md"), "utf8");
+ const owner = "AnandChowdhary";
+ const repo = "status";
+ try {
+ await octokit.issues.create({
+ owner,
+ repo,
+ title: "⚠️ Add `workflow` scope to your personal access token",
+ body: body.replace("{{TEAM}}", owner),
+ labels: ["bug", "upptime-automated"],
+ });
+ console.log("Created an issue in", owner, repo);
+ } catch (error) {
+ console.log("Got an error in creating this issue", error);
+ }
+};
+createAutomatedIssue();
diff --git a/src/issue-template.md b/src/issue-template.md
index 40a3a8a0..6c8f8800 100644
--- a/src/issue-template.md
+++ b/src/issue-template.md
@@ -15,4 +15,4 @@ Related links:
- Issue for this change: [upptime/upptime#81](https://github.com/upptime/upptime/issues/81)
- Updated docs: https://upptime.js.org/docs/get-started#add-repository-secrets
-_Psst,_ this is an automated issue because of a breaking change you need to be aware of. Issues like this will be opened very infrequently (I promise no spam!). However, if you want to disable these completely, you can set `disableAutomatedIssues: true` in your `.upptimerc` configuration file, but note that you'll have to fix your breaking changes manually by reviewing the [upptime/upptime](https://github.com/upptime/upptime) repository. Thanks for using Upptime! — @AnandChowdhary
+_Psst,_ this is an automated issue because of a breaking change you need to be aware of. Issues like this will be opened very infrequently (I promise no spam!). However, if you want to disable these completely, you can set `disableAutomatedIssues: true` in your `.upptimerc.yml` configuration file, but note that you'll have to fix your breaking changes manually by reviewing the [upptime/upptime](https://github.com/upptime/upptime) repository. Thanks for using Upptime! — @AnandChowdhary