Skip to content

Commit de000c9

Browse files
DEVOPS-68 updated readme
1 parent 986cf02 commit de000c9

File tree

3 files changed

+38
-2
lines changed

3 files changed

+38
-2
lines changed

README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,40 @@
11
# automatically-create-github-issuea-when-advanced-scanning-detects-an-issue
22
Automatically created jira issues whenever there is a issue detected by CodeQL analysis
3+
4+
# How the code works
5+
6+
![diagram.jpg](diagram.jpg)
7+
8+
* repo.py --> this will retrieve all the repositories in github organization and pass it to github_scanning.py
9+
* github_scanning.py --> basically this will retrieve the dependabot alerts from github
10+
* jira.py --> this file is used for multiple purposes
11+
* retrieve all tasks under a epic
12+
* create task on epic with summary and description
13+
14+
* common_utils.py --> character limit for description and summary
15+
* compare tasks in epic and dependabot alters to make sure no duplicate stories are created
16+
* date_time.py --> returns the date time
17+
18+
19+
# Parameters
20+
| parameter name | description | required |
21+
|----------------|--------------|---------|
22+
| epic_key | jira epic key | :heavy_check_mark: |
23+
| organization | github organization name | :heavy_check_mark:|
24+
25+
26+
# credentials used
27+
28+
`JIRA_PASSWORD`, `JIRA_URL`, `JIRA_USERNAME`, `GH_TOKEN` are used for authentication for `Jira` and `GitHub`
29+
30+
31+
**Poetry is used for package management**
32+
33+
## How to run code in local
34+
35+
* clone the repository and `cd github-automatically-create-jira-issues-when-advanced-scanning-detects-an-issue`
36+
* pass the necessary parameters like `epic_key` and `organization` name
37+
38+
```commandline
39+
python3 jira.py --epic_key DEVOPS-245 --organization devwithkrishna
40+
```

diagram.jpg

17 KB
Loading

github_scanning.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import os
22
from dotenv import load_dotenv
3-
# from jira import create_story_under_epic
4-
from date_time import date_time
53
import requests
64

75
def scan_for_dependabot_alerts_and_issues(organization: str, repository: str):

0 commit comments

Comments
 (0)