name: Check if tech support issue on: issues: types: [opened] workflow_dispatch: inputs: issue_number: description: "Issue number" required: true issue_body: description: "Issue body" required: true jobs: issue-check-support: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Setup Python venv uses: ./.github/actions/init-python with: cache-key: "check-support" - name: Check issue id: issue-check run: ./scripts/github.py --issue-check-tech-support env: ISSUE_BODY: ${{ github.event.issue.body || github.event.inputs.issue_body }} - name: Add comment for customer if: steps.issue-check.outputs.may-need-tech-support == 'true' env: COMMENT_BODY: | Hello, as a customer, you're entitled to tech support which is included in your license. Please [raise a support ticket](https://symless.com/synergy/contact) if you'd like to take advantage of that. If that works for you, then please let us know your ticket number so we can continue the discussion there. uses: actions/github-script@v6 with: script: | github.rest.issues.createComment({ owner: context.repo.owner, repo: context.repo.repo, issue_number: context.issue.number || github.event.inputs.issue_number, body: process.env.COMMENT_BODY });