From 1afa03bd57fe5f30b2d08def325cbeea1f299650 Mon Sep 17 00:00:00 2001 From: Kimonas Sotirchos Date: Fri, 24 Nov 2023 15:01:26 +0200 Subject: [PATCH 1/2] Update GH files for issue templates and Jira automation This PR updates the .github files to * Ensure we have a file for tasks/enhancements * Ensure we expose dod in task issues * Use the FastAPI for ticket sync, and not JIRA_URL --- .github/.jira_sync_config.yaml | 31 +++++++++++++++++++++++++++ .github/ISSUE_TEMPLATE/task.yaml | 14 +++++++++--- .github/workflows/issues_to_jira.yaml | 17 --------------- 3 files changed, 42 insertions(+), 20 deletions(-) create mode 100644 .github/.jira_sync_config.yaml delete mode 100644 .github/workflows/issues_to_jira.yaml diff --git a/.github/.jira_sync_config.yaml b/.github/.jira_sync_config.yaml new file mode 100644 index 00000000..83cd771a --- /dev/null +++ b/.github/.jira_sync_config.yaml @@ -0,0 +1,31 @@ +settings: + # Jira project key to create the issue in + jira_project_key: "KF" + + # Dictionary mapping GitHub issue status to Jira issue status + status_mapping: + opened: Untriaged + closed: done + + # (Optional) GitHub labels. Only issues with one of those labels will be synchronized. + # If not specified, all issues will be synchronized + labels: + - bug + - enhancement + + # (Optional) (Default: false) Add a new comment in GitHub with a link to Jira created issue + add_gh_comment: true + + # (Optional) (Default: true) Synchronize issue description from GitHub to Jira + sync_description: true + + # (Optional) (Default: true) Synchronize comments from GitHub to Jira + sync_comments: false + + # (Optional) (Default: None) Parent Epic key to link the issue to + epic_key: "KF-4805" + + # (Optional) Dictionary mapping GitHub issue labels to Jira issue types. + # If label on the issue is not in specified list, this issue will be created as a Bug + label_mapping: + enhancement: Story diff --git a/.github/ISSUE_TEMPLATE/task.yaml b/.github/ISSUE_TEMPLATE/task.yaml index 8796a2d6..32685869 100644 --- a/.github/ISSUE_TEMPLATE/task.yaml +++ b/.github/ISSUE_TEMPLATE/task.yaml @@ -9,6 +9,14 @@ body: proposal! Before submitting your issue, please make sure there isn't already a prior issue concerning this. If there is, please join that discussion instead. + - type: textarea + id: enhancement-proposal-why + attributes: + label: Why it needs to get done + description: > + Describe why it needs to get done + validations: + required: true - type: textarea id: enhancement-proposal-what attributes: @@ -18,10 +26,10 @@ body: validations: required: true - type: textarea - id: enhancement-proposal-why + id: enhancement-proposal-dod attributes: - label: Why it needs to get done + label: When is the task considered done description: > - Describe why it needs to get done + Describe what are the requirements for the task to be considered done validations: required: true diff --git a/.github/workflows/issues_to_jira.yaml b/.github/workflows/issues_to_jira.yaml deleted file mode 100644 index d3e12646..00000000 --- a/.github/workflows/issues_to_jira.yaml +++ /dev/null @@ -1,17 +0,0 @@ -# this workflow requires to provide JIRA webhook URL via JIRA_URL GitHub Secret -# read more: https://support.atlassian.com/cloud-automation/docs/jira-automation-triggers/#Automationtriggers-Incomingwebhook -# original code source: https://github.com/beliaev-maksim/github-to-jira-automation - -name: Issues to JIRA - -on: - issues: - # available via github.event.action - types: [opened, reopened, closed] - -jobs: - update: - name: Update Issue - uses: beliaev-maksim/github-to-jira-automation/.github/workflows/issues_to_jira.yaml@master - secrets: - JIRA_URL: ${{ secrets.JIRA_URL }} From c63f33b8ef5490c0e26f77b988d9e615a5c86df7 Mon Sep 17 00:00:00 2001 From: Kimonas Sotirchos Date: Mon, 11 Dec 2023 17:46:45 +0200 Subject: [PATCH 2/2] review: Update task template --- .github/ISSUE_TEMPLATE/task.yaml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/task.yaml b/.github/ISSUE_TEMPLATE/task.yaml index 32685869..feafd50a 100644 --- a/.github/ISSUE_TEMPLATE/task.yaml +++ b/.github/ISSUE_TEMPLATE/task.yaml @@ -10,11 +10,12 @@ body: isn't already a prior issue concerning this. If there is, please join that discussion instead. - type: textarea - id: enhancement-proposal-why + id: enhancement-proposal-context attributes: - label: Why it needs to get done + label: Context description: > - Describe why it needs to get done + Describe why we should work on this task/enhancement, as well as + existing context we should be aware of validations: required: true - type: textarea @@ -23,13 +24,21 @@ body: label: What needs to get done description: > Describe what needs to get done + placeholder: | + 1. Look into X + 2. Implement Y + 3. Create file Z validations: required: true - type: textarea id: enhancement-proposal-dod attributes: - label: When is the task considered done + label: Definition of Done description: > - Describe what are the requirements for the task to be considered done + What are the requirements for the task to be considered done + placeholder: | + 1. We know how X works (spike) + 2. Code is doing Y + 3. Charm has functionality Z validations: required: true