Conversation
| ungitBindIp: '127.0.0.1', | ||
|
|
||
| // example { "/home/projects/ungit" : "https://github.com/FredrikNoren/ungit/commit/%H" } use %H for full commit hash and %h for short commit hash | ||
| linkToCommit: {}, |
There was a problem hiding this comment.
So we should need to do this, we could just extract from the remote repo location right?
from there we can derive the url path
There was a problem hiding this comment.
No we can't, one repo may have many remotes (ie. one for github and one for heroku) so we can't decide which one win over the other. And some remotes can be privates (ie. git.example.com) and we can't derive the url path
There was a problem hiding this comment.
Oh yea, you are absolutely right. but I bet most repos have single remote and conjunction with this map override method, it would be much better user experience
| | | ||
| <span data-bind="text: sha1.substr(0, 8)"></span> | ||
| <!-- ko if: commitLink() --> | ||
| <a data-bind="text: sha1.substr(0, 8), attr: { href: commitLink(), target: '_blank' }"></a> |
There was a problem hiding this comment.
Click operation is being hijacked for in other components for handling node click and node unclicks. You would have to touch up on CommitViewModel.prototype.stopClickPropagation()
a6c34a2 to
ada40f5
Compare
Fixes #1118
This PR adds a new config
commitLinkto the.ungitrcof the form:%hand%Hare used respectively for short sha1 hash and sha1 hash (as in git format)If this config is not set the behaviour of ungit doesn't change otherwise the sha1 of the commit component is clickable and link to the interpolated url.
I have an issue with the commit component because links (mailto included) are no clickable and I haven't figured out why.
Todos: