Skip to content

Commit

Permalink
Merge pull request #105 from pwntester/add_reviews_to_prs
Browse files Browse the repository at this point in the history
Add review comments to PR buffers
  • Loading branch information
Alvaro Muñoz authored Mar 1, 2021
2 parents 50fba8b + 647bb62 commit 2bf0f47
Show file tree
Hide file tree
Showing 14 changed files with 1,513 additions and 748 deletions.
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 |
| | unresolve | Mark a review thread as unresolved |
| 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

0 comments on commit 2bf0f47

Please sign in to comment.