added workflow

This commit is contained in:
Will McGugan 2022-11-30 12:19:50 +07:00
parent 084412d854
commit 379a38c5c8
2 changed files with 28 additions and 1 deletions

27
.github/workflows/newissue.yml vendored Normal file
View File

@ -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 }}

View File

@ -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