From 02611f42429832aa9432b8e9fea8b2ff9502a927 Mon Sep 17 00:00:00 2001 From: Chinar Amrutkar Date: Mon, 2 Mar 2026 11:33:49 +0000 Subject: [PATCH 1/2] Add CONTRIBUTING.md --- CONTRIBUTING.md | 76 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..5352057a --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,76 @@ +# Contributing to ticket + +Thank you for your interest in contributing! This document outlines how to set up the project, run tests, and submit changes. + +## Development Setup + +### Prerequisites + +- Bash (POSIX-compatible) +- coreutils +- `jq` (for the `query` command) +- `rg` / ripgrep (optional, falls back to grep) + +### Install from Source + +```bash +git clone https://github.com/wedow/ticket.git +cd ticket +ln -s "$PWD/ticket" ~/.local/bin/tk +# Or add to PATH +``` + +Verify installation: +```bash +tk help +``` + +### Running Tests + +Tests use [behave](https://behave.readthedocs.io/) (Python BDD framework). + +With `uv` installed: +```bash +make test +``` + +Without `uv`: +```bash +pip install behave +make test +``` + +## Coding Standards + +- Write POSIX-compatible bash scripts +- Keep dependencies minimal (coreutils + optional jq/rg) +- Follow the Unix Philosophy: do one thing well +- Add plugin descriptions using `# tk-plugin: description` in the first 10 lines + +## Submitting Changes + +1. Fork the repository +2. Create a feature branch: `git checkout -b my-feature` +3. Make your changes +4. Run tests: `make test` +5. Commit with a clear message +6. Push to your fork +7. Open a pull request against `wedow/ticket` + +## Project Structure + +``` +ticket # Main executable script +CLAUDE.md # AI agent instructions +Makefile # Build/test targets +features/ # behave test scenarios +plugins/ # Bundled plugins +pkg/ # Library functions +scripts/ # Utility scripts +``` + +## Getting Help + +- Open an issue for bugs or feature requests +- Use `tk help` for CLI reference +- Check README.md for usage examples From 4ada2fcb06927b1ef63726780070850ad8353a25 Mon Sep 17 00:00:00 2001 From: Chinar Amrutkar Date: Mon, 9 Mar 2026 20:09:55 +0000 Subject: [PATCH 2/2] fix: handle $EDITOR with whitespace The previous quoting "${EDITOR:-vi}" caused issues when EDITOR contains whitespace (e.g., 'code -w'). Removed the quotes around the variable expansion so word splitting works correctly. Fixes #36 --- plugins/ticket-edit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/ticket-edit b/plugins/ticket-edit index c4f32d42..db5726b9 100755 --- a/plugins/ticket-edit +++ b/plugins/ticket-edit @@ -28,7 +28,7 @@ if [[ ! -f "$file" ]]; then fi if [ -t 0 ] && [ -t 1 ]; then - "${EDITOR:-vi}" "$file" + ${EDITOR:-vi} "$file" else echo "Edit ticket file: $file" fi