File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -547,3 +547,24 @@ export extern "gh variable" [
547547 -- repo(-R) # Select another repository using the [HOST/]OWNER/REPO format
548548 -- help # Show help for command
549549]
550+
551+ export def "gh pr view inlined-comments" [
552+ pr ?: int
553+ repo ?: string # e.g. nushell/nu_scripts
554+ ] {
555+ # nushell/nu_scripts/pull/1105
556+ let pr = if ($pr == null ) { ^ gh pr view -- json number | from json | get number } else { $pr }
557+ let repo = if ($repo == null ) {
558+ ^ gh repo view -- json name ,owner | from json | select owner.login name | rename owner name
559+ } else {
560+ $repo | parse ' {owner}/{name}' | get 0
561+ }
562+
563+ ( (gh api
564+ -H " Accept: application/vnd.github+json"
565+ -H " X-GitHub-Api-Version: 2022-11-28"
566+ $" /repos/($repo.owner . )/($repo.name )/pulls/($pr )/comments" )
567+ | from json
568+ | select user.login body diff_hunk
569+ | rename user comment diff )
570+ }
You can’t perform that action at this time.
0 commit comments