diff --git a/.github/comment-template.md b/.github/comment-template.md new file mode 100644 index 000000000..bf8b87a64 --- /dev/null +++ b/.github/comment-template.md @@ -0,0 +1 @@ +Howdy 🖐   {{ .author }} ! Thank you for your interest in this project. We value your feedback and will respond soon. \ No newline at end of file diff --git a/.github/workflows/issue-greeting.yaml b/.github/workflows/issue-greeting.yaml new file mode 100644 index 000000000..a44cb0418 --- /dev/null +++ b/.github/workflows/issue-greeting.yaml @@ -0,0 +1,32 @@ +name: Greeting + +on: + issues: + types: ["opened"] + +jobs: + greeting: + name: Send Greeting + runs-on: ubuntu-latest + # only send message to first-time contributors + if: github.event.issue.author_association == 'FIRST_TIME_CONTRIBUTOR' + + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 1 + + - name: Render template + id: template + uses: chuhlomin/render-template@v1.2 + with: + template: .github/comment-template.md + vars: | + author: ${{ github.actor }} + + - name: Create comment + uses: peter-evans/create-or-update-comment@v1 + with: + issue-number: ${{ github.event.issue.number }} + body: ${{ steps.template.outputs.result }}