Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add review comments to PR buffers #105

Merged
merged 27 commits into from
Mar 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
ffb5c1b
add review comments to pull request query
pwntester Feb 24, 2021
806c032
initial implementation of review comments in PR buffer
pwntester Feb 24, 2021
f3cc55e
better sorting/grouping of review/reviewthreads
pwntester Feb 25, 2021
d686206
multifold suppport + thread header stub
pwntester Feb 25, 2021
1bdf9bd
prettified diff hunk visualization on review threads
pwntester Feb 25, 2021
c2a7240
pretify thread header
pwntester Feb 25, 2021
6097106
update README
pwntester Feb 26, 2021
abbd01f
add some test conceals for GH emojis
pwntester Feb 26, 2021
b7cca29
Add initial working impl for review/threads in PR buffers
pwntester Feb 26, 2021
75fe99f
use v3 REST API to post thread replies
pwntester Feb 27, 2021
4fea563
refactor calls to nvim_buf_set_virtual_text
pwntester Feb 27, 2021
06622ff
use timelineitems to fetch sorted timeline events
pwntester Feb 27, 2021
684de67
fomatting
pwntester Feb 27, 2021
c424b8d
fix error in Pull request telescope preview
pwntester Feb 27, 2021
347d022
fix typo
pwntester Feb 27, 2021
3680100
prevent NPE
pwntester Feb 27, 2021
7f34456
markdown everywhere!
pwntester Feb 28, 2021
a7acd2a
prevent delimimate crash on review submit buffer
pwntester Feb 28, 2021
172f339
add new HL groups
pwntester Feb 28, 2021
b1cfbc4
some work on signs
pwntester Feb 28, 2021
34fefa1
Use a different background for editable blocks
pwntester Mar 1, 2021
607c5e7
add new emoji support batch
pwntester Mar 1, 2021
b6743b0
remove comment buffer header
pwntester Mar 1, 2021
4b7258a
escape double quotes on graphql api parameters
pwntester Mar 1, 2021
348bb3b
allow unescaped queries
pwntester Mar 1, 2021
597e2f8
use float window for adding comments
pwntester Mar 1, 2021
647bb62
do not set comment buffer as not modified
pwntester Mar 1, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ There is only an `Octo <object> <action> [arguments]` command:
| gist | list | [repo] [key=value]*<br>[Available keys](https://cli.github.com/manual/gh_gist_list): `repo`\|`public`\|`secret`<br>Mappings:<br>`<CR>`: Append Gist to buffer<br>`<C-b>`: Opens Gist in web browser |
| comment | add | |
| | delete | |
| | resolve | |
| | unresolve | |
| thread | resolve| Mark a review thread as resolved |
pwntester marked this conversation as resolved.
Show resolved Hide resolved
| | unresolve | Mark a review thread as unresolved |
pwntester marked this conversation as resolved.
Show resolved Hide resolved
Comment on lines +64 to +65
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

asfas

| label | add | <label> |
| | delete | <label> |
| assignees| add | <assignee> |
Expand Down Expand Up @@ -178,14 +178,16 @@ Just edit the issue title, description or comments as a regular buffer and use `
| Name | Default |
| --- | --- |
| `OctoNvimDirty` | `ErrorMsg` |
| `OctoNvimCommentHeading` | `PreProc` |
| `OctoNvimCommentUser` | `Underlined` |
| `OctoNvimUser` | `String` |
| `OctoNvimIssueTitle` | `PreProc` |
| `OctoNvimIssueId` | `Question` |
| `OctoNvimIssueOpen` | `MoreMsg` |
| `OctoNvimIssueClosed` | `ErrorMsg` |
| `OctoNvimEmpty` | `Comment` |
| `OctoNvimFloat` | `NormalNC` |
| `OctoNvimDate` | `Comment` |
| `OctoNvimSymbol` | `Comment` |
| `OctoNvimTimelineItemHeading`| `Comment` |
| `OctoNvimBubbleRed` | `DiffDelete`.fg |
| `OctoNvimBubbleGreen` | `DiffAdd`.fg |
| `OctoNvimBubbleDelimiter` | `NormalFloat`.bg |
Expand All @@ -200,6 +202,7 @@ Just edit the issue title, description or comments as a regular buffer and use `
| `OctoNvimPullAdditions` | `DiffAdd` |
| `OctoNvimPullDeletions` | `DiffDelete` |
| `OctoNvimPullModifications` | `DiffChange` |
| `OctoNvimEditable` | `NormalFloat`.bg|

## Settings

Expand Down
31 changes: 22 additions & 9 deletions after/syntax/octo_issue.vim
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,38 @@ if exists('b:current_syntax')
unlet b:current_syntax
endif

syntax include @markdown syntax/markdown.vim
unlet b:current_syntax

syntax region issue_comment matchgroup=OctoNvimCommentDelimiters start=/commented:\n\n/ keepend end=/\n\n\n/ contains=@markdown
syntax region issue_comment matchgroup=OctoNvimCommentDelimiters start=/\n\n/ keepend end=/\n\n\nOn/ contains=@markdown

hi def link OctoNvimDirty ErrorMsg
hi def link OctoNvimCommentHeading PreProc
hi def link OctoNvimCommentUser String
hi def link OctoNvimUser String
hi def link OctoNvimIssueOpen MoreMsg
hi def link OctoNvimIssueClosed ErrorMsg
hi def link OctoNvimIssueMerged Keyword
hi def link OctoNvimIssueId Question
hi def link OctoNvimIssueTitle PreProc
hi def link OctoNvimEmpty Comment
hi def link OctoNvimFloat NormalFloat
hi def link OctoNvimTimelineItemHeading Comment
hi def link OctoNvimSymbol Comment
hi def link OctoNvimDate Comment
hi def link OctoNvimDetailsLabel Title
hi def link OctoNvimMissingDetails Comment
hi def link OctoNvimDetailsValue Identifier
hi def link OctoNvimMissingDetails Comment

call matchadd('Conceal', ':heart:', 10, -1, {'conceal':'❤️'})
call matchadd('Conceal', ':+1:', 10, -1, {'conceal':'👍'})
call matchadd('Conceal', ':see_no_evil:', 10, -1, {'conceal':'🙈'})
call matchadd('Conceal', ':laughing:', 10, -1, {'conceal':'😆'})
call matchadd('Conceal', ':thinking_face:', 10, -1, {'conceal':'🤔'})
call matchadd('Conceal', ':thinking:', 10, -1, {'conceal':'🤔'})
call matchadd('Conceal', ':ok_hand:', 10, -1, {'conceal':'👌'})
call matchadd('Conceal', ':upside_down_face:', 10, -1, {'conceal':'🙃'})
call matchadd('Conceal', ':grimacing:', 10, -1, {'conceal':'😬'})
call matchadd('Conceal', ':rocket:', 10, -1, {'conceal':'🚀'})
call matchadd('Conceal', ':blush:', 10, -1, {'conceal':'😊'})
call matchadd('Conceal', ':tada:', 10, -1, {'conceal':'🎉'})
call matchadd('Conceal', ':shrug:', 10, -1, {'conceal':'🤷'})
call matchadd('Conceal', ':man_shrugging:', 10, -1, {'conceal':'🤷'})
call matchadd('Conceal', ':face_palm:', 10, -1, {'conceal':'🤦'})
call matchadd('Conceal', ':man_facepalmin:', 10, -1, {'conceal':'🤦'})

" restore current syntax value
if exists('old_syntax')
Expand Down
Loading