From e3df07c2f106358b67177569e5d374c13becab13 Mon Sep 17 00:00:00 2001 From: taylorfries Date: Fri, 6 Oct 2023 10:02:32 -0700 Subject: [PATCH] Add date to parent summary --- .github/helpers/jira-api/create_tickets.py | 2 ++ .github/helpers/jira-api/refine_tickets.py | 8 +++++++- .github/workflows/app-npm-dep-check.yml | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/helpers/jira-api/create_tickets.py b/.github/helpers/jira-api/create_tickets.py index 6bc0f1020..ca107e984 100644 --- a/.github/helpers/jira-api/create_tickets.py +++ b/.github/helpers/jira-api/create_tickets.py @@ -27,6 +27,8 @@ ## Check max results vs. total results in get_summary_list ## Send 2 request when over 50 updates instead of trunkating. ## look into not using regex. +## set up env file for environment variables (level flags ect.) +## *** diagram for security and priv. ## ################################################################################################### diff --git a/.github/helpers/jira-api/refine_tickets.py b/.github/helpers/jira-api/refine_tickets.py index 49e0040aa..14e81beb9 100644 --- a/.github/helpers/jira-api/refine_tickets.py +++ b/.github/helpers/jira-api/refine_tickets.py @@ -2,6 +2,7 @@ import re import sys import json +import datetime ################################################################################################### ## @@ -43,6 +44,11 @@ def create_parent_ticket( project_key, updates ): parent_key (string): captures key of created ticket """ + # get current day and format as Mon DD, YYYY + today = datetime.date.today() + today = today.strftime("%b %d, %Y") + + # format the description of the parent ticket description = "Currently we have:\n" + \ "- " + str(len(updates[0])) + " Patch updates\n" + \ "- " + str(len(updates[1])) + " Minor updates\n" + \ @@ -56,7 +62,7 @@ def create_parent_ticket( project_key, updates ): "project": { "key": project_key }, - "summary": "Dependency Updates", + "summary": "Dependency Updates " + str(today), "description": description, "issuetype": { "name": "Task" diff --git a/.github/workflows/app-npm-dep-check.yml b/.github/workflows/app-npm-dep-check.yml index fab8321ce..9aee59d77 100644 --- a/.github/workflows/app-npm-dep-check.yml +++ b/.github/workflows/app-npm-dep-check.yml @@ -118,7 +118,7 @@ jobs: - name: execute py script env: - LEVEL_FLAGS: "PATCH MINOR MAJOR" # used to determine what updates to post + LEVEL_FLAGS: "MINOR MAJOR" # used to determine what updates to post JIRA_BOARD: "TES" # sets what JIRA board to post and pull from JIRA_API_KEY: ${{ secrets.JIRA_API_KEY }} # key used to access JIRA API ISSUE_BODY: ${{ env.ISSUE_BODY }} # dependency update list