* Remove unnecessary submodules recursion * Move issue checker to Python script * Add workflow dispatch to test issue support workflow
44 lines
1.4 KiB
YAML
44 lines
1.4 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:
|
|
check-issue-tech-support:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Check if issue requires tech support
|
|
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
|
|
});
|