this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

:art: Format code

+36 -5
+1 -1
issurge/interactive.py
··· 1 - from .parser import Issue, parse 1 + from .parser import Issue 2 2 3 3 4 4 def create_issue(words: str) -> Issue:
+8 -2
issurge/main_test.py
··· 155 155 ) 156 156 assert len(subprocess.run.mock_calls) == 0 157 157 158 - @test("issues are submitted when --dry-run is not passed, in interactive mode, github provider") 158 + 159 + @test( 160 + "issues are submitted when --dry-run is not passed, in interactive mode, github provider" 161 + ) 159 162 def _(_=setup, opts=default_opts): 160 163 run( 161 164 opts=opts ··· 180 183 ], 181 184 ] 182 185 183 - @test("issues are submitted when --dry-run is not passed, in interactive mode, gitlab provider") 186 + 187 + @test( 188 + "issues are submitted when --dry-run is not passed, in interactive mode, gitlab provider" 189 + ) 184 190 def _(_=setup, opts=default_opts): 185 191 Issue._get_remote_url = Mock( 186 192 return_value=urlparse("https://gitlab.com/ewen-lbh/gh-api-playground")
+4 -2
issurge/parser.py
··· 233 233 ) -> list[Issue]: 234 234 if not cli_options: 235 235 cli_options = {} 236 - log = lambda *args, **kwargs: debug( 236 + log = lambda *args, **kwargs: print( 237 237 f"[white]{issue_fragment[:50]: <50}[/white]\t{TAB*recursion_depth}", 238 238 *args, 239 239 **kwargs, ··· 242 242 if issue_fragment.strip().startswith("//"): 243 243 log(f"[yellow bold]Skipping comment[/]") 244 244 return [] 245 + log(f"Inheriting from {current_issue.display()}") 245 246 current_title = current_issue.title 246 247 current_description = current_issue.description 247 248 current_labels = set(current_issue.labels) ··· 255 256 current_title = parsed.title 256 257 current_labels |= parsed.labels 257 258 current_assignees |= parsed.assignees 258 - current_milestone = parsed.milestone 259 + if parsed.milestone: 260 + current_milestone = parsed.milestone 259 261 if expecting_description: 260 262 if children is None: 261 263 raise ValueError(f"Expected a description after {issue_fragment!r}")
+20
issurge/parser_test.py
··· 117 117 ) 118 118 ], 119 119 ), 120 + ( 121 + """%milestone_test @me 122 + \t~notsure do this 123 + \t~important do that 124 + """, 125 + [ 126 + Issue( 127 + title="do this", 128 + labels={"notsure"}, 129 + assignees={"me"}, 130 + milestone="milestone_test", 131 + ), 132 + Issue( 133 + title="do that", 134 + labels={"important"}, 135 + assignees={"me"}, 136 + milestone="milestone_test", 137 + ), 138 + ], 139 + ), 120 140 ]: 121 141 122 142 @test(f"parse issues from {textwrap.dedent(lines)!r}")
+3
issurge/utils.py
··· 1 1 from rich import print 2 2 import os 3 3 4 + 4 5 def debugging(): 5 6 return os.environ.get("ISSURGE_DEBUG") 7 + 6 8 7 9 def dry_running(): 8 10 return os.environ.get("ISSURGE_DRY_RUN") 11 + 9 12 10 13 def debug(*args, **kwargs): 11 14 if os.environ.get("ISSURGE_DEBUG"):