From cbfcc37a4623018dbf10da03e129260916d33e44 Mon Sep 17 00:00:00 2001
From: Patrik Svensson <patrik@patriksvensson.se>
Date: Tue, 4 Oct 2022 21:55:16 +0200
Subject: [PATCH] Add new and transferred issues to project

When a new issue is created or an issue is transferred
from another project, we add the issue to the Spectre.Console project
(https://github.com/orgs/spectreconsole/projects/1).
---
 .github/workflows/backlog.yaml | 18 ++++++++++++++++++
 .github/workflows/ci.yaml      |  2 +-
 2 files changed, 19 insertions(+), 1 deletion(-)
 create mode 100644 .github/workflows/backlog.yaml

diff --git a/.github/workflows/backlog.yaml b/.github/workflows/backlog.yaml
new file mode 100644
index 0000000..a70fbaf
--- /dev/null
+++ b/.github/workflows/backlog.yaml
@@ -0,0 +1,18 @@
+# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
+name: Add issues/PRs to backlog automatically
+
+on:
+  issues:
+    types:
+      - opened
+      - transferred
+
+jobs:
+  add-to-project:
+    name: Add issue to backlog
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/add-to-project@main
+        with:
+          project-url: https://github.com/orgs/spectreconsole/projects/1
+          github-token: ${{ secrets.PROJECT_TOKEN }}
\ No newline at end of file
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index 8f355aa..91baa84 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -1,5 +1,5 @@
 # yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
-name: Continuous Integration
+name: Pull Request
 on: pull_request
 
 env: