From 273c4dd296049d4b9b85b6acf61fc9c439c0de57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Agust=C3=ADn=20Borgna?= <121866228+aborgna-q@users.noreply.github.com> Date: Wed, 23 Aug 2023 17:32:00 +0200 Subject: [PATCH] ci: Add Jira issue integration (#14) --- .github/workflows/issue.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/issue.yml diff --git a/.github/workflows/issue.yml b/.github/workflows/issue.yml new file mode 100644 index 0000000..3ec6e14 --- /dev/null +++ b/.github/workflows/issue.yml @@ -0,0 +1,35 @@ +name: New issue + +on: + issues: + types: [opened] + +jobs: + jira_task: + name: Create Jira issue + runs-on: ubuntu-22.04 + steps: + - name: Login + uses: atlassian/gajira-login@v3.0.1 + env: + JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }} + JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }} + JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }} + - name: Create Bug + uses: atlassian/gajira-create@v3.0.1 + if: "contains(github.event.issue.labels.*.name, 'bug')" + with: + project: TKET + issuetype: Bug + summary: « [tket-json-rs] ${{ github.event.issue.title }}» + description: ${{ github.event.issue.html_url }} + fields: '{"labels": ["tket-json-rs"]}' + - name: Create Task + uses: atlassian/gajira-create@v3.0.1 + if: "! contains(github.event.issue.labels.*.name, 'bug')" + with: + project: TKET + issuetype: Task + summary: « [tket-json-rs] ${{ github.event.issue.title }}» + description: ${{ github.event.issue.html_url }} + fields: '{"labels": ["tket-json-rs"]}'