gitsigns.nvim icon indicating copy to clipboard operation
gitsigns.nvim copied to clipboard

Add GitHub integration

Open alexmarucci opened this issue 2 years ago • 7 comments
trafficstars

Following up on the original PR https://github.com/lewis6991/gitsigns.nvim/pull/623

  • Added github_blame and github formatter config
  • Added PR info in line blame
  • Added PR number in line blame popup
  • If no PR is found, falls back to the std git blame

alexmarucci avatar Jul 16 '23 18:07 alexmarucci

Hi @lewis6991, I hope PRs are welcomed. This is a feature I wanted for a while now, so I thought giving it a go.

Let me know your thoughts, also I might need a hand with the failing tests. Unsure why they're failing to be fair.

Thank you

alexmarucci avatar Jul 16 '23 18:07 alexmarucci

Hi. PRs are definitely welcome, however I have a relatively high bar for new features (just to be warned).

I'll have a fair amount of feedback to give, but I'll need to test this first.

Like everyone, I'm pretty busy, spread quite thin across several projects and only limited time to work on open source stuff so it might be a while until I can look at this properly.

One thing I'll say now is that this feature must not affect the experience of the plugin on non-github repos and therefore should purely be additive.

I'm also not so sure about adding another formatter field to the config. The formatter (string version) was added without the consideration of optional fields, whereas a single function can handle all cases.

The plugin must also not try to call gh if it is not installed, not just simply ignore the error.

Other than that, this looks like a good start. :+1:

lewis6991 avatar Jul 16 '23 19:07 lewis6991

Hi. PRs are definitely welcome, however I have a relatively high bar for new features (just to be warned).

I'll have a fair amount of feedback to give, but I'll need to test this first.

Like everyone, I'm pretty busy, spread quite thin across several projects and only limited time to work on open source stuff so it might be a while until I can look at this properly.

One thing I'll say now is that this feature must not affect the experience of the plugin on non-github repos and therefore should purely be additive.

I'm also not so sure about adding another formatter field to the config. The formatter (string version) was added without the consideration of optional fields, whereas a single function can handle all cases.

The plugin must also not try to call gh if it is not installed, not just simply ignore the error.

Other than that, this looks like a good start. 👍

Nice, thank you for your feedback. That's totally fine, and I think I got enough to make few adjustments already 👍 I will see if I get some time to look into the failing tests.

In general, I see this as a starting point to make some progress on this feature following some directions from your side.

Speak soon 👋

alexmarucci avatar Jul 17 '23 16:07 alexmarucci

These changes seem very useful for people who work with Git and Github. Most of the time, we do want to see the git commit message for the current line of code, and we also want to see its related Github PR number so that we can refer it to see all the changes for that code. If this PR solves this issue, I would really appreciate getting it merged.

mechanicles avatar Nov 22 '23 14:11 mechanicles

These changes seem very useful for people who work with Git and Github. Most of the time, we do want to see the git commit message for the current line of code, and we also want to see its related Github PR number so that we can refer it to see all the changes for that code. If this PR solves this issue, I would really appreciate getting it merged.

Not sure why my reply got marked as spam but I really feel this PR is really useful.

mechanicles avatar Nov 22 '23 15:11 mechanicles

Commenting a PR is useful is spam.

lewis6991 avatar Nov 22 '23 15:11 lewis6991

Commenting a PR is useful is spam.

Ahh.. ok. Sorry for that. Did not know about it.

mechanicles avatar Nov 22 '23 15:11 mechanicles