From c28e309368f62f554fa4fc867f46e9b4d1834df1 Mon Sep 17 00:00:00 2001 From: Patrick Dinh Date: Thu, 4 May 2023 22:25:39 +1000 Subject: [PATCH] Add workflows to sync issues with Zendesk --- .github/workflows/issue_closed.yml | 12 ++++++++++++ .github/workflows/issue_commented.yml | 12 ++++++++++++ .github/workflows/issue_labelled.yml | 12 ++++++++++++ .github/workflows/zendesk_github_add_comment.yml | 11 +++++++++++ .github/workflows/zendesk_github_close_issue.yml | 11 +++++++++++ 5 files changed, 58 insertions(+) create mode 100644 .github/workflows/issue_closed.yml create mode 100644 .github/workflows/issue_commented.yml create mode 100644 .github/workflows/issue_labelled.yml create mode 100644 .github/workflows/zendesk_github_add_comment.yml create mode 100644 .github/workflows/zendesk_github_close_issue.yml diff --git a/.github/workflows/issue_closed.yml b/.github/workflows/issue_closed.yml new file mode 100644 index 00000000..80399eac --- /dev/null +++ b/.github/workflows/issue_closed.yml @@ -0,0 +1,12 @@ +name: Solve zendesk ticket when the issue is closed +on: + issues: + types: [closed] +jobs: + issue_closed: + uses: algorandfoundation/gh_zendesk_sync/.github/workflows/github_zendesk_issue_closed.yml@main + with: + ZENDESK_TENANT_NAME: ${{ vars.ZENDESK_TENANT_NAME }} + ISSUE_LABEL: makerx + secrets: + ZENDESK_AUTH_TOKEN: ${{ secrets.ZENDESK_AUTH_TOKEN }} diff --git a/.github/workflows/issue_commented.yml b/.github/workflows/issue_commented.yml new file mode 100644 index 00000000..17c7c292 --- /dev/null +++ b/.github/workflows/issue_commented.yml @@ -0,0 +1,12 @@ +name: Add comment to zendesk ticket on GitHub issue commented +on: + issue_comment: + types: [created] +jobs: + issue_closed: + uses: algorandfoundation/gh_zendesk_sync/.github/workflows/github_zendesk_issue_commented.yml@main + with: + ZENDESK_TENANT_NAME: ${{ vars.ZENDESK_TENANT_NAME }} + ISSUE_LABEL: makerx + secrets: + ZENDESK_AUTH_TOKEN: ${{ secrets.ZENDESK_AUTH_TOKEN }} diff --git a/.github/workflows/issue_labelled.yml b/.github/workflows/issue_labelled.yml new file mode 100644 index 00000000..d8689d11 --- /dev/null +++ b/.github/workflows/issue_labelled.yml @@ -0,0 +1,12 @@ +name: Create Zendesk ticket when an issue is labelled with makerx +on: + issues: + types: [labeled] +jobs: + issue_created: + uses: algorandfoundation/gh_zendesk_sync/.github/workflows/github_zendesk_issue_labelled.yml@main + with: + ZENDESK_TENANT_NAME: ${{ vars.ZENDESK_TENANT_NAME }} + ISSUE_LABEL: makerx + secrets: + ZENDESK_AUTH_TOKEN: ${{ secrets.ZENDESK_AUTH_TOKEN }} diff --git a/.github/workflows/zendesk_github_add_comment.yml b/.github/workflows/zendesk_github_add_comment.yml new file mode 100644 index 00000000..07f0c1b4 --- /dev/null +++ b/.github/workflows/zendesk_github_add_comment.yml @@ -0,0 +1,11 @@ +name: Add comment to GitHub issue on Zendesk ticket commented +on: + repository_dispatch: + types: + - zendesk_github_add_comment +permissions: + issues: write +jobs: + add-comment: + name: Add comment to issue + uses: algorandfoundation/gh_zendesk_sync/.github/workflows/zendesk_github_add_comment.yml@main diff --git a/.github/workflows/zendesk_github_close_issue.yml b/.github/workflows/zendesk_github_close_issue.yml new file mode 100644 index 00000000..42d33d73 --- /dev/null +++ b/.github/workflows/zendesk_github_close_issue.yml @@ -0,0 +1,11 @@ +name: Close GitHub issue on Zendesk ticket solved +on: + repository_dispatch: + types: + - zendesk_github_close_issue +permissions: + issues: write +jobs: + close_issue: + name: Close GitHub issue + uses: algorandfoundation/gh_zendesk_sync/.github/workflows/zendesk_github_close_issue.yml@main