{"id":17968227,"url":"https://github.com/seletskiy/ash","last_synced_at":"2025-03-25T09:30:38.172Z","repository":{"id":18364929,"uuid":"21545188","full_name":"seletskiy/ash","owner":"seletskiy","description":"Atlassian Stash (Bitbucket) reviews in editor","archived":false,"fork":false,"pushed_at":"2017-04-04T07:59:07.000Z","size":126,"stargazers_count":21,"open_issues_count":4,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-20T00:22:02.628Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/seletskiy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-07-06T17:49:57.000Z","updated_at":"2018-11-24T21:37:31.000Z","dependencies_parsed_at":"2022-08-28T15:33:54.916Z","dependency_job_id":null,"html_url":"https://github.com/seletskiy/ash","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seletskiy%2Fash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seletskiy%2Fash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seletskiy%2Fash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seletskiy%2Fash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seletskiy","download_url":"https://codeload.github.com/seletskiy/ash/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245435007,"owners_count":20614811,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-29T14:20:39.004Z","updated_at":"2025-03-25T09:30:38.159Z","avatar_url":"https://github.com/seletskiy.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"Who ever wants a documentation if there is a gif?\n\n![gif explain basics](https://cloud.githubusercontent.com/assets/674812/4304381/4135dc04-3e70-11e4-8bcd-979fc8bd4946.gif)\n\nInstallation\n============\n\nNow `ash` is available only from `go get`:\n\n```\ngo get github.com/seletskiy/ash\n```\n\nAfter that, `ash` executable should be available for use.\n\nImportant note\n==============\n\n`ash` is in a development phase, so it can crash unexpectedly.\n\n*However*, all data you've entered will *not* be lost and will kept even\nin case of crash.\n\nIf you experience a crash, *please*, fill an issue and attach `ash` debug\noutput (using `--debug=2` cmd line flag) and review file caused a crash.\n\nWhy\n===\n\nThere is a couple points:\n\n* Stash web-interface is, well, slow; it will eventually slow down when your\n  review grows in number of comments; your editor probably will not;\n* Sometimes Stash can lost comments you're entered in spite of having \"Drafts\";\n* You can unleash all power of your editor in reviewing code by highlighting\n  syntax, inserting snippets and even running code;\n\nUsage\n=====\n\nAuthorization\n-------------\n\nFirst of all, you need to specify login parameters for accessing Stash.\n\nEasiest way to do that is to create config file named `~/.config/ash/ashrc`\nand add following lines:\n\n```\n--user\n  \u003cyour username here\u003e\n\n--pass\n  \u003cyour password here\u003e\n```\n\nSetting your editor\n-------------------\n\nTo make `ash` use editor of your choice you need either to export `$EDITOR`\nenvironment variable or just pass editor name to the `-e` flag.\n\nYou can use `ashrc` config too:\n\n```\n[... some other options goes here ...]\n\n-e\n vim\n```\n\n### Using vim\n\n#### ashium\n\nBest integration into vim on the present date available via\nhttps://github.com/seletskiy/ashium.\n\nFull blown integration is not ready yet (PR please!), but it is useful to have\nfollowing syntax highlights in `~/.vimrc` (one probably wants to change color\ncodes accordingly to colorscheme):\n\n```\naugroup syntax_hacks\n    au!\n    au FileType diff syn match DiffComment \"^#.*\"\n    au FileType diff syn match DiffCommentIgnore \"^###.*\"\n    au FileType diff call g:ApplySyntaxForDiffComments()\naugroup end\n\n\nfun! g:ApplySyntaxForDiffComments()\n    if \u0026background == 'light'\n        hi DiffCommentIgnore ctermfg=249 ctermbg=none\n        hi DiffComment ctermfg=16 ctermbg=254\n    else\n        hi DiffCommentIgnore ctermfg=249 ctermbg=none\n        hi DiffComment ctermfg=15 ctermbg=237\n    endif\nendfun\n```\n\n#### ash.vim\n\nAlso, there is little bit deprecated, but still usable plugin ash.vim, see\nhttps://github.com/kovetskiy/ash.vim. This plugin has decent integration with\nash.\n\n\n### Using sublime\n\nBecause of sublime uses client-server architecture by default, editor\nexecutable should be set in the way it will wait until review file editing is\ndone.\n\nYou need to create wrapper and place it somewhere (preferably in the $PATH)\n`/path/to/sublw`:\n\n```\n#!/bin/sh\n\n/path/to/sublime -w \"${@}\"\n```\n\nThen specify this shiny new executable (do not forget to `chmod +x` it) as\n`ash` editor:\n\n```\n-e\n /path/to/sublw\n```\n\n### Using emacs\n\nFor simple integration emacs with ash see https://github.com/s-kostyaev/ash.el.\nBut [helm](https://github.com/s-kostyaev/helm-ash) interface is now recommended.\n\nRunning ash\n-----------\n\nNow, using `ash` you can:\n\n* list files in the review;\n* review concrete file;\n* see recent changes in overview mode;\n\nCommon usage of `ash` is:\n\n```\nash inbox (only if --url given)\nash \u003cpull request url\u003e ls\nash \u003cpull request url\u003e review\nash \u003cpull request url\u003e review \u003cfile to review\u003e\n```\n\nReviewing\n---------\n\nYou can modify review file which will be opened in editor by:\n\n* entering new line comments just after line you want to comment; you need to\n  use `#` prefix for these kind of lines;\n* modifying existing comments by just altering their text in file;\n* deleting existing comments by just deleting their body;\n* adding review-level/file-level comments by entering them outside of the diff\n  context;\n* replying to the existing comments by entering reply lines of text with some\n  indentation *after* comment delimiter `---`;\n\nTips and tricks\n---------------\n\nYou can use shorthand syntax for accessing reviews without specifying full PR\nurl.\n\nThere are two flags for that:\n* `--url` which used to specify Stash host (e.g. http://stash.local/);\n* `--project` which used to specify default project to search repo/pull-request;\n\nSo, you can add following to your `ashrc`:\n```\n--url\n  http://\u003cyour stash hostname\u003e/\n\n--project\n  mycoolproject\n```\n\nNow you can run `ash` like this:\n```\nash myrepo/123 review\nash notsocoolproject/anotherrepo/456 review\n```\n\nState of things\n===============\n\n* [x] fill todo list;\n* [x] list files in review;\n* [x] add, modify, delete line comments as well as review/file level comments;\n* [x] make `ash` work in overview mode;\n* [x] list reviews in project;\n* [x] list inbox;\n* [x] integrate `ash` with `vim` using `Unite` (PR is welcomed);\n* [ ] integrate `ash` with `sublime` writing a plugin (PR is welcomed);\n* [ ] be more tolerant to user mistakes (`ash` can crash sometime);\n* [ ] wrap long lines in comments;\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseletskiy%2Fash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseletskiy%2Fash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseletskiy%2Fash/lists"}