deskflow/.github/workflows/issue-check-support.yml

50 lines
1.6 KiB
YAML

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
env:
ISSUE_BODY: ${{ github.event.issue.body || github.event.inputs.issue_body }}
ISSUE_NUMBER: ${{ github.event.issue.number || github.event.inputs.issue_number }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python venv
uses: ./.github/actions/init-python
with:
cache-key: "issue-check-support"
- name: Check issue
id: issue-check
run: ./scripts/github.py --issue-check-tech-support
- 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 || process.env.ISSUE_NUMBER,
body: process.env.COMMENT_BODY
});