Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/devwithkrishna/programatically-create-jira-issues-from-github

Create jira issues like stories epic sub tasks etc from GitHub
https://github.com/devwithkrishna/programatically-create-jira-issues-from-github

atlassian atlassian-python-api dependabot github-workflow jira poetry python3

Last synced: about 2 months ago
JSON representation

Create jira issues like stories epic sub tasks etc from GitHub

Awesome Lists containing this project

README

        

# programatically-create-jira-issues-from-githu
Programatically create jira issues from Github

# What code does

* The code leverages `atlassian-python-api`sdk along with python to create jira issues like `Task (Story)`, `Sub Task`, `Epic`

# Parameters required for program

| Argument | Description | Mandatory or not |
| ---------|---------------------------------------------------|------------------|
| type_of_issue | Type of issue like Epic, sub task or story (Task) | ✅ |
| jira_board | In which Jira board you want to create issues | ✅ |
| epic_key | Epic id if story needs to be attached | ❌ |
| summary | Issue summary | ✅ |
| description | Issue description | ✅ |
| story_key | Jira story key to attach sub task | ❌ |

## Installation (How to use it locally)

1. Clone the repository:

```bash
git clone
cd
```

2. Install the required Python packages:

* If poetry is not installed locally, do `pip install poetry`

then,
```bash
poetry install
```

have a look here - https://python-poetry.org/

3. Create a `.env` file in the root directory and add your Jira credentials:

```plaintext
JIRA_URL=
JIRA_USERNAME=
JIRA_PASSWORD=
```
##### **_Ensure that your Jira credentials are correctly set in the .env file._**

## Usage

To run the script, use the following command:

```bash
python .py --type_of_issue --jira_board --summary --description [--epic_key ] [--story_key ]
```

## Example Commands
Create an Epic:

```bash
python create_jira_issue.py --type_of_issue Epic --jira_board BOARD_KEY --summary "Epic Summary" --description "Epic Description"
```

Create a Task under an Epic:

```bash
python create_jira_issue.py --type_of_issue Task --jira_board BOARD_KEY --epic_key EPIC_KEY --summary "Task Summary" --description "Task Description"
```

Create a Subtask under a Task:

```bash
python create_jira_issue.py --type_of_issue Subtask --jira_board BOARD_KEY --story_key STORY_KEY --summary "Subtask Summary" --description "Subtask Description"
```