From 379a38c5c838210ed5e09c6cee33aaec1a992a97 Mon Sep 17 00:00:00 2001 From: Will McGugan Date: Wed, 30 Nov 2022 12:19:50 +0700 Subject: [PATCH] added workflow --- .github/workflows/newissue.yml | 27 +++++++++++++++++++++++++++ faq.yml | 2 +- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/newissue.yml diff --git a/.github/workflows/newissue.yml b/.github/workflows/newissue.yml new file mode 100644 index 00000000..9b6665ec --- /dev/null +++ b/.github/workflows/newissue.yml @@ -0,0 +1,27 @@ +name: issues +on: + issues: + types: [opened] +jobs: + add-comment: + runs-on: ubuntu-latest + permissions: + issues: write + steps: + - uses: actions/checkout@v3 + with: + ref: main + - name: Install FAQtory + run: pip install FAQtory + - name: Run Suggest + run: faqtory suggest "${{ github.event.issue.title }}" > suggest.md + - name: Read suggest.md + id: suggest + uses: juliangruber/read-file-action@v1 + with: + path: ./suggest.md + - name: Suggest FAQ + uses: peter-evans/create-or-update-comment@a35cf36e5301d70b76f316e867e7788a55a31dae + with: + issue-number: ${{ github.event.issue.number }} + body: ${{ steps.suggest.outputs.content }} diff --git a/faq.yml b/faq.yml index 9ab9b58f..269911d6 100644 --- a/faq.yml +++ b/faq.yml @@ -1,6 +1,6 @@ # FAQtory settings -faq_url: "https://github.com/willmcgugan/faqtory/blob/main/FAQ.md" # Replace this with the URL to your FAQ.md! +faq_url: "https://github.com/textualize/rich/blob/main/FAQ.md" # Replace this with the URL to your FAQ.md! questions_path: "./questions" # Where questions should be stored output_path: "./FAQ.md" # Where FAQ.md should be generated