From 3b5e0ff2868352d7bdf74735335c41094ee59ad3 Mon Sep 17 00:00:00 2001 From: simatec Date: Wed, 6 Nov 2024 11:42:43 +0100 Subject: [PATCH] (simatec) Issue Action added --- .github/workflows/new-issue.yml | 54 +++++++++++++++++++++++++++++++++ README.md | 1 + 2 files changed, 55 insertions(+) create mode 100644 .github/workflows/new-issue.yml diff --git a/.github/workflows/new-issue.yml b/.github/workflows/new-issue.yml new file mode 100644 index 0000000..6b4539e --- /dev/null +++ b/.github/workflows/new-issue.yml @@ -0,0 +1,54 @@ +# v0.5 +name: New issue + +on: + issues: + types: [opened] + +jobs: + issueCreated: + runs-on: ubuntu-latest + if: ${{ !github.event.issue.pull_request && !startsWith(github.event.issue.title, 'Update stable version in repo') }} + permissions: + issues: write + steps: + - name: Setup node + id: setup_node + uses: actions/setup-node@v4 + with: + node-version: 20 + - name: Get package name + id: get_package_name + uses: ASzc/change-string-case-action@v6 + with: + string: ${{ github.event.repository.name }} + - name: Get NPM version + id: get_npm_version + run: echo "LATEST_VERSION=$(npm view ${{ steps.get_package_name.outputs.lowercase }}@latest version)" >> "$GITHUB_OUTPUT" + - name: Create comment + id: create_comment_ok + if: ${{ contains(github.event.issue.body, steps.get_npm_version.outputs.LATEST_VERSION) }} + uses: peter-evans/create-or-update-comment@v4 + with: + issue-number: ${{ github.event.issue.number }} + body: | + Thanks for reporting a new issue @${{ github.actor }}! + 1. Please make sure your topic is not covered in the [German documentation](https://github.com/${{ github.event.repository.full_name }}/blob/v${{ steps.get_npm_version.outputs.LATEST_VERSION }}/Readme.md) + 2. Please attach all necessary log files (in debug mode!), screenshots and other information to reproduce this issue + 3. [Search for the issue topic](https://github.com/${{ github.event.repository.full_name }}/issues?q=is%3Aissue) in other/closed issues to avoid duplicates! + ---- + *Otherwise this issue will be closed.* + - name: Create comment (beta version) + id: create_comment_version + if: ${{ !contains(github.event.issue.body, steps.get_npm_version.outputs.LATEST_VERSION) }} + uses: peter-evans/create-or-update-comment@v4 + with: + issue-number: ${{ github.event.issue.number }} + body: | + Thanks for reporting a new issue @${{ github.actor }}! + 1. Please make sure your topic is not covered in the [German documentation](https://github.com/${{ github.event.repository.full_name }}/blob/v${{ steps.get_npm_version.outputs.LATEST_VERSION }}/Readme.md) + 2. Please attach all necessary log files (in debug mode!), screenshots and other information to reproduce this issue + 3. [Search for the issue topic](https://github.com/${{ github.event.repository.full_name }}/issues?q=is%3Aissue) in other/closed issues to avoid duplicates! + 4. Ensure that you use the latest available **beta version** of this adapter (not the current stable version): **${{ steps.get_npm_version.outputs.LATEST_VERSION }}** + ---- + *Otherwise this issue will be closed.* \ No newline at end of file diff --git a/README.md b/README.md index bcb5467..f3322d1 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,7 @@ You must enter these in the configuration of the adapter. ### **WORK IN PROGRESS** * (simatec) Dependencies updated * (simatec) Fix jsonConfig +* (simatec) Issue Action added ## Changelog ### 0.2.4 (2024-09-28)