File tree Expand file tree Collapse file tree 2 files changed +32
-4
lines changed
Expand file tree Collapse file tree 2 files changed +32
-4
lines changed Original file line number Diff line number Diff line change 11import urllib .request , json
2+ from datetime import datetime , timezone , timedelta
3+
24req = urllib .request .Request ("https://api.github.com/repos/devspace-sh/devspace/issues?state=open&sort=created&direction=desc&per_page=40" )
35req .add_header ('User-Agent' , 'python-urllib' )
6+
47try :
58 with urllib .request .urlopen (req ) as response :
69 data = json .loads (response .read ().decode ())
10+
11+ three_months_ago = datetime .now (timezone .utc ) - timedelta (days = 90 )
12+
13+ print ("===== RECENT OPEN ISSUES (NO PRS, UNASSIGNED) =====" )
14+ count = 0
715 for issue in data :
8- if issue ['number' ] in [3179 , 3174 , 3106 ]:
9- print (f"--- ISSUE #{ issue ['number' ]} ---" )
10- print (issue ['body' ][:1000 ])
16+ # Skip if PR
17+ if "pull_request" in issue :
18+ continue
19+
20+ # Skip if assigned
21+ if issue .get ("assignees" ):
22+ continue
23+
24+ # Check date
25+ created_at = datetime .strptime (issue ['created_at' ], "%Y-%m-%dT%H:%M:%SZ" ).replace (tzinfo = timezone .utc )
26+ if created_at < three_months_ago :
27+ continue
28+
29+ print (f"\n [{ issue ['number' ]} ] { issue ['title' ]} (Created: { issue ['created_at' ].split ('T' )[0 ]} )" )
30+ print (f"URL: { issue ['html_url' ]} " )
31+ # Print first 200 chars of body
32+ body_preview = (issue ['body' ] or "" )[:200 ].replace ('\n ' , ' ' ).replace ('\r ' , '' )
33+ print (f"Excerpt: { body_preview } ..." )
34+
35+ count += 1
36+ if count >= 10 :
37+ break
38+
1139except Exception as e :
1240 print (e )
Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ import (
1010 "github.com/loft-sh/devspace/pkg/devspace/config/versions/latest"
1111 devspacecontext "github.com/loft-sh/devspace/pkg/devspace/context"
1212 dependencyutil "github.com/loft-sh/devspace/pkg/devspace/dependency/util"
13- "github.com/loft-sh/devspace/pkg/devspace/helm/generic"
1413 "github.com/loft-sh/devspace/pkg/devspace/helm/downloader"
14+ "github.com/loft-sh/devspace/pkg/devspace/helm/generic"
1515 "github.com/loft-sh/devspace/pkg/devspace/helm/types"
1616 "github.com/loft-sh/devspace/pkg/util/log"
1717 "github.com/pkg/errors"
You can’t perform that action at this time.
0 commit comments