From 3c38860a45d4fe019da77c7d9d5f4efc3fe4f973 Mon Sep 17 00:00:00 2001 From: Julian Dehm Date: Wed, 16 Oct 2024 09:23:50 +0200 Subject: [PATCH] add gha test --- .../issue-template---example.md | 19 +++++++++++++++++++ .github/ISSUE_TEMPLATE/issue-template.md | 18 ++++++++++++++++++ .github/workflows/asana-link-pr-to-task.yml | 14 ++++++++++++++ .github/workflows/asana-notify-approved.yml | 17 +++++++++++++++++ .github/workflows/asana-notify-merged.yml | 15 +++++++++++++++ .github/workflows/asana-sync-issues.yml | 13 +++++++++++++ 6 files changed, 96 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/issue-template---example.md create mode 100644 .github/ISSUE_TEMPLATE/issue-template.md create mode 100644 .github/workflows/asana-link-pr-to-task.yml create mode 100644 .github/workflows/asana-notify-approved.yml create mode 100644 .github/workflows/asana-notify-merged.yml create mode 100644 .github/workflows/asana-sync-issues.yml diff --git a/.github/ISSUE_TEMPLATE/issue-template---example.md b/.github/ISSUE_TEMPLATE/issue-template---example.md new file mode 100644 index 0000000..6f3bf09 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/issue-template---example.md @@ -0,0 +1,19 @@ +--- +name: Issue template - Example +about: This is an example on how to use the template. For current use, better use + the other one. +title: '' +labels: '' +assignees: '' + +--- + +**URL:** https://speakup.digital/projects/feedback-fur-speakup/ +**user:** *moderator/ initiator/ participants/ visitors (non-logged-in)/ admin/ cms-editors/ developers* +**expected behaviour:** *Describe what you´d expect* +**behaviour:** *Describe the issue* +**important screensize:** *mobile? desktop?* +**device & browser:** *e.g. Desktop, firefox 68.0.2 (64-Bit)* +**Comment/Question:** *Is this easy to do? What ideas do you have? Would this be a story?* + +If needed or helpful you can add a screenshot. Since issues are public, make sure to not display personal or secret data. diff --git a/.github/ISSUE_TEMPLATE/issue-template.md b/.github/ISSUE_TEMPLATE/issue-template.md new file mode 100644 index 0000000..e684add --- /dev/null +++ b/.github/ISSUE_TEMPLATE/issue-template.md @@ -0,0 +1,18 @@ +--- +name: Issue template +about: Please, fill in this template in order to help us understand the issue better +title: '' +labels: '' +assignees: '' + +--- + +**URL:** +**user:** +**expected behaviour:** +**behaviour:** +**important screensize:** +**device & browser:** +**Comment/Question:** + +Screenshot? diff --git a/.github/workflows/asana-link-pr-to-task.yml b/.github/workflows/asana-link-pr-to-task.yml new file mode 100644 index 0000000..4d5fa7c --- /dev/null +++ b/.github/workflows/asana-link-pr-to-task.yml @@ -0,0 +1,14 @@ +on: + pull_request: + types: [opened, reopened] + +jobs: + sync: + runs-on: ubuntu-latest + steps: + - name: Add comment in Asana task + uses: duckduckgo/native-github-asana-sync@v1.1 + with: + asana-pat: ${{ secrets.GH_ASANA_SECRET }} + trigger-phrase: 'ATASK' + action: 'add-asana-comment' diff --git a/.github/workflows/asana-notify-approved.yml b/.github/workflows/asana-notify-approved.yml new file mode 100644 index 0000000..06edebc --- /dev/null +++ b/.github/workflows/asana-notify-approved.yml @@ -0,0 +1,17 @@ +name: Pull Request Reviewed + +on: + pull_request_review: + types: [submitted] + +jobs: + pr-reviewed: + if: github.event.review.state == 'approved' + runs-on: ubuntu-latest + steps: + - name: Update Asana task -> PR approved + uses: duckduckgo/native-github-asana-sync@v1.1 + with: + asana-pat: ${{ secrets.GH_ASANA_SECRET }} + trigger-phrase: "Task/Issue URL:" + action: 'notify-pr-approved' diff --git a/.github/workflows/asana-notify-merged.yml b/.github/workflows/asana-notify-merged.yml new file mode 100644 index 0000000..447e214 --- /dev/null +++ b/.github/workflows/asana-notify-merged.yml @@ -0,0 +1,15 @@ +on: + pull_request: + types: [closed] + +jobs: + add-pr-merged-comment: + runs-on: ubuntu-latest + steps: + - uses: duckduckgo/native-github-asana-sync@v1.1 + if: github.event.pull_request.merged + with: + asana-pat: ${{ secrets.GH_ASANA_SECRET }} + trigger-phrase: 'ATASK' + action: 'notify-pr-merged' + is-complete: true diff --git a/.github/workflows/asana-sync-issues.yml b/.github/workflows/asana-sync-issues.yml new file mode 100644 index 0000000..e8677a1 --- /dev/null +++ b/.github/workflows/asana-sync-issues.yml @@ -0,0 +1,13 @@ +on: + issues: + types: [opened, reopened] + +jobs: + sync: + runs-on: ubuntu-latest + steps: + - uses: duckduckgo/native-github-asana-sync@v1.1 + with: + asana-pat: ${{ secrets.GH_ASANA_SECRET }} + asana-project: ${{ vars.GH_ASANA_PROJECT_ID }} + action: 'create-asana-issue-task'