Commit graph

43 commits

Author SHA1 Message Date
Folke Lemaitre
dec29f5566
fix(gh): rendering of markdown comments. Closes #2488
Some checks failed
CI / ci (push) Has been cancelled
2025-11-09 21:32:18 +01:00
Folke Lemaitre
a2716102c8
fix(gh.scratch): if scratch would hide the cursor, then scroll preview up taking scrolloff into account. See #2480 2025-11-09 10:35:15 +01:00
Folke Lemaitre
acc41322de
style: luals 2025-11-09 09:45:04 +01:00
Folke Lemaitre
021855cf29
feat(gh): added cycle win and scrolling to scratch buffers when opened in a picker. Closes #2480 2025-11-09 09:34:28 +01:00
Folke Lemaitre
06e9ca95f8
fix(gh): render gh comments as markdown when displaying in a non-markdown buffer. Closes #2481 2025-11-09 08:38:43 +01:00
Folke Lemaitre
6900f3feaa
fix(gh): set default scratch height=15 and fix bottom offset for custom height 2025-11-08 09:25:33 +01:00
Folke Lemaitre
a6a967810e
feat(gh): open scratch buffers at the bottom of the window. Closes #2476 2025-11-08 09:15:41 +01:00
Folke Lemaitre
717073df1a
fix(gh): better integration with render-markdown. Closes #2467 2025-11-08 07:50:48 +01:00
Folke Lemaitre
27153d31e8
refactor(gh): shortcuts 2025-11-08 07:30:35 +01:00
Folke Lemaitre
c6ab18964b
feat(gh): make copilot authors as bots 2025-11-08 07:19:55 +01:00
Folke Lemaitre
fe20e95780
fix(gh): diff comment action should only show when available 2025-11-08 06:51:36 +01:00
Folke Lemaitre
ac5f497005
feat(gh): added Start Review. Closes #2463 2025-11-07 15:08:56 +01:00
Folke Lemaitre
1ba0bf8a10
fix(gh.item): timestamps should be in UTC, not local time 2025-11-07 15:08:56 +01:00
Folke Lemaitre
f1c7f62f9f
feat(gh): special formatting for code suggestions in review comments. See #2463 2025-11-07 06:51:39 +01:00
Folke Lemaitre
e896fb93f6
feat(gh): when selecting lines in a diff to add a review comment, you can now suggest code changes. See #2463 2025-11-07 06:37:04 +01:00
Folke Lemaitre
85bf3f0123
feat(gh): create review comments in GitHub PR diff, on diff lines. Closes #2446 2025-11-06 22:04:47 +01:00
Folke Lemaitre
c3bda8709a
feat(picker.gh_diff): you can now reply to review comments in diffs with a. See #2446 2025-11-06 18:35:57 +01:00
Folke Lemaitre
6e16c85212
refactor(picker): generalize line meta data in vim.b.snacks_meta 2025-11-06 18:01:37 +01:00
Folke Lemaitre
7a15e16d01
fix(gh): properly handly pending requests 2025-11-06 16:57:21 +01:00
Folke Lemaitre
cd0d6fe864
fix(gh): use lua to parse dates so we can do this in a fast context 2025-11-06 16:16:03 +01:00
Folke Lemaitre
c83ff8d598
feat(gh): add inline review comment annotations to diff viewer
Refactors the diff renderer to support displaying GitHub review comments
inline with the relevant diff lines. Links review comments to specific
file positions using reviewThreads data from the GraphQL API, enabling a
more intuitive code review experience directly within the diff view.

- Refactored gh/api.lua to async fetch review comments and threads
- Added annotation support to diff renderer with context object pattern
- Separated diff parsing from formatting for better maintainability
- Integrated review comment positioning via reviewThreads linkage

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-06 12:00:29 +01:00
Folke Lemaitre
93cd1175e6
refactor(gh): render cleanup 2025-11-06 06:50:21 +01:00
Folke Lemaitre
1848d74e7c
fix(gh): only skip empty comment reviews. Closes #2445 2025-11-05 08:39:27 +01:00
Folke Lemaitre
13edbc681c
fix(gh): pass correct context in gh_perform_action. Closes #2442. Closes #2443 2025-11-05 07:11:30 +01:00
Folke Lemaitre
714edec900
feat(gh): use new diff renderer for gh pr reviews 2025-11-04 22:22:17 +01:00
Folke Lemaitre
2e2cf50514
refactor(picker.highlight): added render and set now uses render with append=true 2025-11-03 18:52:45 +01:00
Folke Lemaitre
1b3e4090a0
fix(gh): input for api should be a table, not a string. Closes #2427 2025-11-03 17:13:24 +01:00
Folke Lemaitre
765d50e820
style: stylua 2025-11-03 12:51:54 +01:00
Jonas Dyrlie
8bb3ad6c53
fix: revert rename of actions.lua to tomdar87@outlook.com (#2423)
## Description

<!-- Describe the big picture of your changes to communicate to the
maintainers
  why we should accept this pull request. -->
  
Seems like an unintentional change from this PR
https://github.com/folke/snacks.nvim/pull/2419
  
```
  Lua callback: ....local/share/nvim/lazy/snacks.nvim/lua/snacks/gh/buf.lua:1: module 'snacks.gh.actions' not found:
	no field package.preload['snacks.gh.actions']
	cache_loader: module 'snacks.gh.actions' not found
	cache_loader_lib: module 'snacks.gh.actions' not found
```

## Related Issue(s)

<!--
  If this PR fixes any issues, please link to the issue here.
  - Fixes #<issue_number>
-->

## Screenshots

<!-- Add screenshots of the changes if applicable. -->
2025-11-03 08:37:20 +01:00
Folke Lemaitre
52d544cc64
fix(gh.item): better method to extract repo from gh url. Closes #2418 2025-11-03 08:16:26 +01:00
Tom Darneix
f75f307af3
feat(gh): allow to update pr branch (#2419)
## Description

This adds a new gh cli actions that update a PR branch using `gh
update-branch <pr>`

## Related Issue(s)

None

## Screenshots


https://github.com/user-attachments/assets/d6b5f1f6-bb49-4b58-8f74-ce527cdeb9d1
2025-11-03 08:02:20 +01:00
Folke Lemaitre
bd3c1a0714
fix(gh): better way of determining current PR
Some checks are pending
CI / ci (push) Waiting to run
2025-11-02 21:07:42 +01:00
Folke Lemaitre
50436373c2
fix(gh.api): get repo from upstream remote if availble. fallback to origin 2025-11-02 20:04:41 +01:00
Folke Lemaitre
a4f2b9da2d
feat(gh): when on a review comment, the gh_comment action will now do a reply instead of a top-level comment. Fixes #2410 2025-11-02 18:09:08 +01:00
Folke Lemaitre
d0d10f6d13
feat(gh): you can now use Snacks.picker.gh_actions() directly to see actions for the checked out PR 2025-11-02 12:31:29 +01:00
Folke Lemaitre
07c569dfd5
fix(gh.diff): fixed rendering of diff header when wrap=true 2025-11-02 10:23:39 +01:00
Folke Lemaitre
78046eb481
fix(gh.api): pass repo to cmd. Closes #2415 2025-11-02 09:39:33 +01:00
Folke Lemaitre
1335ca1956
feat(gh): added reviews and nice diffs to gh buffer views. See #2411 2025-11-02 09:24:41 +01:00
Folke Lemaitre
6f60105302
fix(gh.render): use check name. See #2407
Some checks are pending
CI / ci (push) Waiting to run
2025-11-01 16:14:43 +01:00
Folke Lemaitre
74864a7bb8
fix(gh.render): added support for older StatusContext checks. Closes #2407 2025-11-01 15:59:03 +01:00
Folke Lemaitre
60fb588af1
docs: added gh docs 2025-11-01 13:29:29 +01:00
Folke Lemaitre
d94184d1d9
fix(gh): add action idx to gh_actions text
Some checks are pending
CI / ci (push) Waiting to run
2025-11-01 13:07:22 +01:00
Folke Lemaitre
85b8ec2109
feat(gh): new gh (GitHub cli) integration
## Description

<!-- Describe the big picture of your changes to communicate to the
maintainers
  why we should accept this pull request. -->

## Related Issue(s)

<!--
  If this PR fixes any issues, please link to the issue here.
  - Fixes #<issue_number>
-->

## Screenshots

<!-- Add screenshots of the changes if applicable. -->
2025-11-01 12:12:06 +01:00