From b82a898651b3ffae0a2be292e3aea7a03d962cb9 Mon Sep 17 00:00:00 2001 From: dennis-avesani-zupit Date: Mon, 8 Apr 2024 13:40:41 +0200 Subject: [PATCH 1/2] docs: add jira create todo issues and add description to PR workflows docs --- README.md | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/README.md b/README.md index d9e29a1b..45041982 100644 --- a/README.md +++ b/README.md @@ -1653,6 +1653,68 @@ jobs: BRANCH_OR_COMMIT_TITLE: ${{ github.event.workflow_run.head_commit.message }} secrets: inherit ``` +#### Jira Add Description to PR + +###### Workflow +**jira-add-description-to-pr.yml** is the workflow that adds the Jira issue description to the pull request description. + +It requires these secrets: + +- **GITHUB_TOKEN**: The GitHub token to allow the workflow to make changes to the pull request. +- **JIRA_BASE_URL**: the JIRA url. +- **JIRA_USER_EMAIL**: the JIRA user account email. +- **JIRA_API_TOKEN**: the token to login the Jira user account email. + +In addition, it is possible to specify this optional inputs: + +- **RUN_ON**: the _label_ to select the correct _github-runner_ that will execute this workflow. Default is **zupit-agents**. +- **RUNNERS_CONTAINER_GROUP**: The runners group used to execute this workflow. Default is **Container**. +- **DIND_IMAGE**: Docker image to use. Default is docker:26.0.0-dind. + +This is an example to show how data should be formatted. +```yaml +jobs: + jira-description: + uses: + zupit-it/pipeline-templates/.github/workflows/jira-add-description-to-pr.yml@v1.21.4 + secrets: inherit +``` + +#### Jira Create TODO Issues + +###### Workflow +**jira-step-create-todo-issues.yml** is the workflow that creates Jira issues based on the TODO comments in the code. + +It requires these inputs: + +- **PROJECT_KEY**: the Jira project key. + +It requires these secrets: + +- **GITHUB_TOKEN**: The GitHub token to allow the workflow to make changes to the pull request. +- **JIRA_BASE_URL**: the JIRA url. +- **JIRA_USER_EMAIL**: the JIRA user account email. +- **JIRA_API_TOKEN**: the token to login the Jira user account email. + +In addition, it is possible to specify this optional inputs: + +- **RUN_ON**: the _label_ to select the correct _github-runner_ that will execute this workflow. Default is **zupit-agents**. +- **RUNNERS_CONTAINER_GROUP**: The runners group used to execute this workflow. Default is **Container**. +- **DIND_IMAGE**: Docker image to use. Default is docker:26.0.0-dind. +- **ISSUE_TYPE**: The type of the issue to create. Default is Task. +- **ISSUE_DESCRIPTION**: The description of the issue to create. Default is "Created automatically via GitHub Actions". +- **LINK**: A link to put in the issue description. Default is an empty string. + +This is an example to show how data should be formatted. +```yaml +jobs: + jira-create-todo-issue: + uses: zupit-it/pipeline-templates/.github/workflows/jira-step-create-todo-issues.yml@v1.21.4 + with: + PROJECT_KEY: DDSO + LINK: ${{ github.event.compare }} + secrets: inherit +``` --- From 9737c16a66cff43ba3b5381cacb4118e5cf68b43 Mon Sep 17 00:00:00 2001 From: dennis-avesani-zupit Date: Mon, 8 Apr 2024 13:43:06 +0200 Subject: [PATCH 2/2] docs: refactor --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 45041982..50b7934e 100644 --- a/README.md +++ b/README.md @@ -1660,7 +1660,7 @@ jobs: It requires these secrets: -- **GITHUB_TOKEN**: The GitHub token to allow the workflow to make changes to the pull request. +- **GITHUB_TOKEN**: The GitHub token to allow the workflow to make changes to the pull request. - **JIRA_BASE_URL**: the JIRA url. - **JIRA_USER_EMAIL**: the JIRA user account email. - **JIRA_API_TOKEN**: the token to login the Jira user account email. @@ -1691,7 +1691,7 @@ It requires these inputs: It requires these secrets: -- **GITHUB_TOKEN**: The GitHub token to allow the workflow to make changes to the pull request. +- **GITHUB_TOKEN**: The GitHub token to allow the workflow to make changes to the pull request. - **JIRA_BASE_URL**: the JIRA url. - **JIRA_USER_EMAIL**: the JIRA user account email. - **JIRA_API_TOKEN**: the token to login the Jira user account email.